jbrowse-plugin-graphgenomeviewer 4.0.21 → 4.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/README.md +5 -2
  2. package/dist/chunks/AddTrackWorkflow-NKKGI6SM.js +2 -0
  3. package/dist/chunks/{AddTrackWorkflow-WYRVQYH2.js.map → AddTrackWorkflow-NKKGI6SM.js.map} +1 -1
  4. package/dist/chunks/{GbzBaseSyntenyAdapter-7ZKFAEJG.js → GbzBaseSyntenyAdapter-HNETLUW4.js} +2 -2
  5. package/dist/chunks/{GraphGenomeView-CLUMXH4K.js → GraphGenomeView-GMHRO7E4.js} +2 -2
  6. package/dist/chunks/{GraphGenomeView-CLUMXH4K.js.map → GraphGenomeView-GMHRO7E4.js.map} +1 -1
  7. package/dist/chunks/LinearGraphDisplay-I2OOPQKB.js +2 -0
  8. package/dist/chunks/{LinearGraphDisplay-4CMVCEM5.js.map → LinearGraphDisplay-I2OOPQKB.js.map} +1 -1
  9. package/dist/chunks/{MinigraphBubbleAdapter-NRDD66AK.js → MinigraphBubbleAdapter-FIFZYJ27.js} +2 -2
  10. package/dist/chunks/chunk-2PYVZZ3R.js +3 -0
  11. package/dist/chunks/chunk-2PYVZZ3R.js.map +7 -0
  12. package/dist/chunks/chunk-D7XFR2IV.js +2 -0
  13. package/dist/chunks/chunk-D7XFR2IV.js.map +7 -0
  14. package/dist/chunks/chunk-DMYUVGGI.js +3 -0
  15. package/dist/chunks/{chunk-QSH263Y6.js.map → chunk-DMYUVGGI.js.map} +4 -4
  16. package/dist/chunks/chunk-JXSDDOKD.js +3 -0
  17. package/dist/chunks/chunk-JXSDDOKD.js.map +7 -0
  18. package/dist/chunks/chunk-OSTJHAAK.js +2 -0
  19. package/dist/chunks/chunk-OSTJHAAK.js.map +7 -0
  20. package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +1 -2
  21. package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
  22. package/package.json +2 -2
  23. package/src/GraphGenomeView/components/FacetPanels.tsx +204 -0
  24. package/src/GraphGenomeView/components/GenePins.tsx +12 -5
  25. package/src/GraphGenomeView/components/GraphCanvas.tsx +86 -42
  26. package/src/GraphGenomeView/components/ReferenceStripOverlay.tsx +19 -7
  27. package/src/GraphGenomeView/model.test.ts +36 -10
  28. package/src/GraphGenomeView/model.ts +130 -9
  29. package/src/version.ts +1 -1
  30. package/dist/chunks/AddTrackWorkflow-WYRVQYH2.js +0 -2
  31. package/dist/chunks/LinearGraphDisplay-4CMVCEM5.js +0 -2
  32. package/dist/chunks/chunk-3FGJLRG2.js +0 -2
  33. package/dist/chunks/chunk-3FGJLRG2.js.map +0 -7
  34. package/dist/chunks/chunk-3SZJ4AFI.js +0 -3
  35. package/dist/chunks/chunk-3SZJ4AFI.js.map +0 -7
  36. package/dist/chunks/chunk-QSH263Y6.js +0 -2
  37. package/dist/chunks/chunk-SCMIJAAX.js +0 -3
  38. package/dist/chunks/chunk-SCMIJAAX.js.map +0 -7
  39. package/dist/chunks/chunk-XK7OPCRQ.js +0 -2
  40. package/dist/chunks/chunk-XK7OPCRQ.js.map +0 -7
  41. /package/dist/chunks/{GbzBaseSyntenyAdapter-7ZKFAEJG.js.map → GbzBaseSyntenyAdapter-HNETLUW4.js.map} +0 -0
  42. /package/dist/chunks/{MinigraphBubbleAdapter-NRDD66AK.js.map → MinigraphBubbleAdapter-FIFZYJ27.js.map} +0 -0
@@ -1,2 +0,0 @@
1
- import{a as f,b as m}from"./chunk-FY3BTKY4.js";var l=f((y,b)=>{b.exports=JBrowseExports["@jbrowse/core/util/tracks"]});var u=m(l(),1),A={RgfaTabixAdapter:"rGFA segments (tabix BED pair)",MinigraphBubbleAdapter:"Minigraph bubbles (tabix BED)"},I={RgfaTabixAdapter:"Path to segments BED (.segs.bed.gz from build_rgfa_tabix.sh; the .links.bed.gz and both .tbi are assumed beside it)",MinigraphBubbleAdapter:"Path to bubbles BED (.bed.gz from gfatools bubble; the .tbi is assumed beside it)"},o=".segs.bed.gz";function g(e){let i=e.search(/[?#]/);return i===-1?{name:e,query:""}:{name:e.slice(0,i),query:e.slice(i)}}function r(e){return"uri"in e?g(e.uri).name:"localPath"in e?e.localPath:""}function h(e,i){if("uri"in e){let{name:n,query:t}=g(e.uri);return{...e,uri:i(n)+t}}return"localPath"in e?{...e,localPath:i(e.localPath)}:e}function s(e,i){return h(e,n=>n+i)}function x(e){return r(e).endsWith(o)}function F(e){if(!x(e))throw new Error(`Expected a segments BED ending in ${o}, got ${r(e)||"a blob"}`);return h(e,i=>`${i.slice(0,-o.length)}.links.bed.gz`)}function d(e,i){return i?{location:i,indexType:(0,u.makeIndexType)(r(i),"CSI","TBI")}:{location:s(e,".tbi"),indexType:"TBI"}}function L(e,i){return i!==void 0&&r(i).endsWith(".csi")?{location:s(e,".csi"),indexType:"CSI"}:{location:s(e,".tbi"),indexType:"TBI"}}function p(e,i){let n=i.trim();return n?{assemblyNameToPanSN:{[e]:n}}:{}}function T({choice:e,loc:i,indexLoc:n,assembly:t,sample:a}){if(e==="MinigraphBubbleAdapter")return{type:"MinigraphBubbleAdapter",bubblesLocation:i,index:d(i,n),...p(t,a)};let c=F(i);return{type:"RgfaTabixAdapter",segmentsLocation:i,segmentsIndex:d(i,n),linksLocation:c,linksIndex:L(c,n),...p(t,a)}}function B(e){let{choice:i,assembly:n,trackId:t,name:a}=e;return{type:i==="RgfaTabixAdapter"?"GraphTrack":"FeatureTrack",trackId:t,name:a,assemblyNames:[n],adapter:T(e),...i==="RgfaTabixAdapter"?{displayDefaults:{showLabels:"none"}}:{}}}export{l as a,A as b,I as c,g as d,r as e,h as f,x as g,T as h,B as i};
2
- //# sourceMappingURL=chunk-XK7OPCRQ.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["global-externals:@jbrowse/core/util/tracks", "../../src/GraphAddTrackWorkflow/buildTrackConfig.ts"],
4
- "sourcesContent": ["module.exports = JBrowseExports[\"@jbrowse/core/util/tracks\"];", "import { makeIndexType } from '@jbrowse/core/util/tracks'\n\nimport type { FileLocation } from '@jbrowse/core/util'\n\nexport type GraphFileChoice = 'RgfaTabixAdapter' | 'MinigraphBubbleAdapter'\n\nexport const GRAPH_FILE_LABELS: Record<GraphFileChoice, string> = {\n RgfaTabixAdapter: 'rGFA segments (tabix BED pair)',\n MinigraphBubbleAdapter: 'Minigraph bubbles (tabix BED)',\n}\n\nexport const GRAPH_FILE_FIELDS: Record<GraphFileChoice, string> = {\n RgfaTabixAdapter:\n 'Path to segments BED (.segs.bed.gz from build_rgfa_tabix.sh; the .links.bed.gz and both .tbi are assumed beside it)',\n MinigraphBubbleAdapter:\n 'Path to bubbles BED (.bed.gz from gfatools bubble; the .tbi is assumed beside it)',\n}\n\nconst SEGMENTS_SUFFIX = '.segs.bed.gz'\n\n// A url's query string (a presigned signature, a token) follows the file name\nexport function splitUri(uri: string) {\n const end = uri.search(/[?#]/)\n return end === -1\n ? { name: uri, query: '' }\n : { name: uri.slice(0, end), query: uri.slice(end) }\n}\n\nexport function locationName(loc: FileLocation) {\n return 'uri' in loc\n ? splitUri(loc.uri).name\n : 'localPath' in loc\n ? loc.localPath\n : ''\n}\n\nexport function renamed(loc: FileLocation, rename: (name: string) => string) {\n if ('uri' in loc) {\n const { name, query } = splitUri(loc.uri)\n return { ...loc, uri: rename(name) + query }\n }\n return 'localPath' in loc ? { ...loc, localPath: rename(loc.localPath) } : loc\n}\n\nfunction sibling(loc: FileLocation, suffix: string) {\n return renamed(loc, name => name + suffix)\n}\n\nexport function isSegmentsLocation(loc: FileLocation) {\n return locationName(loc).endsWith(SEGMENTS_SUFFIX)\n}\n\nfunction linksLocation(loc: FileLocation) {\n if (!isSegmentsLocation(loc)) {\n throw new Error(\n `Expected a segments BED ending in ${SEGMENTS_SUFFIX}, got ${locationName(loc) || 'a blob'}`,\n )\n }\n return renamed(\n loc,\n name => `${name.slice(0, -SEGMENTS_SUFFIX.length)}.links.bed.gz`,\n )\n}\n\nfunction tabixIndex(loc: FileLocation, indexLoc: FileLocation | undefined) {\n return indexLoc\n ? {\n location: indexLoc,\n indexType: makeIndexType(locationName(indexLoc), 'CSI', 'TBI'),\n }\n : { location: sibling(loc, '.tbi'), indexType: 'TBI' }\n}\n\n// The links file's index is assumed beside it, of the kind the segments' is.\nfunction siblingIndex(loc: FileLocation, indexLoc: FileLocation | undefined) {\n const csi = indexLoc !== undefined && locationName(indexLoc).endsWith('.csi')\n return csi\n ? { location: sibling(loc, '.csi'), indexType: 'CSI' }\n : { location: sibling(loc, '.tbi'), indexType: 'TBI' }\n}\n\nfunction panSN(assembly: string, sample: string) {\n const name = sample.trim()\n return name ? { assemblyNameToPanSN: { [assembly]: name } } : {}\n}\n\nexport function buildAdapterConfig({\n choice,\n loc,\n indexLoc,\n assembly,\n sample,\n}: {\n choice: GraphFileChoice\n loc: FileLocation\n indexLoc: FileLocation | undefined\n assembly: string\n sample: string\n}) {\n if (choice === 'MinigraphBubbleAdapter') {\n return {\n type: 'MinigraphBubbleAdapter',\n bubblesLocation: loc,\n index: tabixIndex(loc, indexLoc),\n ...panSN(assembly, sample),\n }\n }\n const links = linksLocation(loc)\n return {\n type: 'RgfaTabixAdapter',\n segmentsLocation: loc,\n segmentsIndex: tabixIndex(loc, indexLoc),\n linksLocation: links,\n linksIndex: siblingIndex(links, indexLoc),\n ...panSN(assembly, sample),\n }\n}\n\nexport function buildTrackConfig(args: {\n choice: GraphFileChoice\n loc: FileLocation\n indexLoc: FileLocation | undefined\n assembly: string\n sample: string\n trackId: string\n name: string\n}) {\n const { choice, assembly, trackId, name } = args\n return {\n type: choice === 'RgfaTabixAdapter' ? 'GraphTrack' : 'FeatureTrack',\n trackId,\n name,\n assemblyNames: [assembly],\n adapter: buildAdapterConfig(args),\n ...(choice === 'RgfaTabixAdapter'\n ? { displayDefaults: { showLabels: 'none' } }\n : {}),\n }\n}\n"],
5
- "mappings": "+CAAA,IAAAA,EAAAC,EAAA,CAAAC,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AAY,MAAO,CAAE,EAC1C,CAAC,CACP,CACF",
6
- "names": ["require_tracks", "__commonJSMin", "exports", "module", "import_tracks", "GRAPH_FILE_LABELS", "GRAPH_FILE_FIELDS", "SEGMENTS_SUFFIX", "splitUri", "uri", "end", "locationName", "loc", "renamed", "rename", "name", "query", "sibling", "suffix", "isSegmentsLocation", "linksLocation", "tabixIndex", "indexLoc", "siblingIndex", "panSN", "assembly", "sample", "buildAdapterConfig", "choice", "links", "buildTrackConfig", "args", "trackId"]
7
- }