Feat fast gmt2mat - #506
Open
ivokwee wants to merge 19 commits into
Open
Conversation
Fix failing annotation for uniprots for non primates
reactome.org's live SVG exporter is now behind Cloudflare and returns 403 to server-side requests. Route R-HSA ids through the local SBGN renderer instead: fix getReactomeSVG.SBGN (filename mapping + broken returns) so it renders the bundled .sbgn files and returns a path/NULL, and point getPathwayImage at it. getReactomeSVG now returns NULL on failed download. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch Reactome diagrams from SBGNview (which re-renders in generic SBGN style, not matching reactome.org) to Reactome's own native SVGs. Since the live exporter is Cloudflare-blocked, fetch them from a self-hosted mirror (REACTOME_SVG_URL) on demand and cache on disk. Sub-pathways with no diagram of their own resolve to the nearest ancestor diagram via a precomputed offline map (inst/extdata/reactome_diagram_map.tsv), so no reactome.org call is made at runtime. getReactomeSVG.SBGN and the bundled inst/sbgn files are now unused. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The map was keyed off humanPathwaysWithDiagrams.txt (1137), but the SVG tarball ships 1382 diagrams, so common pathways like R-HSA-109581 had a diagram but no map entry and showed "not available". Rebuild the map with the diagram set = ids that actually have an SVG, so every target is guaranteed a file. Coverage goes from 91% (2647) to 100% (2883). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
getReactomeSVG now prefers the gzipped native SVGs bundled in playdata (inst/extdata/reactome-svg), decompressing on demand to the on-disk cache via fast raw-byte streaming, and falls back to the hosted mirror (REACTOME_SVG_URL) when playdata doesn't ship them. The diagram map is likewise read from playdata, falling back to playbase's own copy during the transition. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the transition fallbacks per single-source design: the diagram map is read solely from playdata (playbase's copy removed), and getReactomeSVG serves only the gzipped SVGs bundled in playdata -- the hosted-mirror path (REACTOME_SVG_URL) and its baseurl arg are gone. Deployment guarantees playdata is up to date. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Completes the single-source refactor whose code change was accidentally left out of the previous commit (which only removed the map file). getReactomeSVG now serves solely from playdata's gzipped SVGs (no baseurl / REACTOME_SVG_URL), reactomeDiagramMap reads only playdata, and the roxygen docs + NAMESPACE are regenerated to match. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
We ended up serving native SVGs, so the SBGN renderer is unused. Undo the modifications made to it during the abandoned SBGN approach; leave the (dormant) function otherwise untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat: order samples on heatmap
Reactome diagrams: native SVGs via playdata + offline map
A client reported UniProt ranking failed when IDs had a space after the
semicolon: "I3L1P8;Q02978" worked but "I3L1P8; Q02978" did not.
Root cause: the split tokens were never actually trimmed - trimws() was
only used as a filter predicate, not applied to the values. A leading
space made the Swiss-Prot test grep("^[OPQ][0-9]", ...) miss (the ^
anchor hit the space), demoting Swiss-Prot IDs to TrEMBL, and the stray
space leaked into the output feature string.
Fix: trim the tokens themselves. Handles one or multiple spaces and
padding anywhere. Adds a regression test.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace with faster implementation of PR from plaid bigomics/plaid#13