jbrowse-plugin-graphgenomeviewer 8.0.1 → 8.0.2
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.
- package/dist/chunks/{AddTrackWorkflow-KT6Z6PSW.js → AddTrackWorkflow-RJSOQZYQ.js} +2 -2
- package/dist/chunks/{ChooseSamplesDialog-YUH6SVEZ.js → ChooseSamplesDialog-LO7FKFSS.js} +2 -2
- package/dist/chunks/{ChooseWalksDialog-2QJKRASB.js → ChooseWalksDialog-JJSOVCEU.js} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-TG2ANRT3.js → GbzBaseSyntenyAdapter-EGNUOKB2.js} +2 -2
- package/dist/chunks/{GbzBaseSyntenyAdapter-TG2ANRT3.js.map → GbzBaseSyntenyAdapter-EGNUOKB2.js.map} +1 -1
- package/dist/chunks/{GraphGenomeView-FCHJASPO.js → GraphGenomeView-667ZUNDI.js} +2 -2
- package/dist/chunks/{GraphTrackSettingsDialog-TY3TNJNT.js → GraphTrackSettingsDialog-7M3Q635V.js} +2 -2
- package/dist/chunks/{GraphTrackSettingsDialog-TY3TNJNT.js.map → GraphTrackSettingsDialog-7M3Q635V.js.map} +1 -1
- package/dist/chunks/{HighlightColorDialog-5KLRS7JE.js → HighlightColorDialog-4F34Q4PY.js} +2 -2
- package/dist/chunks/LinearGraphDisplay-BAEMS5WG.js +2 -0
- package/dist/chunks/LinearGraphDisplay-BAEMS5WG.js.map +7 -0
- package/dist/chunks/{MinigraphBubbleAdapter-CML6E5IP.js → MinigraphBubbleAdapter-G25V6MZL.js} +2 -2
- package/dist/chunks/{RgfaTabixAdapter-AR6A5GCW.js → RgfaTabixAdapter-JPTUWO2Z.js} +2 -2
- package/dist/chunks/{WalkFormsAdapter-Q37XRR7X.js → WalkFormsAdapter-PBN7BJZW.js} +2 -2
- package/dist/chunks/{WalkTabixSyntenyAdapter-NWB2OALF.js → WalkTabixSyntenyAdapter-27WDE5JF.js} +2 -2
- package/dist/chunks/{chunk-3OALERH2.js → chunk-2PNGGCQJ.js} +2 -2
- package/dist/chunks/{chunk-3OALERH2.js.map → chunk-2PNGGCQJ.js.map} +1 -1
- package/dist/chunks/{chunk-ACN3SGJ3.js → chunk-2V75YPTT.js} +2 -2
- package/dist/chunks/{chunk-ACN3SGJ3.js.map → chunk-2V75YPTT.js.map} +3 -3
- package/dist/chunks/chunk-3EQNVA3F.js +4 -0
- package/dist/chunks/{chunk-JI7T4PVJ.js.map → chunk-3EQNVA3F.js.map} +4 -4
- package/dist/chunks/{chunk-KFZWGL76.js → chunk-5RHNR3TH.js} +1 -1
- package/dist/chunks/{chunk-KFZWGL76.js.map → chunk-5RHNR3TH.js.map} +1 -1
- package/dist/chunks/{chunk-LR45N54F.js → chunk-CBKSPAUI.js} +2 -2
- package/dist/chunks/{chunk-VVGUWP7O.js → chunk-CJAV55QB.js} +1 -1
- package/dist/chunks/{chunk-VVGUWP7O.js.map → chunk-CJAV55QB.js.map} +1 -1
- package/dist/chunks/{chunk-UDHJGXQV.js → chunk-DG3E6BSX.js} +2 -2
- package/dist/chunks/{chunk-NEWN556N.js → chunk-FY7X6253.js} +2 -2
- package/dist/chunks/{chunk-NEWN556N.js.map → chunk-FY7X6253.js.map} +1 -1
- package/dist/chunks/chunk-HLAQQI6G.js +2 -0
- package/dist/chunks/chunk-HLAQQI6G.js.map +7 -0
- package/dist/chunks/{chunk-6FH5I6SI.js → chunk-I6F25EXY.js} +2 -2
- package/dist/chunks/{chunk-4KVQOJHH.js → chunk-IAXUZMOX.js} +2 -2
- package/dist/chunks/{chunk-4KVQOJHH.js.map → chunk-IAXUZMOX.js.map} +1 -1
- package/dist/chunks/{chunk-AJX6ZXCI.js → chunk-JMRW3IGK.js} +2 -2
- package/dist/chunks/{chunk-AJX6ZXCI.js.map → chunk-JMRW3IGK.js.map} +1 -1
- package/dist/chunks/chunk-JOYKGTDE.js +4 -0
- package/dist/chunks/chunk-JOYKGTDE.js.map +7 -0
- package/dist/chunks/chunk-NIEZKWQV.js +2 -0
- package/dist/chunks/{chunk-YU7T5WOQ.js.map → chunk-NIEZKWQV.js.map} +2 -2
- package/dist/chunks/chunk-NLS74JSZ.js +2 -0
- package/dist/chunks/{chunk-46CNCY7Z.js.map → chunk-NLS74JSZ.js.map} +1 -1
- package/dist/chunks/{chunk-OYXKO3SL.js → chunk-O5FDMVL3.js} +2 -2
- package/dist/chunks/chunk-Q7QC2EQU.js +2 -0
- package/dist/chunks/chunk-RHYBJCA4.js +2 -0
- package/dist/chunks/chunk-RHYBJCA4.js.map +7 -0
- package/dist/chunks/chunk-X7YIGIYW.js +2 -0
- package/dist/chunks/{chunk-UQDZNX5E.js.map → chunk-X7YIGIYW.js.map} +4 -4
- package/dist/chunks/chunk-XB5KC2EZ.js +2 -0
- package/dist/chunks/{chunk-BH2HG6VX.js.map → chunk-XB5KC2EZ.js.map} +2 -2
- package/dist/chunks/{chunk-LFCGAZIW.js → chunk-XWCLYB5C.js} +2 -2
- package/dist/chunks/{chunk-LFCGAZIW.js.map → chunk-XWCLYB5C.js.map} +1 -1
- package/dist/chunks/{chunk-JN5A42OJ.js → chunk-ZGTG74GE.js} +3 -3
- package/dist/chunks/{chunk-JN5A42OJ.js.map → chunk-ZGTG74GE.js.map} +2 -2
- package/dist/chunks/renderSvg-YNA5VK6A.js +2 -0
- package/dist/chunks/renderSvg-YNA5VK6A.js.map +7 -0
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +4 -4
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +4 -4
- package/package.json +2 -2
- package/src/GraphGenomeView/components/GraphCanvas.test.tsx +1 -1
- package/src/GraphGenomeView/components/GraphCanvas.tsx +66 -18
- package/src/GraphGenomeView/components/Legend.tsx +81 -34
- package/src/GraphGenomeView/components/LegendSwatch.tsx +13 -30
- package/src/GraphGenomeView/components/PaneSvg.tsx +79 -22
- package/src/GraphGenomeView/components/SettingsMenu.tsx +1 -1
- package/src/GraphGenomeView/components/legendStyles.ts +13 -1
- package/src/GraphGenomeView/legendSections.test.ts +131 -2
- package/src/GraphGenomeView/legendSections.ts +220 -42
- package/src/GraphGenomeView/model.test.ts +7 -8
- package/src/GraphGenomeView/pane/fitViews.ts +6 -57
- package/src/GraphGenomeView/pane/graphViews.ts +23 -1
- package/src/GraphGenomeView/pane/launchActions.ts +1 -1
- package/src/LinearGraphDisplay/LinearGraphDisplay.test.ts +19 -1
- package/src/LinearGraphDisplay/components/LinearGraphDisplay.tsx +6 -6
- package/src/LinearGraphDisplay/model.ts +9 -10
- package/src/RgfaTabixAdapter/walkFiles.test.ts +36 -0
- package/src/RgfaTabixAdapter/walkReader.ts +22 -7
- package/src/version.ts +1 -1
- package/dist/chunks/LinearGraphDisplay-HJCT6VYM.js +0 -2
- package/dist/chunks/LinearGraphDisplay-HJCT6VYM.js.map +0 -7
- package/dist/chunks/chunk-46CNCY7Z.js +0 -2
- package/dist/chunks/chunk-BH2HG6VX.js +0 -2
- package/dist/chunks/chunk-JI7T4PVJ.js +0 -4
- package/dist/chunks/chunk-MLQK7CCL.js +0 -4
- package/dist/chunks/chunk-MLQK7CCL.js.map +0 -7
- package/dist/chunks/chunk-Q4UIYMYF.js +0 -2
- package/dist/chunks/chunk-QTEWKTFE.js +0 -2
- package/dist/chunks/chunk-QTEWKTFE.js.map +0 -7
- package/dist/chunks/chunk-UQDZNX5E.js +0 -2
- package/dist/chunks/chunk-YU7T5WOQ.js +0 -2
- package/dist/chunks/chunk-ZEYVMHUW.js +0 -2
- package/dist/chunks/chunk-ZEYVMHUW.js.map +0 -7
- package/dist/chunks/renderSvg-QPNRFPLM.js +0 -2
- package/dist/chunks/renderSvg-QPNRFPLM.js.map +0 -7
- package/src/LinearGraphDisplay/components/GraphStatusChrome.test.tsx +0 -182
- package/src/LinearGraphDisplay/components/GraphStatusChrome.tsx +0 -158
- /package/dist/chunks/{AddTrackWorkflow-KT6Z6PSW.js.map → AddTrackWorkflow-RJSOQZYQ.js.map} +0 -0
- /package/dist/chunks/{ChooseSamplesDialog-YUH6SVEZ.js.map → ChooseSamplesDialog-LO7FKFSS.js.map} +0 -0
- /package/dist/chunks/{ChooseWalksDialog-2QJKRASB.js.map → ChooseWalksDialog-JJSOVCEU.js.map} +0 -0
- /package/dist/chunks/{GraphGenomeView-FCHJASPO.js.map → GraphGenomeView-667ZUNDI.js.map} +0 -0
- /package/dist/chunks/{HighlightColorDialog-5KLRS7JE.js.map → HighlightColorDialog-4F34Q4PY.js.map} +0 -0
- /package/dist/chunks/{MinigraphBubbleAdapter-CML6E5IP.js.map → MinigraphBubbleAdapter-G25V6MZL.js.map} +0 -0
- /package/dist/chunks/{RgfaTabixAdapter-AR6A5GCW.js.map → RgfaTabixAdapter-JPTUWO2Z.js.map} +0 -0
- /package/dist/chunks/{WalkFormsAdapter-Q37XRR7X.js.map → WalkFormsAdapter-PBN7BJZW.js.map} +0 -0
- /package/dist/chunks/{WalkTabixSyntenyAdapter-NWB2OALF.js.map → WalkTabixSyntenyAdapter-27WDE5JF.js.map} +0 -0
- /package/dist/chunks/{chunk-LR45N54F.js.map → chunk-CBKSPAUI.js.map} +0 -0
- /package/dist/chunks/{chunk-UDHJGXQV.js.map → chunk-DG3E6BSX.js.map} +0 -0
- /package/dist/chunks/{chunk-6FH5I6SI.js.map → chunk-I6F25EXY.js.map} +0 -0
- /package/dist/chunks/{chunk-OYXKO3SL.js.map → chunk-O5FDMVL3.js.map} +0 -0
- /package/dist/chunks/{chunk-Q4UIYMYF.js.map → chunk-Q7QC2EQU.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as J,c as D,d as V,e as X,f as q,h as K}from"./chunk-AH5UWTAV.js";import"./chunk-3VGXCEMQ.js";import"./chunk-IKJZPPOA.js";import"./chunk-OGQ6OQDN.js";import{d as M,e as P}from"./chunk-3WG3GF2A.js";import{b as w,h as v,j as A,m as x}from"./chunk-J5RMHLFJ.js";import{
|
|
2
|
-
//# sourceMappingURL=AddTrackWorkflow-
|
|
1
|
+
import{b as J,c as D,d as V,e as X,f as q,h as K}from"./chunk-AH5UWTAV.js";import"./chunk-3VGXCEMQ.js";import"./chunk-IKJZPPOA.js";import"./chunk-OGQ6OQDN.js";import{d as M,e as P}from"./chunk-3WG3GF2A.js";import{b as w,h as v,j as A,m as x}from"./chunk-J5RMHLFJ.js";import{i as o}from"./chunk-NIEZKWQV.js";import{A as O,B as j,C as z,F as h,a as H,f as E,g as c,o as B,s as N,t as W,u as _}from"./chunk-5Z4VIKXZ.js";import{b as a,c as f,d as I}from"./chunk-JMBDTNUR.js";var n=JBrowseExports["@jbrowse/core/util/tss-react"],oe=s=>n!=null&&s in Object(n)?n[s]:Object.assign(function(){throw new Error("This JBrowse does not provide '"+s+"' from '@jbrowse/core/util/tss-react' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse")},{jbrowseHostMissing:s});var Q=oe("makeStyles"),ie=n&&n.__esModule?n.default:n;var se=Q()(s=>({paper:{margin:s.spacing(),padding:s.spacing()},field:{marginTop:s.spacing(2)},submit:{marginTop:25,marginBottom:100,display:"block"}})),re=["RgfaTabixAdapter","RgfaTabixWalks","GbzBaseSyntenyAdapter","MinigraphBubbleAdapter"],ne=I(function({model:t}){let{classes:i}=se(),y=A(t),d=M(t),[r,U]=o("RgfaTabixAdapter"),[l,Y]=o(),[k,G]=o(),[T,Z]=o(),m=r==="GbzBaseSyntenyAdapter",u=r==="RgfaTabixWalks",[C,$]=o(""),[R,ee]=o(""),[b,ae]=o("Pangenome graph"),[S,g]=o(),[F,L]=o(!1);async function te(){if(!l||!t.assembly)return;g(void 0),L(!0);let e=r==="RgfaTabixAdapter"?await J(l,v(t).pluginManager):void 0;if(L(!1),!(!P(t)||!t.assembly))try{let p=b.trim();w({model:t,session:y,conf:K({choice:r,loc:l,indexLoc:k,readsLoc:m?T:void 0,manifest:e,assembly:t.assembly,sample:C,haplotypes:u?q(R):void 0,trackId:x({name:p}),name:p})})}catch(p){g(p)}}return f(O,{className:i.paper,children:[S?a(E,{error:S}):null,f(N,{children:[a(_,{children:"File type"}),a(z,{value:r,onChange:e=>{U(e.target.value),G(void 0),g(void 0)},children:re.map(e=>a(W,{value:e,control:a(j,{}),label:D[e]},e))})]}),a(c,{location:l,name:V[r],rootModel:d,setLocation:Y}),a(c,{location:k,name:X[r],rootModel:d,setLocation:G}),m?a(c,{location:T,name:"Path to reads aligned to the graph as GAF (optional; a .gz is read by the .tbi beside it)",rootModel:d,setLocation:Z}):null,a(h,{className:i.field,value:C,onChange:e=>{$(e.target.value)},label:"Sample name in the graph",slotProps:{htmlInput:{"data-testid":"graph-sample-input"}},helperText:m?"Optional. The graph's sample for this assembly, e.g. GRCh38 where the assembly is hg38; leave blank when they share a name or the graph has one reference sample":u?"Optional. The PanSN sample this assembly is in the graph; blank takes it from the file name, GRCh38 in chr22.GRCh38.walks.bed.gz":"Optional. The PanSN prefix the graph gives this assembly, e.g. GRCh38 for HPRC's GRCh38#0#chr1; leave blank when the graph's stable names are bare",placeholder:"GRCh38",fullWidth:!0}),u?a(h,{className:i.field,value:R,onChange:e=>{ee(e.target.value)},label:"Haplotypes",slotProps:{htmlInput:{"data-testid":"graph-haplotypes-input"}},helperText:"Optional. The haplotypes the track cuts for until you pick others in its menu, as PanSN names separated by commas (HG002#1, or HG002 for both); blank is every haplotype in the file",placeholder:"HG002, HG00733",fullWidth:!0}):null,a(h,{className:i.field,value:b,label:"Track name",slotProps:{htmlInput:{"data-testid":"graph-track-name-input"}},onChange:e=>{ae(e.target.value)}}),a(H,{session:y,helperText:"Select assembly to add track to",selected:t.assembly,onChange:e=>{t.setAssembly(e)},fullWidth:!0}),a(B,{variant:"contained",className:i.submit,disabled:!l||!b.trim()||!t.assembly||F,onClick:()=>{te()},children:F?"Reading graph.json\u2026":"Submit"})]})}),ye=ne;export{ye as default};
|
|
2
|
+
//# sourceMappingURL=AddTrackWorkflow-RJSOQZYQ.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=ChooseSamplesDialog-
|
|
1
|
+
import{a as i}from"./chunk-CBKSPAUI.js";import"./chunk-NIEZKWQV.js";import"./chunk-5Z4VIKXZ.js";import{b as a,d as s}from"./chunk-JMBDTNUR.js";var t=s(function({model:o,onClose:p}){let{samples:l}=o.walkRowSampleChoices;return a(i,{title:"Choose samples",label:"Samples",testId:"graph-choose-samples",caption:`${l.length.toLocaleString()} samples in this cut. Their walks show in pairs, in the order picked.`,options:l,initial:o.walkRowSamples??[],confirmLabel:e=>e.length>0?"Show these samples":"Show every sample",onPick:e=>{o.setWalkRowSamples(e.length>0?e:void 0)},onClose:p})}),h=t;export{h as default};
|
|
2
|
+
//# sourceMappingURL=ChooseSamplesDialog-LO7FKFSS.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=ChooseWalksDialog-
|
|
1
|
+
import{a as t}from"./chunk-CBKSPAUI.js";import"./chunk-NIEZKWQV.js";import"./chunk-5Z4VIKXZ.js";import{b as l,d as i}from"./chunk-JMBDTNUR.js";var h=i(function({model:o,onClose:s}){let{walkChoices:a}=o;return l(t,{title:"Choose haplotypes",label:"Haplotypes",testId:"graph-choose-walks",caption:`${a.length.toLocaleString()} haplotypes in this cut. The ones picked are highlighted in this order, and the rest fades.`,options:a.map(e=>e.name),initial:o.walkLayers.map(e=>e.walk),optionLabel:e=>o.walkLabel(e),confirmLabel:e=>e.length>0?"Highlight these":"Clear highlights",onPick:e=>{o.liftAmongChoices(e)},onClose:s})}),k=h;export{k as default};
|
|
2
|
+
//# sourceMappingURL=ChooseWalksDialog-JJSOVCEU.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ne,b as ae,c as ue,d as re,e as oe,f as O,g as ie,h as se}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=GbzBaseSyntenyAdapter-
|
|
1
|
+
import{a as ne,b as ae,c as ue,d as re,e as oe,f as O,g as ie,h as se}from"./chunk-O5FDMVL3.js";import{a as te}from"./chunk-Q7QC2EQU.js";import{a as ee}from"./chunk-KOB7YIMR.js";import{a as Q,b as D,c as Z,d as u,e as k,f as M,g as j,h as $,i as W,k as U}from"./chunk-IAXUZMOX.js";import"./chunk-M2D7NUOY.js";import{h as z,i as E}from"./chunk-FY7X6253.js";import"./chunk-YBLNN5FU.js";import"./chunk-X7YIGIYW.js";import"./chunk-JMRW3IGK.js";import{C as V,a as K,c as L}from"./chunk-DG3E6BSX.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import{g as F,h as N,i as C}from"./chunk-5RHNR3TH.js";import"./chunk-OTBDKJEA.js";import"./chunk-3VGXCEMQ.js";import{d as G,g as X,h as Y,i as J}from"./chunk-IKJZPPOA.js";import{a as P}from"./chunk-OGQ6OQDN.js";import"./chunk-3WG3GF2A.js";import{e as _,o as B}from"./chunk-J5RMHLFJ.js";function A(n){let i=/\.gbz\.db$/i;return i.test(n)?n.replace(i,".haplotype-index.db"):void 0}function ge(n){return Y(n)&&A(X(n))?J(n,i=>A(i)):void 0}function ye(n){return n instanceof Error&&(/\bHTTP 40[34]\b/.test(n.message)||n.code==="ENOENT")}async function ce(n,i){let e=ge(n);if(!e)return{};try{return await P(e,i).stat(),{location:e}}catch(t){return ye(t)?{}:{unreadable:String(t)}}}var be=5e3,we=50*2**20,H=class extends Error{constructor(e){super(`this GAF is ${(e/2**20).toFixed(0)} MB without an index; bgzip it and index it with tabix -p gaf`);this.name="UnindexedGafTooLargeError"}};function xe(n,i){if(n.length<=i)return n;let e=n.length/i;return Array.from({length:i},(t,a)=>n[Math.floor(a*e)])}var pe=(n,i)=>n.path.some(e=>i.has(e.name)),v=class{constructor(i,e){this.file=i;this.tabix=e;this.whole=L({setup:async({signal:i})=>{let{size:e}=await this.file.stat();if(e>we)throw new H(e);let t=await this.file.readFile({signal:i}),a=new TextDecoder().decode(t[0]===31&&t[1]===139?await K(t):t);return E(a)}})}async readIndexed(i,e,t){let a=1/0,r=-1/0;for(let s of e){let c=Number(s);Number.isInteger(c)&&(a=Math.min(a,c),r=Math.max(r,c))}let o=[];return a<=r&&await i.getLines("{node}",a,r+1,{signal:t,lineCallback:s=>{let c=z(s);c&&pe(c,e)&&o.push(c)}}),o}async readsOver(i,{signal:e}={}){let t=this.tabix?await this.readIndexed(this.tabix,i,e):(await this.whole({signal:e})).filter(a=>pe(a,i));return{records:xe(t,be),total:t.length}}};var I=class extends Error{constructor(e){super(e===void 0?"no haplotype index is set, so the walks cannot be named; build one with gbz-haplotype-index (cargo install gbz-haplotype-index) and set it as haplotypeIndexLocation":`the haplotype index beside the graph database could not be checked (${e}), so the walks cannot be named; if it is there, reload to try again, or set haplotypeIndexLocation`);this.name="NoHaplotypeIndexError"}},q=class extends Error{constructor(e,t){super(`the graph is cut on its reference, ${t}; a window on ${e} has no reference coordinates to cut at. Open the graph from a ${t} view, and find this haplotype's lane there`);this.name="HaplotypeWindowError"}};function Se(n,i){return`${u(n)}#${n.contig}@${i.start.node}.${i.start.offset}`}function Ne({alignment:n,assemblyName:i,refName:e,lane:t}){let{refStart:a,refEnd:r,strand:o,cigar:s}=n;if(!(r<=a)){let{name:c,hapStart:p,hapEnd:l}=n,f=Se(c,n),g={uniqueId:f,assemblyName:i,refName:e,start:a,end:r,type:"match",strand:o==="-"?-1:1,CIGAR:s,syntenyId:f,mate:{refName:c.contig,start:p,end:l,assemblyName:t}};return new ne(g)}}function Pe({pair:n,lane:i,mateLane:e}){return se({target:{name:`${u(n.target)}#${n.target.contig}`,assemblyName:i,refName:n.target.contig,start:n.targetStart,end:n.targetEnd},query:{name:`${u(n.query)}#${n.query.contig}`,assemblyName:e,refName:n.query.contig,start:n.queryStart,end:n.queryEnd},strand:n.strand,cigar:n.cigar,matches:n.matches,columns:n.columns})}var Le=12e4;function Re(n,i){let e=new Map;for(let a of n)for(let{name:r,start:o,end:s}of a.walkSpans()){let c=u(r);if(i.has(c)){let p=`${c}#${r.contig}`,l=e.get(p);l?l.push([o,s]):e.set(p,[[o,s]])}}let t=0;for(let a of e.values()){a.sort((r,o)=>r[0]-o[0]);for(let r=1;r<a.length;r++){let o=a[r][0]-a[r-1][1];o>0&&o<=Le&&(t=Math.max(t,o))}}return t}function fe(n,i){return n instanceof Z&&(n.message=`Zoom in to about ${_(n.fitsBp)} to see ${i}`),n}var le=(n,i,e)=>ie(fe(W(n,i,e)??n,"lanes"),e),me=n=>({...n,start:Math.floor(n.start),end:Math.ceil(n.end)}),T=class extends ae{constructor(){super(...arguments);this.graph=L({label:"Opening pangenome database",setup:async()=>{let e=this.getConf("gbzDbLocation"),t=this.getConf("haplotypeIndexLocation"),a=G(t)?{location:t}:await ce(e,this.pluginManager),r=a.location,o=await D.open({source:P(e,this.pluginManager),haplotypeIndex:r?P(r,this.pluginManager):void 0}),s=this.getConf("assemblyNames")[0];if(s===void 0)throw new Error("GbzBaseSyntenyAdapter needs assemblyNames: its first entry is the assembly the reference sample is loaded as");let c=await M(o),p=j({configured:this.getConf("referenceSample"),anchorPrefix:N(this,s),referenceSamples:c});return{db:o,anchor:s,referenceSample:p,referenceSamples:c,unreadableIndex:a.unreadable}}});this.gaf=L({label:"Opening reads",setup:async()=>{let e=this.getConf("readsLocation"),t=this.getConf(["readsIndex","location"]);return G(e)?new v(P(e,this.pluginManager),G(t)?V(this,["readsLocation"],["readsIndex"]):void 0):void 0}})}async referenceQuery(e,t){let{db:a,referenceSample:r}=await this.graph(t);return $(a,r,e)}async getHaplotypes(e={}){let{db:t,referenceSamples:a}=await this.graph(e),r=new Map;for(let o of await t.paths()){let s=u(o.name),c=r.get(s);c?c.contigs.includes(o.name.contig)||c.contigs.push(o.name.contig):r.set(s,{prefix:s,sample:o.name.sample,haplotype:o.name.haplotype,contigs:[o.name.contig],isReference:a.includes(o.name.sample)})}return[...r.values()]}async getHeader(e={}){let{anchor:t,referenceSample:a}=await this.graph(e),r=C(this),o=[];for(let s of await this.getHaplotypes(e))s.sample!==a&&o.push({name:O(r,s.prefix),label:s.prefix,group:s.sample});return{hasCoarseTier:!1,anchorAssemblyName:t,lanes:o}}async getRefNames(e={}){let{db:t,anchor:a,referenceSample:r}=await this.graph(e),{assemblyName:o}=e,s=o===a?void 0:N(this,o),c=(await t.paths()).filter(p=>o===a?p.isIndexed&&p.name.sample===r:F(u(p.name),s)).map(p=>p.name.contig);return[...new Set(c)]}keepPredicate(e,t){let a=e===void 0||e.length===0?void 0:e.map(r=>N(this,r));return a===void 0&&t===void 0?void 0:r=>k(r,a)&&(t===void 0||F(u(r),t))}async getSubgraph(e,t={}){let{signal:a}=t,{db:r,anchor:o,referenceSample:s,unreadableIndex:c}=await this.graph({signal:a}),{assemblyName:p,refName:l,start:f,end:g}=me(e);if(p!==o)throw new q(p,o);let y=await this.referenceQuery(l,{signal:a});if(!y)throw new Error(`${s} has no indexed path ${l} in this graph`);let b=this.keepPredicate(t.haplotypes);if(b!==void 0&&!r.hasHaplotypeIndex)throw new I(c);let d=await U(r,y,f,g,{context:this.getConf("context"),snarls:t.snarls??this.getConf("subgraphSnarls"),limit:this.getConf("nodeLimit"),signal:t.signal,keep:b}).catch(w=>{throw fe(w,"the graph")});return typeof d=="string"?d:te(d,{start:f,end:g},t.walkRows)}async getReads(e,t={}){let a=await this.gaf(t);return a?a.readsOver(new Set(e),t):{records:[],total:0}}async laneHaplotypes(e,t){let a=N(this,e);return(await this.getHaplotypes(t)).filter(r=>F(r.prefix,a))}async anchorFeatures(e,t){let{db:a}=await this.graph(t),{assemblyName:r,refName:o,start:s,end:c}=e,p=N(this,t.targetAssemblyName),l=C(this),f=this.keepPredicate(t.haplotypes,p),g=await this.referenceQuery(o,t),y=this.getConf("nodeLimit");return(g?await B(`Reading graph ${o}:${s.toLocaleString()}-${c.toLocaleString()}`,t.statusCallback,()=>a.getAlignments({path:g,start:s,end:c,context:this.getConf("context"),haplotypes:"all",limit:y,signal:t.signal,keep:f}).catch(d=>{throw le(d,y,c-s)})):[]).flatMap(d=>{let w=d.resolved?Ne({alignment:d,assemblyName:r,refName:o,lane:O(l,u(d.name))}):void 0;return w===void 0?[]:[w]})}async pairFeatures(e,t,a){let{db:r}=await this.graph(a),{refName:o,start:s,end:c}=e,l=(await Promise.all(t.map(async m=>({pair:m,featureSide:await this.laneHaplotypes(m.queryAssemblyName,a),mateSide:await this.laneHaplotypes(m.targetAssemblyName,a)})))).filter(({featureSide:m,mateSide:h})=>m.length>0&&h.length>0),f=new Set(l.flatMap(({featureSide:m,mateSide:h})=>[...m,...h].map(u))),g=await this.referenceQuery(o,a),y=this.getConf("nodeLimit"),b=this.getConf("context"),d=(m,h)=>r.getSubgraphs({path:m,start:s,end:c,context:h,snarls:this.getConf("subgraphSnarls"),haplotypes:"all",limit:y,signal:a.signal,keep:x=>f.has(u(x))}),w=async m=>{let h=await d(m,b).catch(S=>{throw le(S,y,c-s)}),x=Re(h,f),R=Math.ceil(x/2)+2e3;return x>0&&R>b?d(m,R).catch(S=>{if(S instanceof Q)return h;throw S}):h};return(g&&l.length>0?await B(oe(t),a.statusCallback,()=>w(g)):[]).flatMap(m=>l.flatMap(({pair:h,featureSide:x,mateSide:R})=>x.flatMap(S=>R.flatMap(de=>m.pairAlignments({target:S,query:de,bases:!1}).map(he=>Pe({pair:he,lane:h.queryAssemblyName,mateLane:h.targetAssemblyName}))))))}getFeatures(e,t={}){let a=me(e);return ee(async r=>{let{db:o,anchor:s,unreadableIndex:c}=await this.graph(t);if(!o.hasHaplotypeIndex)throw new I(c);if(a.assemblyName===s){let p=re(t),l=p.length>0?await this.pairFeatures(a,p,t):await this.anchorFeatures(a,t);for(let f of l)r.next(f)}r.complete()},t.signal)}};export{I as NoHaplotypeIndexError,ue as PairTargetError,T as default,Re as widestWalkGap};
|
|
2
|
+
//# sourceMappingURL=GbzBaseSyntenyAdapter-EGNUOKB2.js.map
|
package/dist/chunks/{GbzBaseSyntenyAdapter-TG2ANRT3.js.map → GbzBaseSyntenyAdapter-EGNUOKB2.js.map}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/@jbrowse+bandage-core@12.0.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/@jbrowse+bandage-core@12.0.2/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-FNDNSDKW.js", "../../src/GbzBaseSyntenyAdapter/companion.ts", "../../src/gaf/gafFile.ts", "../../src/GbzBaseSyntenyAdapter/GbzBaseSyntenyAdapter.ts"],
|
|
4
4
|
"sourcesContent": ["import {\n GBZ_CUT_DEFAULTS,\n NoReferenceSampleError,\n aliasedSample,\n cutWindowGFA,\n haplotypeWanted,\n referencePathQuery,\n referenceSamplesOf\n} from \"./chunk-ZKSC7QVE.js\";\nimport {\n panSNSample\n} from \"./chunk-2JL2JVZ2.js\";\n\n// src/gbzCut.ts\nimport { GBZBase } from \"@gmod/gbz-base\";\nvar HPRC_GBZ = {\n db: \"https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/v2.1/hprc-v2.1-mc-grch38/hprc-v2.1-mc-grch38.gbz.db\",\n index: \"https://jbrowse.org/demos/hprc/hprc-v2.1-mc-grch38.haplotype-index.f3.db\"\n};\nfunction gbzLocations({ db, index }) {\n return db === \"hprc\" ? { db: HPRC_GBZ.db, index: index ?? HPRC_GBZ.index } : { db, index };\n}\nfunction haplotypeIndexBeside(db) {\n const GBZ_DB = /\\.gbz\\.db$/i;\n return GBZ_DB.test(db) ? db.replace(GBZ_DB, \".haplotype-index.db\") : void 0;\n}\nfunction parseRegion(text) {\n const m = /^\\s*(\\S+?):([\\d,]+)-([\\d,]+)\\s*$/.exec(text);\n if (!m) {\n throw new Error(\n `\"${text}\" is not a 0-based region like chr6:160,614,797-160,647,758`\n );\n }\n const n = (s) => Number(s.replaceAll(\",\", \"\"));\n const region = { refName: m[1], start: n(m[2]), end: n(m[3]) };\n if (region.end <= region.start) {\n throw new Error(`\"${text}\" ends at or before it starts`);\n }\n return region;\n}\nasync function openGbz(db, index) {\n const base = await GBZBase.open({ source: db, haplotypeIndex: index });\n return { base, referenceSamples: await referenceSamplesOf(base) };\n}\nfunction referenceSample(ref, samples) {\n if (ref) {\n return aliasedSample(panSNSample(ref), samples) ?? ref;\n }\n const first = samples[0];\n if (first === void 0) {\n throw new NoReferenceSampleError(\"\", samples);\n }\n return first;\n}\nasync function cutGbzRegion({ base, referenceSamples }, src, signal) {\n const region = parseRegion(src.region);\n const sample = referenceSample(src.referenceSample, referenceSamples);\n const query = await referencePathQuery(base, sample, region.refName);\n if (!query) {\n throw new Error(`${sample} has no indexed path named ${region.refName}`);\n }\n signal?.throwIfAborted();\n const wanted = src.haplotypes?.length ? src.haplotypes : void 0;\n const text = await cutWindowGFA(base, query, region.start, region.end, {\n context: src.context ?? GBZ_CUT_DEFAULTS.context,\n snarls: src.snarls ?? GBZ_CUT_DEFAULTS.snarls,\n limit: GBZ_CUT_DEFAULTS.limit,\n signal,\n keep: wanted ? (name) => haplotypeWanted(name, wanted) : void 0\n });\n return { text, region, sample };\n}\n\nexport {\n HPRC_GBZ,\n gbzLocations,\n haplotypeIndexBeside,\n parseRegion,\n openGbz,\n cutGbzRegion\n};\n", "import { haplotypeIndexBeside } from '@jbrowse/bandage-core/gbzCut'\nimport { openLocation } from '@jbrowse/core/util/io'\n\nimport { locationName, readsSiblings, renamed } from '../locationName'\n\nimport type PluginManager from '@jbrowse/core/PluginManager'\nimport type { FileLocation } from '@jbrowse/core/util/types'\n\nexport function siblingCompanion(gbzDb: FileLocation) {\n return readsSiblings(gbzDb) && haplotypeIndexBeside(locationName(gbzDb))\n ? renamed(gbzDb, name => haplotypeIndexBeside(name)!)\n : undefined\n}\n\n// 404 is a missing file, and so is 403 from a bucket that does not let a\n// reader list it; anything else leaves the file's presence unknown\nfunction isMissing(error: unknown) {\n return (\n error instanceof Error &&\n (/\\bHTTP 40[34]\\b/.test(error.message) ||\n (error as { code?: unknown }).code === 'ENOENT')\n )\n}\n\n// `unreadable` is why a companion that may be there could not be checked, such\n// as a network error, or a server that answers a missing file without CORS\nexport async function findCompanion(\n gbzDb: FileLocation,\n pluginManager?: PluginManager,\n): Promise<{ location?: FileLocation; unreadable?: string }> {\n const candidate = siblingCompanion(gbzDb)\n if (!candidate) {\n return {}\n }\n try {\n await openLocation(candidate, pluginManager).stat()\n return { location: candidate }\n } catch (error) {\n return isMissing(error) ? {} : { unreadable: String(error) }\n }\n}\n", "import { unzip } from '@gmod/bgzf-filehandle'\nimport { parseGaf, parseGafLine } from '@jbrowse/bandage-core/gaf/parseGaf'\nimport { cachedSetup } from '@jbrowse/core/data_adapters/BaseAdapter'\n\nimport type { TabixIndexedFile } from '@gmod/tabix'\nimport type { GafRecord } from '@jbrowse/bandage-core/gaf/parseGaf'\n\ninterface WholeFile {\n stat(): Promise<{ size: number }>\n readFile(opts?: { signal?: AbortSignal }): Promise<Uint8Array>\n}\n\nexport interface GafReads {\n records: GafRecord[]\n // reads over the nodes before sampling\n total: number\n}\n\n// The tube map lays reads out on the main thread at about 40 ms per thousand\nexport const MAX_READS = 5000\n\n// An unindexed GAF is read whole, once, into the worker\nconst MAX_UNINDEXED_BYTES = 50 * 2 ** 20\n\nexport class UnindexedGafTooLargeError extends Error {\n override name = 'UnindexedGafTooLargeError'\n\n constructor(size: number) {\n super(\n `this GAF is ${(size / 2 ** 20).toFixed(0)} MB without an index; bgzip it and index it with tabix -p gaf`,\n )\n }\n}\n\n// Evenly spaced, so a pileup thins out rather than losing its right half\nfunction sample(records: GafRecord[], max: number) {\n if (records.length <= max) {\n return records\n }\n const stride = records.length / max\n return Array.from({ length: max }, (_, k) => records[Math.floor(k * stride)]!)\n}\n\nconst touches = (record: GafRecord, names: ReadonlySet<string>) =>\n record.path.some(step => names.has(step.name))\n\n// A GAF over a graph's segments: bgzipped and indexed with `tabix -p gaf`,\n// which keys each line by its lowest and highest node id and so needs numeric\n// segment names, or plain or gzipped and read whole.\nexport class GafFile {\n // Shared by every window, so the signal is cachedSetup's own, which aborts\n // once no caller is left waiting\n private whole = cachedSetup({\n setup: async ({ signal }) => {\n const { size } = await this.file.stat()\n if (size > MAX_UNINDEXED_BYTES) {\n throw new UnindexedGafTooLargeError(size)\n }\n const bytes = await this.file.readFile({ signal })\n const text = new TextDecoder().decode(\n bytes[0] === 0x1f && bytes[1] === 0x8b ? await unzip(bytes) : bytes,\n )\n return parseGaf(text)\n },\n })\n\n constructor(\n private file: WholeFile,\n private tabix?: TabixIndexedFile,\n ) {}\n\n private async readIndexed(\n tabix: TabixIndexedFile,\n names: ReadonlySet<string>,\n signal?: AbortSignal,\n ) {\n let lo = Infinity\n let hi = -Infinity\n for (const name of names) {\n const id = Number(name)\n if (Number.isInteger(id)) {\n lo = Math.min(lo, id)\n hi = Math.max(hi, id)\n }\n }\n const records: GafRecord[] = []\n if (lo <= hi) {\n // a GAF index ignores the refName, and getLines keeps a read whose node\n // ids span min..max when min < end && max >= start, hence hi + 1\n await tabix.getLines('{node}', lo, hi + 1, {\n signal,\n lineCallback: line => {\n const record = parseGafLine(line)\n if (record && touches(record, names)) {\n records.push(record)\n }\n },\n })\n }\n return records\n }\n\n async readsOver(\n names: ReadonlySet<string>,\n { signal }: { signal?: AbortSignal } = {},\n ): Promise<GafReads> {\n const records = this.tabix\n ? await this.readIndexed(this.tabix, names, signal)\n : (await this.whole({ signal })).filter(r => touches(r, names))\n return { records: sample(records, MAX_READS), total: records.length }\n }\n}\n", "import { GBZBase, SubgraphLimitError } from '@gmod/gbz-base'\nimport {\n NodeLimitError,\n cutWindowTables,\n haplotypePrefix,\n haplotypeWanted,\n nodeLimitError,\n referencePathQuery,\n referenceSamplesOf,\n resolveReferenceSample,\n} from '@jbrowse/bandage-core/gbzWindow'\nimport {\n assemblyByPanSNPrefix,\n panSNMatchesPrefix,\n resolvePanSNPrefix,\n} from '@jbrowse/bandage-core/pansn'\nimport { cachedSetup } from '@jbrowse/core/data_adapters/BaseAdapter'\nimport { getBpDisplayStr, updateStatus } from '@jbrowse/core/util'\nimport { openLocation } from '@jbrowse/core/util/io'\nimport { ObservableCreate } from '@jbrowse/core/util/rxjs'\n\nimport { findCompanion } from './companion.ts'\nimport { walkCutFor } from '../RgfaTabixAdapter/walkCut.ts'\nimport { GafFile } from '../gaf/gafFile.ts'\nimport { locationIsSet } from '../locationName.ts'\nimport { openTabixSlot } from '../panSNTabix.ts'\nimport { ComparativeAdapterBase } from '../synteny/ComparativeAdapterBase.ts'\nimport SyntenyFeature from '../synteny/SyntenyFeature.ts'\nimport {\n laneAssemblyName,\n lanePairsStatus,\n requestedPairs,\n} from '../synteny/lanePairs.ts'\nimport { laneZoomNotice } from '../synteny/laneZoomNotice.ts'\nimport { matchFeature } from '../synteny/matchFeature.ts'\n\nimport type { GbzBaseSyntenyAdapterConfig } from './configSchema.ts'\nimport type { SubgraphAdapterOptions } from '../GetSubgraph.ts'\nimport type { GafReads } from '../gaf/gafFile.ts'\nimport type { LaneFeatureOptions, LanePair } from '../synteny/lanePairs.ts'\nimport type {\n HaplotypeAlignment,\n HaplotypeRef,\n PairAlignment,\n PathName,\n PathQuery,\n Subgraph,\n} from '@gmod/gbz-base'\nimport type { BaseOptions } from '@jbrowse/core/data_adapters/BaseAdapter'\nimport type { Feature, SimpleFeatureSerialized } from '@jbrowse/core/util'\nimport type { FileLocation, Region } from '@jbrowse/core/util/types'\n\nexport class NoHaplotypeIndexError extends Error {\n override name = 'NoHaplotypeIndexError'\n\n constructor(unreadable?: string) {\n super(\n unreadable === undefined\n ? 'no haplotype index is set, so the walks cannot be named; build one with gbz-haplotype-index (cargo install gbz-haplotype-index) and set it as haplotypeIndexLocation'\n : `the haplotype index beside the graph database could not be checked (${unreadable}), so the walks cannot be named; if it is there, reload to try again, or set haplotypeIndexLocation`,\n )\n }\n}\n\ninterface GbzHaplotype {\n prefix: string\n sample: string\n haplotype: number\n contigs: string[]\n isReference: boolean\n}\n\n/**\n * One lane the header declares, in the shape MultiWaySyntenyDisplay's lane\n * picker reads: `name` is the lane's assembly name, the same string the\n * fetched features' mates carry, `label` its PanSN prefix and `group` its\n * sample, so a diploid sample's two lanes sit together\n */\ninterface GbzHeaderLane {\n name: string\n label: string\n group: string\n}\n\nexport { PairTargetError } from '../synteny/lanePairs.ts'\n\nclass HaplotypeWindowError extends Error {\n override name = 'HaplotypeWindowError'\n\n constructor(assemblyName: string, anchor: string) {\n super(\n `the graph is cut on its reference, ${anchor}; a window on ${assemblyName} has no reference coordinates to cut at. Open the graph from a ${anchor} view, and find this haplotype's lane there`,\n )\n }\n}\n\ntype ResolvedAlignment = Extract<HaplotypeAlignment, { resolved: true }>\n\n/**\n * The id of one haplotype fragment: the walk's GBWT position at its first node\n * in the window, which is a property of the graph, so the same fragment gets\n * the same id on a refetch of the same window and the display's hover and\n * selection survive it. `clipToRegion` suffixes the window.\n */\nfunction fragmentId(name: PathName, alignment: ResolvedAlignment) {\n return `${haplotypePrefix(name)}#${name.contig}@${alignment.start.node}.${alignment.start.offset}`\n}\n\nfunction fragmentFeature({\n alignment,\n assemblyName,\n refName,\n lane,\n}: {\n alignment: ResolvedAlignment\n assemblyName: string\n refName: string\n lane: string\n}) {\n const { refStart, refEnd, strand, cigar } = alignment\n if (refEnd <= refStart) {\n return undefined\n } else {\n const { name, hapStart, hapEnd } = alignment\n const id = fragmentId(name, alignment)\n const data: SimpleFeatureSerialized = {\n uniqueId: id,\n assemblyName,\n refName,\n start: refStart,\n end: refEnd,\n type: 'match',\n strand: strand === '-' ? -1 : 1,\n CIGAR: cigar,\n syntenyId: id,\n mate: {\n refName: name.contig,\n start: hapStart,\n end: hapEnd,\n assemblyName: lane,\n },\n }\n return new SyntenyFeature(data)\n }\n}\n\n// gbz-base writes the CIGAR along the target, which is the side a JBrowse\n// feature is, so it passes through unchanged\nfunction pairFeature({\n pair,\n lane,\n mateLane,\n}: {\n pair: PairAlignment\n lane: string\n mateLane: string\n}) {\n return matchFeature({\n target: {\n name: `${haplotypePrefix(pair.target)}#${pair.target.contig}`,\n assemblyName: lane,\n refName: pair.target.contig,\n start: pair.targetStart,\n end: pair.targetEnd,\n },\n query: {\n name: `${haplotypePrefix(pair.query)}#${pair.query.contig}`,\n assemblyName: mateLane,\n refName: pair.query.contig,\n start: pair.queryStart,\n end: pair.queryEnd,\n },\n strand: pair.strand,\n cigar: pair.cigar,\n matches: pair.matches,\n columns: pair.columns,\n })\n}\n\n// The longest detour a pair cut widens its context to take in\nconst BRIDGE_MAX_BP = 120_000\n\n/**\n * The widest gap, up to `BRIDGE_MAX_BP`, between two pieces of one kept walk:\n * a haplotype that left the cut's nodes for sequence the reference lacks and\n * came back. Two kept haplotypes that share that sequence only align across it\n * once its nodes are in the cut.\n */\nexport function widestWalkGap(subgraphs: Subgraph[], kept: Set<string>) {\n const byPath = new Map<string, [number, number][]>()\n for (const subgraph of subgraphs) {\n for (const { name, start, end } of subgraph.walkSpans()) {\n const prefix = haplotypePrefix(name)\n if (kept.has(prefix)) {\n const key = `${prefix}#${name.contig}`\n const spans = byPath.get(key)\n if (spans) {\n spans.push([start, end])\n } else {\n byPath.set(key, [[start, end]])\n }\n }\n }\n }\n let widest = 0\n for (const spans of byPath.values()) {\n spans.sort((a, b) => a[0] - b[0])\n for (let i = 1; i < spans.length; i++) {\n const gap = spans[i]![0] - spans[i - 1]![1]\n if (gap > 0 && gap <= BRIDGE_MAX_BP) {\n widest = Math.max(widest, gap)\n }\n }\n }\n return widest\n}\n\n// A window past the node limit fails as a zoom-in notice naming a span that\n// fits\nfunction zoomInNotice(error: unknown, what: string) {\n if (error instanceof NodeLimitError) {\n error.message = `Zoom in to about ${getBpDisplayStr(error.fitsBp)} to see ${what}`\n }\n return error\n}\n\nconst laneLimitNotice = (error: unknown, nodeLimit: number, windowBp: number) =>\n laneZoomNotice(\n zoomInNotice(nodeLimitError(error, nodeLimit, windowBp) ?? error, 'lanes'),\n windowBp,\n )\n\n// gbz-base reads whole bp; a view asks at fractional ones\nconst wholeBp = (region: Region) => ({\n ...region,\n start: Math.floor(region.start),\n end: Math.ceil(region.end),\n})\n\nexport default class GbzBaseSyntenyAdapter extends ComparativeAdapterBase<GbzBaseSyntenyAdapterConfig> {\n private graph = cachedSetup({\n label: 'Opening pangenome database',\n setup: async () => {\n const gbzDb: FileLocation = this.getConf('gbzDbLocation')\n const configured: FileLocation = this.getConf('haplotypeIndexLocation')\n const companion = locationIsSet(configured)\n ? { location: configured }\n : await findCompanion(gbzDb, this.pluginManager)\n const indexLocation = companion.location\n const db = await GBZBase.open({\n source: openLocation(gbzDb, this.pluginManager),\n haplotypeIndex: indexLocation\n ? openLocation(indexLocation, this.pluginManager)\n : undefined,\n })\n const anchor = this.getConf('assemblyNames')[0]\n if (anchor === undefined) {\n throw new Error(\n 'GbzBaseSyntenyAdapter needs assemblyNames: its first entry is the assembly the reference sample is loaded as',\n )\n }\n const referenceSamples = await referenceSamplesOf(db)\n const referenceSample = resolveReferenceSample({\n configured: this.getConf('referenceSample'),\n anchorPrefix: resolvePanSNPrefix(this, anchor),\n referenceSamples,\n })\n return {\n db,\n anchor,\n referenceSample,\n referenceSamples,\n unreadableIndex: companion.unreadable,\n }\n },\n })\n\n /**\n * The indexed reference path a window on `refName` resolves against, or\n * undefined when the reference sample has no indexed path by that contig.\n */\n private async referenceQuery(\n refName: string,\n opts: BaseOptions,\n ): Promise<PathQuery | undefined> {\n const { db, referenceSample } = await this.graph(opts)\n return referencePathQuery(db, referenceSample, refName)\n }\n\n /**\n * Every haplotype the graph carries a walk for, `sample#haplotype` with its\n * contigs, from the Paths scan the adapter already makes; the lane picker's\n * source list. Reference samples are included and flagged.\n */\n async getHaplotypes(opts: BaseOptions = {}): Promise<GbzHaplotype[]> {\n const { db, referenceSamples } = await this.graph(opts)\n const byPrefix = new Map<string, GbzHaplotype>()\n for (const path of await db.paths()) {\n const prefix = haplotypePrefix(path.name)\n const entry = byPrefix.get(prefix)\n if (entry) {\n if (!entry.contigs.includes(path.name.contig)) {\n entry.contigs.push(path.name.contig)\n }\n } else {\n byPrefix.set(prefix, {\n prefix,\n sample: path.name.sample,\n haplotype: path.name.haplotype,\n contigs: [path.name.contig],\n isReference: referenceSamples.includes(path.name.sample),\n })\n }\n }\n return [...byPrefix.values()]\n }\n\n /**\n * `lanes` is every haplotype but the reference sample's own, which is the\n * anchor rather than a lane, declared up front so the display can offer the\n * whole graph's haplotypes before a fetch has placed any of them.\n */\n async getHeader(opts: BaseOptions = {}) {\n const { anchor, referenceSample } = await this.graph(opts)\n const asmByPrefix = assemblyByPanSNPrefix(this)\n const lanes: GbzHeaderLane[] = []\n for (const haplotype of await this.getHaplotypes(opts)) {\n if (haplotype.sample !== referenceSample) {\n lanes.push({\n name: laneAssemblyName(asmByPrefix, haplotype.prefix),\n label: haplotype.prefix,\n group: haplotype.sample,\n })\n }\n }\n return {\n hasCoarseTier: false,\n anchorAssemblyName: anchor,\n lanes,\n }\n }\n\n async getRefNames(opts: BaseOptions = {}) {\n const { db, anchor, referenceSample } = await this.graph(opts)\n const { assemblyName } = opts\n const prefix =\n assemblyName === anchor\n ? undefined\n : resolvePanSNPrefix(this, assemblyName)\n const contigs = (await db.paths())\n .filter(path =>\n assemblyName === anchor\n ? path.isIndexed && path.name.sample === referenceSample\n : panSNMatchesPrefix(haplotypePrefix(path.name), prefix),\n )\n .map(path => path.name.contig)\n return [...new Set(contigs)]\n }\n\n /**\n * The predicate gbz-base builds a window for, from the lanes a fetch asks\n * for. With a companion whose stray rows cover the window gbz-base walks\n * only the wanted haplotypes; otherwise it names every walk and keeps the\n * ones the predicate accepts, and throws rather than guess when a walk has\n * no name. Either way a cut holds those walks, the reference, and the nodes\n * they visit. Undefined when every haplotype is wanted.\n */\n //\n // `targetPrefix` is a pairwise view's one lane, and it belongs in here: left\n // to filter what came back, it handed gbz-base no predicate, and every\n // haplotype in the graph was walked for one to be kept.\n private keepPredicate(\n haplotypes: string[] | undefined,\n targetPrefix?: string,\n ) {\n const wantedPrefixes =\n haplotypes === undefined || haplotypes.length === 0\n ? undefined\n : haplotypes.map(lane => resolvePanSNPrefix(this, lane))\n return wantedPrefixes === undefined && targetPrefix === undefined\n ? undefined\n : (name: PathName) =>\n haplotypeWanted(name, wantedPrefixes) &&\n (targetPrefix === undefined ||\n panSNMatchesPrefix(haplotypePrefix(name), targetPrefix))\n }\n\n /**\n * The graph view's cut of the window, as tables: the reference walk, every\n * top-level snarl contained in it, and one walk per haplotype, PanSN-named\n * when the database (or its companion) carries the haplotype index and\n * `unknown#N` otherwise. The reference walk is the first, which is the one\n * the view anchors on by default. With `haplotypes` the walks are that\n * set's and the nodes those walks visit, the reference walk kept. With\n * `walkRows` the rows' runs come along, as on a walk-file cut.\n *\n * Only a window on the anchor can be cut: a haplotype lane's coordinates\n * are its own contig's, and the graph is indexed for random access on the\n * reference sample's paths alone.\n */\n async getSubgraph(region: Region, opts: SubgraphAdapterOptions = {}) {\n const { signal } = opts\n const { db, anchor, referenceSample, unreadableIndex } = await this.graph({\n signal,\n })\n const { assemblyName, refName, start, end } = wholeBp(region)\n if (assemblyName !== anchor) {\n throw new HaplotypeWindowError(assemblyName, anchor)\n }\n const query = await this.referenceQuery(refName, { signal })\n if (!query) {\n throw new Error(\n `${referenceSample} has no indexed path ${refName} in this graph`,\n )\n }\n const keep = this.keepPredicate(opts.haplotypes)\n if (keep !== undefined && !db.hasHaplotypeIndex) {\n throw new NoHaplotypeIndexError(unreadableIndex)\n }\n const cut = await cutWindowTables(db, query, start, end, {\n context: this.getConf('context'),\n snarls: opts.snarls ?? this.getConf('subgraphSnarls'),\n limit: this.getConf('nodeLimit'),\n signal: opts.signal,\n keep,\n }).catch((error: unknown) => {\n throw zoomInNotice(error, 'the graph')\n })\n return typeof cut === 'string'\n ? cut\n : walkCutFor(cut, { start, end }, opts.walkRows)\n }\n\n private gaf = cachedSetup({\n label: 'Opening reads',\n setup: async () => {\n const location: FileLocation = this.getConf('readsLocation')\n const index: FileLocation = this.getConf(['readsIndex', 'location'])\n return locationIsSet(location)\n ? new GafFile(\n openLocation(location, this.pluginManager),\n locationIsSet(index)\n ? openTabixSlot(this, ['readsLocation'], ['readsIndex'])\n : undefined,\n )\n : undefined\n },\n })\n\n /**\n * The reads over a cut's segments, from `readsLocation`, sampled down to\n * what the tube map lays out at interactive speed\n */\n async getReads(\n nodeNames: string[],\n opts: BaseOptions = {},\n ): Promise<GafReads> {\n const gaf = await this.gaf(opts)\n return gaf\n ? gaf.readsOver(new Set(nodeNames), opts)\n : { records: [], total: 0 }\n }\n\n private async laneHaplotypes(\n assemblyName: string,\n opts: BaseOptions,\n ): Promise<HaplotypeRef[]> {\n const prefix = resolvePanSNPrefix(this, assemblyName)\n return (await this.getHaplotypes(opts)).filter(haplotype =>\n panSNMatchesPrefix(haplotype.prefix, prefix),\n )\n }\n\n private async anchorFeatures(region: Region, opts: LaneFeatureOptions) {\n const { db } = await this.graph(opts)\n const { assemblyName, refName, start, end } = region\n const targetPrefix = resolvePanSNPrefix(this, opts.targetAssemblyName)\n const asmByPrefix = assemblyByPanSNPrefix(this)\n const keep = this.keepPredicate(opts.haplotypes, targetPrefix)\n const query = await this.referenceQuery(refName, opts)\n const nodeLimit: number = this.getConf('nodeLimit')\n const alignments = query\n ? await updateStatus(\n `Reading graph ${refName}:${start.toLocaleString()}-${end.toLocaleString()}`,\n opts.statusCallback,\n () =>\n db\n .getAlignments({\n path: query,\n start,\n end,\n context: this.getConf('context'),\n haplotypes: 'all',\n limit: nodeLimit,\n signal: opts.signal,\n keep,\n })\n .catch((error: unknown) => {\n throw laneLimitNotice(error, nodeLimit, end - start)\n }),\n )\n : []\n return alignments.flatMap(alignment => {\n const feature = alignment.resolved\n ? fragmentFeature({\n alignment,\n assemblyName,\n refName,\n lane: laneAssemblyName(\n asmByPrefix,\n haplotypePrefix(alignment.name),\n ),\n })\n : undefined\n return feature === undefined ? [] : [feature]\n })\n }\n\n /**\n * Each pair's two lanes cut out of the anchor window alone, all pairs in one\n * cut, and each walk of a pair's query lane aligned to each walk of its\n * target lane on the nodes both visit, with no base compared. A pair's\n * records sit on its query lane's contigs, the lane the display draws on top.\n *\n * Whether the index has anchor rows changes only how fast gbz-base finds\n * the walks: both routes cut the same pieces.\n */\n private async pairFeatures(\n region: Region,\n pairs: LanePair[],\n opts: LaneFeatureOptions,\n ) {\n const { db } = await this.graph(opts)\n const { refName, start, end } = region\n const sides = await Promise.all(\n pairs.map(async pair => ({\n pair,\n featureSide: await this.laneHaplotypes(pair.queryAssemblyName, opts),\n mateSide: await this.laneHaplotypes(pair.targetAssemblyName, opts),\n })),\n )\n const answerable = sides.filter(\n ({ featureSide, mateSide }) =>\n featureSide.length > 0 && mateSide.length > 0,\n )\n const kept = new Set(\n answerable.flatMap(({ featureSide, mateSide }) =>\n [...featureSide, ...mateSide].map(haplotypePrefix),\n ),\n )\n const query = await this.referenceQuery(refName, opts)\n const nodeLimit: number = this.getConf('nodeLimit')\n const baseContext: number = this.getConf('context')\n const cut = (path: PathQuery, context: number) =>\n db.getSubgraphs({\n path,\n start,\n end,\n context,\n snarls: this.getConf('subgraphSnarls'),\n haplotypes: 'all',\n limit: nodeLimit,\n signal: opts.signal,\n keep: name => kept.has(haplotypePrefix(name)),\n })\n // a cut past the node limit for the wider context keeps the first one\n const bridged = async (path: PathQuery) => {\n const subgraphs = await cut(path, baseContext).catch((error: unknown) => {\n throw laneLimitNotice(error, nodeLimit, end - start)\n })\n const gap = widestWalkGap(subgraphs, kept)\n const context = Math.ceil(gap / 2) + 2000\n return gap > 0 && context > baseContext\n ? cut(path, context).catch((error: unknown) => {\n if (error instanceof SubgraphLimitError) {\n return subgraphs\n }\n throw error\n })\n : subgraphs\n }\n const subgraphs =\n query && answerable.length > 0\n ? await updateStatus(lanePairsStatus(pairs), opts.statusCallback, () =>\n bridged(query),\n )\n : []\n return subgraphs.flatMap(subgraph =>\n answerable.flatMap(({ pair, featureSide, mateSide }) =>\n featureSide.flatMap(target =>\n mateSide.flatMap(mate =>\n subgraph\n .pairAlignments({ target, query: mate, bases: false })\n .map(alignment =>\n pairFeature({\n pair: alignment,\n lane: pair.queryAssemblyName,\n mateLane: pair.targetAssemblyName,\n }),\n ),\n ),\n ),\n ),\n )\n }\n\n getFeatures(asked: Region, opts: LaneFeatureOptions = {}) {\n const region = wholeBp(asked)\n return ObservableCreate<Feature>(async observer => {\n const { db, anchor, unreadableIndex } = await this.graph(opts)\n if (!db.hasHaplotypeIndex) {\n throw new NoHaplotypeIndexError(unreadableIndex)\n }\n // the graph is indexed on its reference alone, so a window on a\n // haplotype lane has no answer: a lane pair is read inside the anchor's\n if (region.assemblyName === anchor) {\n const pairs = requestedPairs(opts)\n const features =\n pairs.length > 0\n ? await this.pairFeatures(region, pairs, opts)\n : await this.anchorFeatures(region, opts)\n for (const feature of features) {\n observer.next(feature)\n }\n }\n observer.complete()\n }, opts.signal)\n }\n}\n"],
|
|
5
5
|
"mappings": "o0BAsBA,SAASA,EAAqBC,EAAI,CAChC,IAAMC,EAAS,cACf,OAAOA,EAAO,KAAKD,CAAE,EAAIA,EAAG,QAAQC,EAAQ,qBAAqB,EAAI,MACvE,CCjBO,SAASC,GAAiBC,EAAqB,CACpD,OAAOC,EAAcD,CAAK,GAAKE,EAAqBC,EAAaH,CAAK,CAAC,EACnEI,EAAQJ,EAAOK,GAAQH,EAAqBG,CAAI,CAAE,EAClD,MACN,CAIA,SAASC,GAAUC,EAAgB,CACjC,OACEA,aAAiB,QAChB,kBAAkB,KAAKA,EAAM,OAAO,GAClCA,EAA6B,OAAS,SAE7C,CAIA,eAAsBC,GACpBR,EACAS,EAC2D,CAC3D,IAAMC,EAAYX,GAAiBC,CAAK,EACxC,GAAI,CAACU,EACH,MAAO,CAAC,EAEV,GAAI,CACF,aAAMC,EAAaD,EAAWD,CAAa,EAAE,KAAK,EAC3C,CAAE,SAAUC,CAAU,CAC/B,OAASH,EAAO,CACd,OAAOD,GAAUC,CAAK,EAAI,CAAC,EAAI,CAAE,WAAY,OAAOA,CAAK,CAAE,CAC7D,CACF,CCrBO,IAAMK,GAAY,IAGnBC,GAAsB,GAAK,GAAK,GAEz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EAC5C,QAAW0B,KAAWgB,EACpBF,EAAS,KAAKd,CAAO,CAEzB,CACAc,EAAS,SAAS,CACpB,EAAGxC,EAAK,MAAM,CAChB,CACF",
|
|
6
6
|
"names": ["haplotypeIndexBeside", "db", "GBZ_DB", "siblingCompanion", "gbzDb", "readsSiblings", "haplotypeIndexBeside", "locationName", "renamed", "name", "isMissing", "error", "findCompanion", "pluginManager", "candidate", "openLocation", "MAX_READS", "MAX_UNINDEXED_BYTES", "UnindexedGafTooLargeError", "size", "sample", "records", "max", "stride", "_", "k", "touches", "record", "names", "step", "GafFile", "file", "tabix", "cachedSetup", "signal", "bytes", "text", "unzip", "parseGaf", "lo", "hi", "name", "id", "line", "parseGafLine", "r", "NoHaplotypeIndexError", "unreadable", "HaplotypeWindowError", "assemblyName", "anchor", "fragmentId", "name", "alignment", "haplotypePrefix", "fragmentFeature", "refName", "lane", "refStart", "refEnd", "strand", "cigar", "hapStart", "hapEnd", "id", "data", "SyntenyFeature", "pairFeature", "pair", "mateLane", "matchFeature", "BRIDGE_MAX_BP", "widestWalkGap", "subgraphs", "kept", "byPath", "subgraph", "start", "end", "prefix", "key", "spans", "widest", "a", "b", "i", "gap", "zoomInNotice", "error", "what", "NodeLimitError", "getBpDisplayStr", "laneLimitNotice", "nodeLimit", "windowBp", "laneZoomNotice", "nodeLimitError", "wholeBp", "region", "GbzBaseSyntenyAdapter", "ComparativeAdapterBase", "cachedSetup", "gbzDb", "configured", "companion", "locationIsSet", "findCompanion", "indexLocation", "db", "GBZBase", "openLocation", "referenceSamples", "referenceSamplesOf", "referenceSample", "resolveReferenceSample", "resolvePanSNPrefix", "location", "index", "GafFile", "openTabixSlot", "opts", "referencePathQuery", "byPrefix", "path", "entry", "asmByPrefix", "assemblyByPanSNPrefix", "lanes", "haplotype", "laneAssemblyName", "contigs", "panSNMatchesPrefix", "haplotypes", "targetPrefix", "wantedPrefixes", "haplotypeWanted", "signal", "unreadableIndex", "query", "keep", "cut", "cutWindowTables", "walkCutFor", "nodeNames", "gaf", "updateStatus", "feature", "pairs", "answerable", "featureSide", "mateSide", "baseContext", "context", "bridged", "SubgraphLimitError", "lanePairsStatus", "target", "mate", "asked", "ObservableCreate", "observer", "requestedPairs", "features"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{b as C}from"./chunk-RHYBJCA4.js";import"./chunk-2PNGGCQJ.js";import"./chunk-JOYKGTDE.js";import"./chunk-3EQNVA3F.js";import{p as d}from"./chunk-NLS74JSZ.js";import"./chunk-ZGTG74GE.js";import"./chunk-XWCLYB5C.js";import"./chunk-XB5KC2EZ.js";import"./chunk-2V75YPTT.js";import"./chunk-CJAV55QB.js";import"./chunk-FY7X6253.js";import"./chunk-YBLNN5FU.js";import"./chunk-X7YIGIYW.js";import"./chunk-JMRW3IGK.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import"./chunk-3VGXCEMQ.js";import"./chunk-IKJZPPOA.js";import"./chunk-3WG3GF2A.js";import"./chunk-J5RMHLFJ.js";import{i as L}from"./chunk-NIEZKWQV.js";import{A as l,F as G,H as p,e as s,j as v,o as n,x as y}from"./chunk-5Z4VIKXZ.js";import{a as h,b as e,c as r,d as i}from"./chunk-JMBDTNUR.js";var N=d()({paper:{padding:16,margin:8,maxWidth:560,marginInline:"auto",display:"flex",flexDirection:"column",gap:12},row:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8}}),S=i(function({model:a}){let{classes:t}=N();return!a.error&&!a.loadCanceled?r(l,{className:t.paper,"data-testid":"graph-genome-loading",children:[r("div",{className:t.row,children:[e(v,{variant:"h6",message:a.statusMessage||void 0}),a.canCancelLoad?e(n,{size:"small","data-testid":"graph-genome-cancel",onClick:()=>{a.cancelLoad()},children:"Cancel"}):null]}),e(y,{variant:"indeterminate"})]}):a.error?e(l,{className:t.paper,children:e(s,{error:a.error,onReset:()=>{a.retryLoad()}})}):e(l,{className:t.paper,"data-testid":"graph-genome-load-canceled",children:r("div",{className:t.row,children:[e(p,{variant:"h6",children:"Loading canceled"}),e(n,{variant:"contained",size:"small","data-testid":"graph-genome-retry",onClick:()=>{a.retryLoad()},children:"Retry"})]})})}),f=S;var T=`H VN:Z:1.0
|
|
2
2
|
S 1 ACGT
|
|
3
3
|
S 2 GGCC
|
|
4
4
|
S 3 TTAA
|
|
@@ -7,4 +7,4 @@ L 1 + 2 + 0M
|
|
|
7
7
|
L 1 + 3 + 0M
|
|
8
8
|
L 2 + 4 + 0M
|
|
9
9
|
L 3 + 4 + 0M`,E=d()({column:{display:"flex",flexDirection:"column",gap:8},rowEnd:{display:"flex",gap:8,alignItems:"flex-end"},rowCenter:{display:"flex",gap:8,alignItems:"center"},flex1:{flex:1},paper:{padding:16,margin:8,maxWidth:560,marginInline:"auto"},header:{marginBottom:12},footer:{marginTop:12,display:"flex",justifyContent:"flex-end"}}),F=i(function({model:a}){let{classes:t}=E(),[m,w]=L("");function u(){let o=m.trim();o&&a.openGfaLocation({uri:o,locationType:"UriLocation"})}function M(o){let c=o.target.files?.[0];o.target.value="",c&&a.loadGFAFile(c,c.name)}return r(l,{className:t.paper,children:[e("div",{className:t.header,children:e(p,{variant:"h6",children:"Load a GFA graph"})}),r("div",{className:t.column,children:[r("div",{className:t.rowCenter,children:[r(n,{variant:"outlined",component:"label",size:"small",children:["Choose file",e("input",{type:"file",accept:".gfa,.gfa1,.gfa2,.gz",hidden:!0,onChange:o=>{M(o)}})]}),e(p,{variant:"caption",color:"text.secondary",children:"Whole-file GFA; best for small/medium graphs."})]}),r("div",{className:t.rowEnd,children:[e(G,{size:"small",label:"URL",placeholder:"https://example.com/graph.gfa",value:m,onChange:o=>{w(o.target.value)},onKeyDown:o=>{o.key==="Enter"&&u()},className:t.flex1}),e(n,{variant:"contained",onClick:()=>{u()},disabled:!m.trim(),children:"Open"})]})]}),e("div",{className:t.footer,children:e(n,{size:"small",onClick:()=>{a.loadGFA(T,"Example graph")},children:"Load 4-node example"})}),a.error?e(s,{error:a.error}):null]})}),x=F;var B=i(function({model:a}){return a.hasGraph?e(C,{model:a}):a.canRetryLoad?e(f,{model:a}):r(h,{children:[a.isLoading?e(f,{model:a}):null,e("div",{hidden:a.isLoading,children:e(x,{model:a})})]})}),q=B;export{q as default};
|
|
10
|
-
//# sourceMappingURL=GraphGenomeView-
|
|
10
|
+
//# sourceMappingURL=GraphGenomeView-667ZUNDI.js.map
|
package/dist/chunks/{GraphTrackSettingsDialog-TY3TNJNT.js → GraphTrackSettingsDialog-7M3Q635V.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as G,b as L}from"./chunk-
|
|
1
|
+
import{a as G,b as L}from"./chunk-2PNGGCQJ.js";import{b as v,c as x,p as f}from"./chunk-NLS74JSZ.js";import"./chunk-XB5KC2EZ.js";import"./chunk-2V75YPTT.js";import"./chunk-JMRW3IGK.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import"./chunk-3VGXCEMQ.js";import"./chunk-IKJZPPOA.js";import{h as g,i as d}from"./chunk-NIEZKWQV.js";import{F as m,H as h,n as H}from"./chunk-5Z4VIKXZ.js";import{b as p,c as l,d as u}from"./chunk-JMBDTNUR.js";var k=f()({section:{marginBottom:24}}),w=[{value:"0",label:"None"},{value:"1",label:"1 hop"},{value:"2",label:"2 hops"}],F=u(function({model:t}){let{classes:n}=k(),e=t.sourceAdapter;return e?.type==="RgfaTabixAdapter"&&!v(e)?l("div",{className:n.section,children:[p(G,{label:"Graph context",sx:{minWidth:200},value:String(t.subgraphContext),options:w,testId:"graph-context-select",onChange:a=>{t.setSubgraphContext(Number(a)),t.recut()}}),p(h,{variant:"caption",component:"div",color:"text.secondary",children:"How far the cut follows links out of the region. At none, a detour that leaves the window draws as two stubs. No effect on gfa-to-tabix's default anchored index."})]}):null}),M=F;var I=f()({section:{marginBottom:24}});function A(o){return o.split(/[\s,]+/).filter(t=>t!=="")}var N=(o,t)=>o.join(`
|
|
2
2
|
`)===t.join(`
|
|
3
3
|
`);function P(o,t){let n=o.cutHaplotypes??[],[e,a]=d(n);return N(n,e)||(a(n),t()),r=>{N(r,n)||(a(r),o.setSubgraphHaplotypes(r),o.recut())}}var D=u(function({model:t}){let[n,e]=d(t.cutHaplotypes?.join(", ")??""),a=P(t,()=>{e(t.cutHaplotypes?.join(", ")??"")}),r=()=>{a(A(n))};return p(m,{fullWidth:!0,label:"Haplotypes",placeholder:"every haplotype",value:n,slotProps:{htmlInput:{"data-testid":"graph-haplotypes-field"}},onChange:i=>{e(i.target.value)},onBlur:()=>{r()},onKeyDown:i=>{i.key==="Enter"&&r()}})}),B=u(function({model:t,names:n}){let[e,a]=d(t.cutHaplotypes??[]),r=g(e),i=g(""),[S,b]=d(!1),C=P(t,()=>{r.current=t.cutHaplotypes??[],a(r.current)});return p(H,{multiple:!0,freeSolo:!0,disableCloseOnSelect:!0,options:n,value:e,open:S,onOpen:()=>{b(!0)},onInputChange:(c,s)=>{i.current=s},onClose:(c,s)=>{b(!1);let y=i.current.trim();s==="blur"&&y&&!r.current.includes(y)&&(r.current=[...r.current,y],a(r.current)),C(r.current)},onChange:(c,s)=>{r.current=s,a(s),S||C(s)},renderInput:c=>p(m,{...c,label:"Haplotypes",placeholder:e.length===0?"every haplotype":void 0,slotProps:{...c.slotProps,htmlInput:{...c.slotProps.htmlInput,"data-testid":"graph-haplotypes-field"}}})})}),O=u(function({model:t}){let{classes:n}=I(),e=t.haplotypeNames,a=t.sourceAdapter;return a&&x(a)?l("div",{className:n.section,children:[e?p(B,{model:t,names:e}):p(D,{model:t}),l(h,{variant:"caption",component:"div",color:"text.secondary",children:[e?`Which of the graph's ${e.length.toLocaleString()} haplotypes to cut, or a PanSN prefix (HG002 for both).`:"Which haplotypes to cut, as lane assembly names or PanSN prefixes (HG002#1, or HG002 for both) separated by commas."," ","Empty is every haplotype."]})]}):null}),T=O;function R({model:o,onClose:t}){return l(L,{model:o,onClose:t,children:[p(M,{model:o}),p(T,{model:o})]})}export{R as default};
|
|
4
|
-
//# sourceMappingURL=GraphTrackSettingsDialog-
|
|
4
|
+
//# sourceMappingURL=GraphTrackSettingsDialog-7M3Q635V.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/LinearGraphDisplay/components/SubgraphContextSelect.tsx", "../../src/LinearGraphDisplay/components/SubgraphHaplotypesField.tsx", "../../src/LinearGraphDisplay/components/GraphTrackSettingsDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["import { Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport LabelledSelect from '../../GraphGenomeView/components/LabelledSelect'\nimport { walkIndexed } from '../../graphTrackConfig'\n\nimport type { LinearGraphCutModel } from '../model'\n\nconst useStyles = makeStyles()({\n section: {\n marginBottom: 24,\n },\n})\n\n// Only an rGFA cut from segment rows reads hops: a GBZ cut widens by its\n// adapter's bp `context`, and a walk-indexed cut follows its walks.\n// Hops past the region's own segments, each costing a tabix query per\n// off-reference segment already reached. One is the default: at none a single\n// detour draws as two unrelated stubs, which is a wrong picture of the graph\n// rather than a cheaper one. Two exists for a graph whose alleles have alleles\n// (HPRC's amylase window keeps growing at 2, the E. coli paa locus does not), and\n// it stops there because a frontier is still not a bubble decomposition. Cut an\n// exact slice with gfatools when that is what is wanted.\nconst SUBGRAPH_CONTEXTS = [\n { value: '0', label: 'None' },\n { value: '1', label: '1 hop' },\n { value: '2', label: '2 hops' },\n]\n\nconst SubgraphContextSelect = observer(function SubgraphContextSelect({\n model,\n}: {\n model: LinearGraphCutModel\n}) {\n const { classes } = useStyles()\n const adapter = model.sourceAdapter\n return adapter?.type === 'RgfaTabixAdapter' && !walkIndexed(adapter) ? (\n <div className={classes.section}>\n <LabelledSelect\n label=\"Graph context\"\n sx={{ minWidth: 200 }}\n value={String(model.subgraphContext)}\n options={SUBGRAPH_CONTEXTS}\n testId=\"graph-context-select\"\n onChange={hops => {\n model.setSubgraphContext(Number(hops))\n model.recut()\n }}\n />\n <Typography variant=\"caption\" component=\"div\" color=\"text.secondary\">\n How far the cut follows links out of the region. At none, a detour that\n leaves the window draws as two stubs. No effect on gfa-to-tabix's\n default anchored index.\n </Typography>\n </div>\n ) : null\n})\n\nexport default SubgraphContextSelect\n", "import { useRef, useState } from 'react'\n\nimport { Autocomplete, TextField, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport { cutsByHaplotype } from '../../graphTrackConfig'\n\nimport type { LinearGraphCutModel } from '../model'\n\nconst useStyles = makeStyles()({\n section: {\n marginBottom: 24,\n },\n})\n\nfunction parseHaplotypeList(text: string) {\n return text.split(/[\\s,]+/).filter(name => name !== '')\n}\n\nconst sameList = (a: readonly string[], b: readonly string[]) =>\n a.join('\\n') === b.join('\\n')\n\n// The cut's set, and the last one this field saw: an outside change (a\n// restored session, a launch) resets the draft, while the field's own apply\n// records what it set first, so it keeps its focus and draft\nfunction useCutHaplotypes(model: LinearGraphCutModel, reset: () => void) {\n const current = model.cutHaplotypes ?? []\n const [seen, setSeen] = useState(current)\n if (!sameList(current, seen)) {\n setSeen(current)\n reset()\n }\n return (haplotypes: string[]) => {\n if (!sameList(haplotypes, current)) {\n setSeen(haplotypes)\n model.setSubgraphHaplotypes(haplotypes)\n model.recut()\n }\n }\n}\n\nconst HaplotypeListField = observer(function HaplotypeListField({\n model,\n}: {\n model: LinearGraphCutModel\n}) {\n const [draft, setDraft] = useState(model.cutHaplotypes?.join(', ') ?? '')\n const setCut = useCutHaplotypes(model, () => {\n setDraft(model.cutHaplotypes?.join(', ') ?? '')\n })\n const apply = () => {\n setCut(parseHaplotypeList(draft))\n }\n return (\n <TextField\n fullWidth\n label=\"Haplotypes\"\n placeholder=\"every haplotype\"\n value={draft}\n slotProps={{ htmlInput: { 'data-testid': 'graph-haplotypes-field' } }}\n onChange={e => {\n setDraft(e.target.value)\n }}\n onBlur={() => {\n apply()\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n apply()\n }\n }}\n />\n )\n})\n\n// The haplotypes a walk-indexed graph's header names, searched as typed. A\n// typed prefix the list lacks (HG002 for both haplotypes) is kept too, on\n// Enter or when the field loses focus. The set applies when the list closes\n// or, with the list closed, as it changes. Not MUI's `autoSelect`: in a\n// multiple select its blur toggles the highlighted option, so a pick made by\n// keyboard was dropped again on Tab.\nconst HaplotypePickField = observer(function HaplotypePickField({\n model,\n names,\n}: {\n model: LinearGraphCutModel\n names: string[]\n}) {\n const [draft, setDraft] = useState(model.cutHaplotypes ?? [])\n const draftRef = useRef(draft)\n const typed = useRef('')\n const [open, setOpen] = useState(false)\n const apply = useCutHaplotypes(model, () => {\n draftRef.current = model.cutHaplotypes ?? []\n setDraft(draftRef.current)\n })\n return (\n <Autocomplete\n multiple\n freeSolo\n disableCloseOnSelect\n options={names}\n value={draft}\n open={open}\n onOpen={() => {\n setOpen(true)\n }}\n onInputChange={(_, text) => {\n typed.current = text\n }}\n onClose={(_, reason) => {\n setOpen(false)\n const text = typed.current.trim()\n if (reason === 'blur' && text && !draftRef.current.includes(text)) {\n draftRef.current = [...draftRef.current, text]\n setDraft(draftRef.current)\n }\n apply(draftRef.current)\n }}\n onChange={(_, value) => {\n draftRef.current = value\n setDraft(value)\n if (!open) {\n apply(value)\n }\n }}\n renderInput={params => (\n <TextField\n {...params}\n label=\"Haplotypes\"\n placeholder={draft.length === 0 ? 'every haplotype' : undefined}\n slotProps={{\n ...params.slotProps,\n htmlInput: {\n ...params.slotProps.htmlInput,\n 'data-testid': 'graph-haplotypes-field',\n },\n }}\n />\n )}\n />\n )\n})\n\n// Only a GBZ cut and a walk-indexed rGFA cut read the set\nconst SubgraphHaplotypesField = observer(function SubgraphHaplotypesField({\n model,\n}: {\n model: LinearGraphCutModel\n}) {\n const { classes } = useStyles()\n const names = model.haplotypeNames\n const adapter = model.sourceAdapter\n return adapter && cutsByHaplotype(adapter) ? (\n <div className={classes.section}>\n {names ? (\n <HaplotypePickField model={model} names={names} />\n ) : (\n <HaplotypeListField model={model} />\n )}\n <Typography variant=\"caption\" component=\"div\" color=\"text.secondary\">\n {names\n ? `Which of the graph's ${names.length.toLocaleString()} haplotypes to cut, or a PanSN prefix (HG002 for both).`\n : 'Which haplotypes to cut, as lane assembly names or PanSN prefixes (HG002#1, or HG002 for both) separated by commas.'}{' '}\n Empty is every haplotype.\n </Typography>\n </div>\n ) : null\n})\n\nexport default SubgraphHaplotypesField\n", "import SubgraphContextSelect from './SubgraphContextSelect'\nimport SubgraphHaplotypesField from './SubgraphHaplotypesField'\nimport GraphSettingsDialog from '../../GraphGenomeView/components/GraphSettingsDialog'\n\nimport type { LinearGraphCutModel } from '../model'\n\nexport default function GraphTrackSettingsDialog({\n model,\n onClose,\n}: {\n model: LinearGraphCutModel\n onClose: () => void\n}) {\n return (\n <GraphSettingsDialog model={model} onClose={onClose}>\n <SubgraphContextSelect model={model} />\n <SubgraphHaplotypesField model={model} />\n </GraphSettingsDialog>\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "ocASA,IAAMA,EAAYC,EAAW,EAAE,CAC7B,QAAS,CACP,aAAc,EAChB,CACF,CAAC,EAWKC,EAAoB,CACxB,CAAE,MAAO,IAAK,MAAO,MAAO,EAC5B,CAAE,MAAO,IAAK,MAAO,OAAQ,EAC7B,CAAE,MAAO,IAAK,MAAO,QAAS,CAChC,EAEMC,EAAwBC,EAAS,SAA+B,CACpE,MAAAC,CACF,EAEG,CACD,GAAM,CAAE,QAAAC,CAAQ,EAAIN,EAAU,EACxBO,EAAUF,EAAM,cACtB,OAAOE,GAAS,OAAS,oBAAsB,CAACC,EAAYD,CAAO,EACjEE,EAAC,OAAI,UAAWH,EAAQ,QACtB,UAAAI,EAACC,EAAA,CACC,MAAM,gBACN,GAAI,CAAE,SAAU,GAAI,EACpB,MAAO,OAAON,EAAM,eAAe,EACnC,QAASH,EACT,OAAO,uBACP,SAAUU,GAAQ,CAChBP,EAAM,mBAAmB,O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C,EAA0BpB,EAAS,SAAiC,CACxE,MAAAR,CACF,EAEG,CACD,GAAM,CAAE,QAAA6B,CAAQ,EAAItC,EAAU,EACxB0B,EAAQjB,EAAM,eACd8B,EAAU9B,EAAM,cACtB,OAAO8B,GAAWC,EAAgBD,CAAO,EACvCE,EAAC,OAAI,UAAWH,EAAQ,QACrB,UAAAZ,EACCJ,EAACG,EAAA,CAAmB,MAAOhB,EAAO,MAAOiB,EAAO,EAEhDJ,EAACN,EAAA,CAAmB,MAAOP,EAAO,EAEpCgC,EAACC,EAAA,CAAW,QAAQ,UAAU,UAAU,MAAM,MAAM,iBACjD,UAAAhB,EACG,wBAAwBA,EAAM,OAAO,eAAe,CAAC,0DACrD,sHAAuH,IAAI,6BAEjI,GACF,EACE,IACN,CAAC,EAEMiB,EAAQN,ECrKA,SAARO,EAA0C,CAC/C,MAAAC,EACA,QAAAC,CACF,EAGG,CACD,OACEC,EAACC,EAAA,CAAoB,MAAOH,EAAO,QAASC,EAC1C,UAAAG,EAACC,EAAA,CAAsB,MAAOL,EAAO,EACrCI,EAACE,EAAA,CAAwB,MAAON,EAAO,GACzC,CAEJ",
|
|
6
6
|
"names": ["useStyles", "makeStyles", "SUBGRAPH_CONTEXTS", "SubgraphContextSelect", "observer", "model", "classes", "adapter", "walkIndexed", "jsxs", "jsx", "LabelledSelect", "hops", "Typography", "SubgraphContextSelect_default", "useStyles", "makeStyles", "parseHaplotypeList", "text", "name", "sameList", "a", "b", "useCutHaplotypes", "model", "reset", "current", "seen", "setSeen", "useState", "haplotypes", "HaplotypeListField", "observer", "draft", "setDraft", "setCut", "apply", "jsx", "TextField", "e", "HaplotypePickField", "names", "draftRef", "useRef", "typed", "open", "setOpen", "Autocomplete", "_", "reason", "value", "params", "SubgraphHaplotypesField", "classes", "adapter", "cutsByHaplotype", "jsxs", "Typography", "SubgraphHaplotypesField_default", "GraphTrackSettingsDialog", "model", "onClose", "jsxs", "GraphSettingsDialog_default", "jsx", "SubgraphContextSelect_default", "SubgraphHaplotypesField_default"]
|
|
7
7
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{x as v,y as C}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=HighlightColorDialog-
|
|
1
|
+
import{x as v,y as C}from"./chunk-XWCLYB5C.js";import"./chunk-2V75YPTT.js";import"./chunk-JMRW3IGK.js";import"./chunk-5RHNR3TH.js";import{F as g,H as t,d as u,o as y,q as c,r as d,z as s}from"./chunk-5Z4VIKXZ.js";import{a as h,b as l,c as p,d as m}from"./chunk-JMBDTNUR.js";var b=m(function({model:o,onClose:r}){return p(u,{open:!0,onClose:r,title:"Color highlighted haplotypes",children:[p(d,{sx:{display:"grid",gridTemplateColumns:"auto 1fr 1fr",alignItems:"center",gap:1.5},children:[l(t,{variant:"subtitle2",children:"Haplotype"}),l(t,{variant:"subtitle2",children:"Color by"}),l(t,{variant:"subtitle2",children:"Palette"}),o.drawnWalks.map(({name:a,encoding:n})=>l(f,{label:o.walkLabel(a),field:n.field,scheme:n.scheme,onField:e=>{o.setWalkColor(a,{field:e})},onScheme:e=>{o.setWalkColor(a,{scheme:e})}},a))]}),l(c,{children:l(y,{variant:"contained",onClick:r,children:"Done"})})]})});function f({label:i,field:o,scheme:r,onField:a,onScheme:n}){return p(h,{children:[l(t,{variant:"body2",children:i}),l(g,{select:!0,size:"small",value:o,slotProps:{select:{SelectDisplayProps:{"aria-label":`Color ${i} by`}}},onChange:e=>{a(e.target.value)},children:v.map(e=>l(s,{value:e.value,children:e.label},e.value))}),l(g,{select:!0,size:"small",value:r,slotProps:{select:{SelectDisplayProps:{"aria-label":`Palette for ${i}`}}},onChange:e=>{n(e.target.value)},children:C.filter(e=>e.value!=="rainbow"||o==="reference").map(e=>l(s,{value:e.value,children:e.label},e.value))})]})}var P=b;export{P as default};
|
|
2
|
+
//# sourceMappingURL=HighlightColorDialog-4F34Q4PY.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b as i}from"./chunk-RHYBJCA4.js";import"./chunk-2PNGGCQJ.js";import"./chunk-JOYKGTDE.js";import"./chunk-3EQNVA3F.js";import"./chunk-NLS74JSZ.js";import"./chunk-ZGTG74GE.js";import"./chunk-XWCLYB5C.js";import"./chunk-XB5KC2EZ.js";import"./chunk-2V75YPTT.js";import"./chunk-CJAV55QB.js";import"./chunk-FY7X6253.js";import"./chunk-YBLNN5FU.js";import"./chunk-X7YIGIYW.js";import"./chunk-JMRW3IGK.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import"./chunk-3VGXCEMQ.js";import"./chunk-IKJZPPOA.js";import"./chunk-3WG3GF2A.js";import"./chunk-J5RMHLFJ.js";import"./chunk-NIEZKWQV.js";import"./chunk-5Z4VIKXZ.js";import{b as o,d as t}from"./chunk-JMBDTNUR.js";var e=JBrowseExports["@jbrowse/display-kit/DisplayChrome"];var s=e&&e.__esModule?e.default:e;var p=t(function({model:r}){return o(s,{model:r,factory:a,testid:"linear-graph-display","data-layout":r.chosenLayoutMode,"data-cut-tier":r.cutTier,"data-recuts":r.recuts,"data-node-count":r.hasGraph?r.nodeCount:void 0,"data-loading":r.isLoading?"":void 0,style:{width:r.paneWidth,height:r.height,overflow:"hidden"},children:n=>o(i,{model:r,handle:n})})}),c=p;export{c as default};
|
|
2
|
+
//# sourceMappingURL=LinearGraphDisplay-BAEMS5WG.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["host:@jbrowse/display-kit/DisplayChrome", "../../src/LinearGraphDisplay/components/LinearGraphDisplay.tsx"],
|
|
4
|
+
"sourcesContent": ["const host = JBrowseExports[\"@jbrowse/display-kit/DisplayChrome\"]\nconst read = name =>\n host != null && name in Object(host)\n ? host[name]\n : Object.assign(\n function () {\n throw new Error(\n \"This JBrowse does not provide '\" + name + \"' from '\" + \"@jbrowse/display-kit/DisplayChrome\" + \"' to plugins: GraphGenomeView was built for a different JBrowse version, so update the plugin or JBrowse\",\n )\n },\n { jbrowseHostMissing: name },\n )\nexport default host && host.__esModule ? host.default : host", "import DisplayChrome from '@jbrowse/display-kit/DisplayChrome'\nimport { observer } from 'mobx-react'\n\nimport GraphCanvas from '../../GraphGenomeView/components/GraphCanvas'\nimport { createGraphRenderer } from '../../GraphGenomeView/renderer/GraphRenderer'\n\nimport type { LinearGraphDisplayModel } from '../model'\n\nconst LinearGraphDisplay = observer(function LinearGraphDisplay({\n model,\n}: {\n model: LinearGraphDisplayModel\n}) {\n return (\n <DisplayChrome\n model={model}\n factory={createGraphRenderer}\n testid=\"linear-graph-display\"\n data-layout={model.chosenLayoutMode}\n data-cut-tier={model.cutTier}\n data-recuts={model.recuts}\n data-node-count={model.hasGraph ? model.nodeCount : undefined}\n data-loading={model.isLoading ? '' : undefined}\n style={{\n width: model.paneWidth,\n height: model.height,\n overflow: 'hidden',\n }}\n >\n {handle => <GraphCanvas model={model} handle={handle} />}\n </DisplayChrome>\n )\n})\n\nexport default LinearGraphDisplay\n"],
|
|
5
|
+
"mappings": "isBAAA,IAAMA,EAAO,eAAe,oCAAoC,EAYhE,IAAOC,EAAQC,GAAQA,EAAK,WAAaA,EAAK,QAAUA,ECJxD,IAAMC,EAAqBC,EAAS,SAA4B,CAC9D,MAAAC,CACF,EAEG,CACD,OACEC,EAACC,EAAA,CACC,MAAOF,EACP,QAASG,EACT,OAAO,uBACP,cAAaH,EAAM,iBACnB,gBAAeA,EAAM,QACrB,cAAaA,EAAM,OACnB,kBAAiBA,EAAM,SAAWA,EAAM,UAAY,OACpD,eAAcA,EAAM,UAAY,GAAK,OACrC,MAAO,CACL,MAAOA,EAAM,UACb,OAAQA,EAAM,OACd,SAAU,QACZ,EAEC,SAAAI,GAAUH,EAACI,EAAA,CAAY,MAAOL,EAAO,OAAQI,EAAQ,EACxD,CAEJ,CAAC,EAEME,EAAQR",
|
|
6
|
+
"names": ["host", "DisplayChrome_default", "host", "LinearGraphDisplay", "observer", "model", "jsx", "DisplayChrome_default", "createGraphRenderer", "handle", "GraphCanvas_default", "LinearGraphDisplay_default"]
|
|
7
|
+
}
|
package/dist/chunks/{MinigraphBubbleAdapter-CML6E5IP.js → MinigraphBubbleAdapter-G25V6MZL.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as f,d as c,f as d}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=MinigraphBubbleAdapter-
|
|
1
|
+
import{a as f,d as c,f as d}from"./chunk-CJAV55QB.js";import{a as g}from"./chunk-KOB7YIMR.js";import{C as p,D as u,b,x as m}from"./chunk-DG3E6BSX.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import"./chunk-OGQ6OQDN.js";import"./chunk-3WG3GF2A.js";import{a as i,o as l}from"./chunk-J5RMHLFJ.js";var a=class extends b{constructor(){super(...arguments);this.bubbles=p(this,["bubblesLocation"],["index"]);this.refNames=new u(this.bubbles,this)}static{this.capabilities=["getFeatures","getRefNames"]}async getRefNames(t={}){return this.refNames.assemblyRefNames(t)}async getRegionByteSize(t,s={}){return this.refNames.regionBytes(t,s)}async hasDataForRefName(){return!0}getFeatures(t,s={}){let{signal:n,statusCallback:h}=s;return g(async r=>{let o=await this.refNames.resolveMapped(t,s);o!==void 0&&await l("Downloading bubbles",h,()=>m(this.bubbles,o,t.start,t.end,{signal:n,lineCallback:(N,y)=>{let e=f(N);r.next(new i({uniqueId:`bubble-${y}`,refName:t.refName,start:e.start,end:e.end,name:c(e),description:d(e),type:"bubble",score:e.segmentCount,segmentCount:e.segmentCount,pathCount:e.pathCount,inversion:e.inversion,shortestAlleleLength:e.shortestAlleleLength,longestAlleleLength:e.longestAlleleLength,segments:e.segments,shortestAllele:e.shortestAllele,longestAllele:e.longestAllele}))}})),r.complete()},n)}};export{a as default};
|
|
2
|
+
//# sourceMappingURL=MinigraphBubbleAdapter-G25V6MZL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=RgfaTabixAdapter-
|
|
1
|
+
import{a as N}from"./chunk-HLAQQI6G.js";import"./chunk-Q7QC2EQU.js";import{a as x}from"./chunk-KOB7YIMR.js";import"./chunk-YBLNN5FU.js";import"./chunk-X7YIGIYW.js";import"./chunk-JMRW3IGK.js";import{C as m,D as w,b as c,u as g,v as u,w as h,x as k}from"./chunk-DG3E6BSX.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import{d}from"./chunk-IKJZPPOA.js";import"./chunk-OGQ6OQDN.js";import"./chunk-3WG3GF2A.js";import{a as p,o as l}from"./chunk-J5RMHLFJ.js";var f=class extends c{constructor(){super(...arguments);this.fine=this.openIndex([])}static{this.capabilities=["getFeatures","getRefNames"]}openIndex(e){let a=m(this,[...e,"segmentsLocation"],[...e,"segmentsIndex"]),s=m(this,[...e,"linksLocation"],[...e,"linksIndex"]),n=this.getConf("walksLocation"),i=e.length===0&&d(n)?new N(m(this,["walksLocation"],["walksIndex"]),this):void 0;return{segments:a,links:s,walks:i,refNames:new w(i?.file??a,this)}}async getHaplotypeNames(e={}){return this.fine.walks?.haplotypeNames(e)}index(e="fine"){return e==="fine"?this.fine:(this.coarse??=this.openIndex(["coarse"]),this.coarse)}async getRefNames(e={}){return this.fine.refNames.assemblyRefNames(e)}async getRegionByteSize(e,a={}){let{walks:s,refNames:n}=this.fine;return n.regionBytes(e,a,s&&((i,{start:t,end:r})=>s.reader.queryStart(t,{...a,refName:i,end:r})))}async hasDataForRefName(){return!0}getFeatures(e,a={}){return x(async s=>{let n=await this.fine.refNames.resolveMapped(e,a);if(n!==void 0){let{walks:i}=this.fine,t=r=>{s.next(r)};await(i?this.walkFeatures(i,n,e,a,t):this.segmentFeatures(n,e,a,t))}s.complete()},a.signal)}async walkFeatures(e,a,s,n,i){let t=await l("Downloading walks",n.statusCallback,()=>e.referenceNodes(a,s,n));for(let r of t){let o=String(r.id);i(new p({uniqueId:o,refName:s.refName,start:r.start,end:r.end,name:o,type:"segment",rank:0,stableName:r.refName}))}}async segmentFeatures(e,a,s,n){await l("Downloading segments",s.statusCallback,()=>k(this.fine.segments,e,a.start,a.end,{signal:s.signal,lineCallback:i=>{let{segment:t,anchored:r}=g(i);if(r&&t.refName!==e)return;let o=u(t);n(new p({uniqueId:t.id,refName:a.refName,start:t.start,end:t.end,name:t.id,type:"segment",rank:t.rank,stableName:t.refName,...o&&{samples:o,sampleCount:o.length}}))}}))}async getSubgraph(e,a={}){let{hops:s,signal:n,tier:i}=a,t=this.index(i),r=await t.refNames.resolveForCut(e,{signal:n});return t.walks?t.walks.subgraph(r,e,a):h(t,{refName:r,start:e.start,end:e.end},{hops:s,signal:n})}};export{f as default};
|
|
2
|
+
//# sourceMappingURL=RgfaTabixAdapter-JPTUWO2Z.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as x,b,c as N,d as R,f as c,g as C,h as P,i as T}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=WalkFormsAdapter-
|
|
1
|
+
import{a as x,b,c as N,d as R,f as c,g as C,h as P,i as T}from"./chunk-I6F25EXY.js";import{a as k}from"./chunk-KOB7YIMR.js";import{C as $,b as l,d as g,e as w,f as h,g as p,k as y,o as B,s as F,t as S}from"./chunk-DG3E6BSX.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import"./chunk-5RHNR3TH.js";import"./chunk-OGQ6OQDN.js";import"./chunk-3WG3GF2A.js";import{a as m,o as u}from"./chunk-J5RMHLFJ.js";var v=r=>`${(r/1e6).toFixed(1)} MB`,O=r=>`${(r/1e6).toFixed(1)} M`;function E(r,f){if(!(r instanceof g))return r;let t=N(f);if(r instanceof F)return new Error(`The pinned window ${t} is too large to read every walk in full for structural forms: its walks take ${O(r.steps)} steps, over the ${O(r.limit)} step budget, and about ${p(r.fitsBp)} of it fits. Pin a narrower window`);let e=`walkByteBudget, ${v(r.limit)}`;return new Error(`The pinned window ${t} is too large to cut for structural forms: ${r.zoomHelps?`about ${p(r.fitsBp)} of it fits in ${e}. Pin a narrower window or raise walkByteBudget`:`its cut fetches ${v(r.bytes??0)}, over ${e}. Raise walkByteBudget`}`)}var L=8,i=new Map;function A(r,f){let t=i.get(r),e=t??f();if(i.delete(r),i.set(r,e),!t){e.catch(()=>{i.get(r)===e&&i.delete(r)});for(let s of i.keys()){if(i.size<=L)break;i.delete(s)}}return e}var d=class extends l{constructor(){super(...arguments);this.reader=new y($(this,["walksLocation"],["walksIndex"]))}static{this.capabilities=["getFeatures","getRefNames"]}async referenceSample(t){let{references:e}=await this.reader.header(t);return e[0]??""}async getRefNames(t={}){let e=await this.reader.referenceSequences(t),s=await this.referenceSample(t),a=e.filter(o=>h(o,s)).map(o=>w(o));return a.length>0?[...new Set(a)]:e}pinned(){let t=x(this.getConf("pinned"));if(!t)throw new Error("WalkFormsAdapter needs `pinned`, the window its forms come from: { refName, start, end }");return t}forms(t){if(!this.formsRead){let e=this.pinned(),s=`${JSON.stringify(this.getConf("walksLocation"))} ${e.refName}:${e.start}-${e.end}`,a=this.getConf("walkByteBudget"),o=A(`${s} ${a}`,()=>u("Cutting walks",t.statusCallback,()=>S(this.reader,e,{byteBudget:a,partial:!1}).catch(n=>{throw E(n,e)}))).then(n=>B(n,{window:e,floorBp:b(this.getConf("floorBp")),exclude:this.getConf("exclude")}));o.catch(()=>{this.formsRead===o&&(this.formsRead=void 0)}),this.formsRead=o}return this.formsRead}maxForms(){return this.getConf("maxForms")}async getSourcesAndWarnings(t={}){let e=await this.forms(t),s=R(this.pinned());return{sources:c(e,this.maxForms()),warnings:C(e,this.maxForms()).map(a=>s+a)}}async getSources(t,e={}){return c(await this.forms(e),this.maxForms())}async onPinnedSequence(t,e){let s=await this.referenceSample(e),[a,o]=await Promise.all([this.reader.sequenceFor(s,t,e),this.reader.sequenceFor(s,this.pinned().refName,e)]);return a!==void 0&&a===o}getFeatures(t,e={}){return k(async s=>{let a=await this.forms(e),o=await this.onPinnedSequence(t.refName,e)?T(a,this.maxForms()).filter(n=>n.start<t.end&&n.end>t.start):[];for(let n of o)s.next(new m({uniqueId:`forms-${a.floorBp}-${n.id}`,refName:t.refName,start:n.start,end:n.end,name:n.name,description:n.description,type:n.type,svType:n.svType,consequence:n.consequence,REF:"N",ALT:[n.alt],INFO:{SVTYPE:[n.svType],SVLEN:[n.mark.delta]},mark:n.mark,genotypes:n.genotypes}));if(o.length===0){let n=Math.floor(t.start);s.next(new m({uniqueId:`forms-reference-${t.refName}-${n}`,refName:t.refName,start:n,end:n+1,REF:"N",ALT:["."],genotypes:P(a,this.maxForms())}))}s.complete()},e.signal)}};export{d as default};
|
|
2
|
+
//# sourceMappingURL=WalkFormsAdapter-PBN7BJZW.js.map
|
package/dist/chunks/{WalkTabixSyntenyAdapter-NWB2OALF.js → WalkTabixSyntenyAdapter-27WDE5JF.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as K}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=WalkTabixSyntenyAdapter-
|
|
1
|
+
import{a as K}from"./chunk-HLAQQI6G.js";import{b as $,d as U,e as X,f as O,g as z,h as G}from"./chunk-O5FDMVL3.js";import"./chunk-Q7QC2EQU.js";import{a as q}from"./chunk-KOB7YIMR.js";import{p as M,q as _,r as T}from"./chunk-M2D7NUOY.js";import"./chunk-YBLNN5FU.js";import"./chunk-X7YIGIYW.js";import"./chunk-JMRW3IGK.js";import{C as D,D as H,i as j}from"./chunk-DG3E6BSX.js";import"./chunk-YBLNN5FU.js";import"./chunk-ROZPEXN4.js";import{a as S,c as I,d as W,g as F,h as w,i as x}from"./chunk-5RHNR3TH.js";import"./chunk-OTBDKJEA.js";import"./chunk-3VGXCEMQ.js";import"./chunk-OGQ6OQDN.js";import"./chunk-3WG3GF2A.js";import{o as R}from"./chunk-J5RMHLFJ.js";var se=50;function re(r){let i=[];for(let e=0;e<r.length;e++){let[t,a]=r[e],[s,n]=r[e+1]??[];a===n&&a<=se&&(t==="I"&&s==="D"||t==="D"&&s==="I")?(i.push(["X",a]),e++):i.push([t,a])}return i}function E(r){return Array.from(r.ids,(i,e)=>2*i+r.rev[e])}function A(r,i){let e=r.get(i);return e===void 0?0:e.end-e.start}function V(r){let i=new Map,e=s=>{let n=A(r,s),o=i.get(n);return o===void 0&&(o="N".repeat(n),i.set(n,o)),o},t=new Map,a=s=>{let n=t.get(s);return n===void 0&&(n=E(s),t.set(s,n)),n};return(s,n)=>_({query:a(s),target:a(n),sequenceOf:e,bases:!1})}var B=100;function v(r,i,e){let t=r.at(-1);e>0&&(t?.[0]===i?t[1]+=e:r.push([i,e]))}function Z(r){let i=t=>A(r,t>>1),e=t=>{let a=new Float64Array(t.length+1);return t.forEach((s,n)=>{a[n+1]=a[n]+i(s)}),a};return(t,a)=>{let s=E(a),n=E(t),[o,l]=M(n,s,i),[u,f]=M(n.map(g=>g^1).reverse(),s,i),c=f>l,p=c?u:o,N=Math.max(l,f);if(N<B)return[];let h=e(s),d=e(n),y=g=>c?n.length-1-p[g][0]:p[g][0],m=[];p.forEach(([,g],k)=>{if(k>0){let[ee,te]=[y(k-1),y(k)].sort((ae,ne)=>ae-ne);v(m,"I",d[te]-d[ee+1]),v(m,"D",h[g]-h[p[k-1][1]+1])}v(m,"=",i(s[g]))});let[b,P]=[y(0),y(p.length-1)].sort((g,k)=>g-k);return[{queryStart:d[b],queryEnd:d[P+1],targetStart:h[p[0][1]],targetEnd:h[p.at(-1)[1]+1],strand:c?"-":"+",edits:m,sharedBases:N}]}}function oe(r){let i=new Map,e=new Set;r.ids.forEach((t,a)=>{i.has(t)?e.add(t):i.set(t,r.rev[a])});for(let t of e)i.delete(t);return i}function J(r){let i=new Map,e=t=>{let a=i.get(t);return a===void 0&&(a=oe(t),i.set(t,a)),a};return(t,a)=>{let s=e(a),n=0,o=0;for(let[l,u]of e(t)){let f=s.get(l);f===u?n+=A(r,l):f!==void 0&&(o+=A(r,l))}return{same:n,opposite:o}}}function Q(r){let i=Z(r),e=V(r),t=J(r);return(a,s)=>{let{same:n,opposite:o}=t(a,s);return n>=B&&o>=B?e(a,s):i(a,s)}}var ie=1e4;function Y(r){let i=Z(r),e=V(r),t=J(r);return(a,s)=>{let n=i(a,s),o=n[0]?.strand,{same:l,opposite:u}=t(a,s);return o===void 0||Math.min(l,u)<ie?n:[...n,...e(a,s).filter(f=>f.strand!==o)]}}function C({chain:r,target:i,query:e,assemblyName:t,refName:a,mateAssemblyName:s}){let n=re(r.edits);return G({target:{name:i.name,assemblyName:t,refName:a,start:i.hapStart+r.targetStart,end:i.hapStart+r.targetEnd},query:{name:e.name,assemblyName:s,refName:W(e.name),start:e.hapStart+r.queryStart,end:e.hapStart+r.queryEnd},strand:r.strand,cigar:T(n),matches:n.reduce((o,[l,u])=>o+(l==="="?u:0),0),columns:n.reduce((o,[,l])=>o+l,0)})}var me=r=>I(r.name)??r.name,L=class extends ${constructor(){super(...arguments);this.walks=new K(D(this,["walksLocation"],["walksIndex"]),this);this.refNames=new H(this.walks.file,this)}get anchor(){let e=this.getConf("assemblyNames")[0];if(e===void 0)throw new Error("WalkTabixSyntenyAdapter needs assemblyNames: its first entry is the assembly the reference sample is loaded as");return e}async getHaplotypeNames(e={}){return this.walks.haplotypeNames(e)}async getHeader(e={}){let{haplotypes:t}=await this.walks.reader.header(e),{anchor:a}=this,s=w(this,a),n=x(this);return{hasCoarseTier:!1,anchorAssemblyName:a,lanes:t.filter(o=>o!==s&&S(o)!==s).map(o=>({name:O(n,o),label:o,group:S(o)}))}}async getRefNames(e={}){let{assemblyName:t}=e;return t===void 0||t===this.anchor?this.refNames.assemblyRefNames({...e,assemblyName:this.anchor}):[]}async getSubgraph(e,t={}){let a=await this.refNames.resolveForCut(e,{signal:t.signal});return this.walks.subgraph(a,e,t)}async laneWalks(e,t,a,s,n){let o=j(a,e);return R(n,s.statusCallback,()=>this.walks.reader.cut(e,t,{...this.walks.budgets(),signal:s.signal,keep:o,expand:o,links:!1}).catch(l=>{throw z(l,t.end-t.start)}))}async anchorFeatures(e,t,a){let s=a.haplotypes?.length?a.haplotypes.map(m=>w(this,m)):void 0,n=w(this,a.targetAssemblyName),o=n===void 0?s:s===void 0||s.some(m=>F(n,m)||F(m,n))?[n]:[];if(o?.length===0)return[];let{start:l,end:u}=t,{graph:f,fragments:c}=await this.laneWalks(e,t,o,a,`Reading walks ${t.refName}:${l.toLocaleString()}-${u.toLocaleString()}`),p=Y(f.nodes),N=x(this),h=c.filter(m=>m.name===e),d=m=>o===void 0?0:o.findIndex(b=>F(m.name,b));return c.filter(m=>m.name!==e&&d(m)>=0).sort((m,b)=>d(m)-d(b)).flatMap(m=>h.flatMap(b=>p(m,b).map(P=>C({chain:P,target:b,query:m,assemblyName:t.assemblyName,refName:t.refName,mateAssemblyName:O(N,me(m))}))))}async pairFeatures(e,t,a,s){let n=a.map(c=>({pair:c,featurePrefix:w(this,c.queryAssemblyName),matePrefix:w(this,c.targetAssemblyName)})),{graph:o,fragments:l}=await this.laneWalks(e,t,n.flatMap(c=>[c.featurePrefix,c.matePrefix]),s,X(a)),u=Q(o.nodes),f=c=>l.filter(p=>F(p.name,c));return n.flatMap(({pair:c,featurePrefix:p,matePrefix:N})=>f(p).flatMap(h=>f(N).flatMap(d=>u(d,h).map(y=>C({chain:y,target:h,query:d,assemblyName:c.queryAssemblyName,refName:W(h.name),mateAssemblyName:c.targetAssemblyName})))))}getFeatures(e,t={}){return q(async a=>{let s=e.assemblyName===this.anchor?await this.refNames.resolve(e,t):void 0;if(s!==void 0){let n=U(t),o=n.length>0?await this.pairFeatures(s,e,n,t):await this.anchorFeatures(s,e,t);for(let l of o)a.next(l)}a.complete()},t.signal)}};export{L as default};
|
|
2
|
+
//# sourceMappingURL=WalkTabixSyntenyAdapter-27WDE5JF.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{i as M,l as W,p as F}from"./chunk-NLS74JSZ.js";import{b as O,h as A}from"./chunk-XB5KC2EZ.js";import{K as b,Q as _,X as B}from"./chunk-2V75YPTT.js";import{f as R}from"./chunk-NIEZKWQV.js";import{D as E,E as P,H as m,d as v,o as T,q as I,r as L,s as w,t as N,w as D,y as G,z as x}from"./chunk-5Z4VIKXZ.js";import{b as t,c as r,d as C}from"./chunk-JMBDTNUR.js";var S=[{value:0,label:"Fastest"},{value:1,label:"Fast"},{value:2,label:"Default"},{value:3,label:"Fine"},{value:4,label:"Best"}];function f({label:o,value:n,options:e,testId:s,size:d,sx:p,disabled:a,title:h,shown:g,onChange:z}){let k=R();return r(w,{size:d,sx:p,disabled:a,title:h,children:[t(D,{id:k,shrink:!0,children:o}),t(E,{labelId:k,value:n,label:o,notched:!0,displayEmpty:!0,"data-testid":s,renderValue:i=>g??e.find(H=>H.value===i)?.label??i,onChange:i=>{z(i.target.value)},children:e.map(i=>t(x,{value:i.value,disabled:i.disabled,title:i.disabled?void 0:i.description,children:t(G,{primary:i.label,secondary:i.disabled?i.description:void 0})},i.value))})]})}var u=F()({section:{marginBottom:24},group:{marginBottom:16},heading:{marginBottom:8}});function l({warn:o=!1,children:n}){return t(m,{variant:"caption",component:"div",color:o?"warning.main":"text.secondary",children:n})}function y({title:o,children:n}){let{classes:e}=u();return r("section",{className:e.group,children:[t(m,{variant:"subtitle1",className:e.heading,children:o}),n]})}function U({label:o,checked:n,onChange:e,children:s}){let{classes:d}=u();return r("div",{className:d.section,children:[t(N,{control:t(P,{checked:n,onChange:p=>{e(p.target.checked)}}),label:o}),s]})}function c({children:o,...n}){let{classes:e}=u();return r("div",{className:e.section,children:[t(f,{sx:{minWidth:200},...n}),o]})}var Y=[5e3,2e4,5e4,1e5];function $(o){return[...new Set([...Y,o])].sort((n,e)=>n-e).map(n=>({value:String(n),label:n.toLocaleString()}))}function Q({label:o,choices:n,stored:e,auto:s,testId:d,onChange:p,children:a}){return n.length>0?t(c,{label:o,value:n.some(h=>h.trackId===e)?e:"",options:[{value:"",label:`Automatic (${s?.name??"none"})`},...n.map(({trackId:h,name:g})=>({value:h,label:g}))],testId:d,onChange:p,children:a}):null}var q=C(function(n){let{model:e,onClose:s,children:d}=n,{classes:p}=u();return r(v,{open:!0,onClose:s,title:"Graph settings",children:[r(L,{children:[r(y,{title:"Subgraph",children:[d,t(c,{label:"Node limit",value:String(e.maxGraphNodes),options:$(e.maxGraphNodes),testId:"graph-node-limit-select",onChange:a=>{e.setMaxGraphNodes(Number(a))},children:t(l,{children:"The most nodes a layout draws; past it the graph is declined. Walk rows take no limit."})})]}),r(y,{title:"Drawing",children:[e.anchorPaths.length>1?t(c,{label:"Reference path",value:e.activeReferencePath??"",options:e.anchorPaths.map(({name:a})=>({value:a,label:a})),testId:"graph-reference-path-select",onChange:a=>{e.setReferencePath(a),e.recomputeLayout()},children:t(l,{children:"The path the anchored layouts place x along"})}):null,t(c,{label:"Node width",value:e.nodeWidth,options:_,testId:"graph-node-width-select",onChange:a=>{e.setNodeWidth(a)},children:t(l,{children:"Depth as width. In a cut with walks, depth is how many haplotypes carry the node."})}),t(c,{label:"Link width",value:e.linkWidth,options:B,testId:"graph-link-width-select",onChange:a=>{e.setLinkWidth(a)},children:t(l,{children:"Walks as width, so a common route reads heavy and a private one thin."})}),r(U,{label:"Draw paths",checked:e.drawPaths,onChange:a=>{e.setLayer("paths",a)},children:[t(l,{children:"Color each node by the paths through it, one lane per path"}),e.drawPaths&&!e.effectiveDrawPaths?t(l,{warn:!0,children:e.pathCount>b?`Off: ${e.pathCount.toLocaleString()} paths is past the ${b} this can tell apart`:"Off: this graph states no paths"}):null]}),t(Q,{label:"Gene track",choices:e.geneTrackChoices,stored:e.geneTrackId,auto:W(e.geneTrackChoices,""),testId:"graph-gene-track-select",onChange:a=>{e.setGeneTrackId(a)},children:t(l,{children:"Where genes on the backbone come from"})}),t(Q,{label:"Repeat track",choices:e.repeatTrackChoices,stored:e.repeatTrackId,auto:M(e.repeatTrackChoices,""),testId:"graph-repeat-track-select",onChange:a=>{e.setRepeatTrackId(a)},children:t(l,{children:"The tandem repeat annotation walk rows measure and tile by"})})]}),r(y,{title:"Force-directed layout",children:[e.hasGraph&&!e.usesLayoutEngine?t("div",{className:p.section,children:t(l,{warn:!0,children:"No effect on the current layout until Layout is Force-directed"})}):null,t(c,{label:"Engine",value:e.layoutEngine,options:O,testId:"graph-layout-engine-select",onChange:a=>{e.setLayoutEngine(a)},children:t(l,{children:"Stress keeps the reference straight, so a zoom keeps the picture; FMMM lets the whole graph settle."})}),t(c,{label:"Layout quality",value:String(e.layoutQuality),options:S.map(a=>({value:String(a.value),label:a.label})),testId:"graph-layout-quality-select",onChange:a=>{e.setLayoutQuality(Number(a))},children:t(l,{children:"The engine's iteration budget; higher is slower"})}),t(c,{label:"Bubble spread",value:e.bubbleSpread,options:A,testId:"graph-bubble-spread-select",onChange:a=>{e.setBubbleSpread(a)},children:t(l,{children:"How far the layout opens a bubble"})}),e.layoutEngine==="stress"?null:t(U,{label:"Linear layout",checked:e.linearLayout,onChange:a=>{e.setLinearLayout(a)},children:t(l,{children:"Keeps a chain of nodes on one line where it can"})})]})]}),t(I,{children:t(T,{variant:"contained",color:"primary",onClick:s,children:"Close"})})]})}),ge=q;export{f as a,ge as b};
|
|
2
|
+
//# sourceMappingURL=chunk-2PNGGCQJ.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/@jbrowse+bandage-core@12.0.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/@jbrowse+bandage-core@12.0.2/node_modules/@jbrowse/bandage-core/dist/chunks/chunk-K5SIJGAE.js", "../../src/GraphGenomeView/components/LabelledSelect.tsx", "../../src/GraphGenomeView/components/GraphSettingsDialog.tsx"],
|
|
4
4
|
"sourcesContent": ["// src/layoutQualities.ts\nvar LAYOUT_QUALITIES = [\n { value: 0, label: \"Fastest\" },\n { value: 1, label: \"Fast\" },\n { value: 2, label: \"Default\" },\n { value: 3, label: \"Fine\" },\n { value: 4, label: \"Best\" }\n];\n\nexport {\n LAYOUT_QUALITIES\n};\n", "import { useId } from 'react'\n\nimport {\n FormControl,\n InputLabel,\n ListItemText,\n MenuItem,\n Select,\n} from '@mui/material'\n\nimport type { SxProps } from '@mui/material'\n\ninterface SelectOption<T extends string> {\n value: T\n label: string\n // an option's tooltip, and the reason under a disabled one, whose tooltip\n // cannot open\n description?: string\n disabled?: boolean\n}\n\n// One dropdown with its label tied to it, so a screen reader names the combobox\nexport default function LabelledSelect<T extends string>({\n label,\n value,\n options,\n testId,\n size,\n sx,\n disabled,\n title,\n shown,\n onChange,\n}: {\n label: string\n value: T\n options: readonly SelectOption<T>[]\n testId?: string\n size?: 'small' | 'medium'\n sx?: SxProps\n disabled?: boolean\n title?: string\n // what the closed select reads, when not the picked option's label\n shown?: string\n onChange: (value: T) => void\n}) {\n const labelId = useId()\n return (\n <FormControl size={size} sx={sx} disabled={disabled} title={title}>\n <InputLabel id={labelId} shrink>\n {label}\n </InputLabel>\n <Select\n labelId={labelId}\n value={value}\n label={label}\n notched\n displayEmpty\n data-testid={testId}\n renderValue={picked =>\n shown ?? options.find(o => o.value === picked)?.label ?? picked\n }\n onChange={e => {\n onChange(e.target.value as T)\n }}\n >\n {options.map(o => (\n <MenuItem\n key={o.value}\n value={o.value}\n disabled={o.disabled}\n title={o.disabled ? undefined : o.description}\n >\n <ListItemText\n primary={o.label}\n secondary={o.disabled ? o.description : undefined}\n />\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n )\n}\n", "import type { ReactNode } from 'react'\n\nimport { BUBBLE_SPREADS } from '@jbrowse/bandage-core/bubbleSpreads'\nimport { EDGE_WIDTHS } from '@jbrowse/bandage-core/edgeWidths'\nimport { LAYOUT_ENGINES } from '@jbrowse/bandage-core/layoutEngines'\nimport { LAYOUT_QUALITIES } from '@jbrowse/bandage-core/layoutQualities'\nimport { NODE_WIDTHS } from '@jbrowse/bandage-core/nodeWidths'\nimport { MAX_PATH_COLORS } from '@jbrowse/bandage-core/pathColors'\nimport { Dialog } from '@jbrowse/core/ui'\nimport {\n Button,\n DialogActions,\n DialogContent,\n FormControlLabel,\n Switch,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport LabelledSelect from './LabelledSelect'\nimport { pickGeneTrack } from '../genes/geneFeatures'\nimport { pickRepeatTrack } from '../repeats/repeatFeatures'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n section: {\n marginBottom: 24,\n },\n group: {\n marginBottom: 16,\n },\n heading: {\n marginBottom: 8,\n },\n})\n\nfunction Caption({\n warn = false,\n children,\n}: {\n warn?: boolean\n children: ReactNode\n}) {\n return (\n <Typography\n variant=\"caption\"\n component=\"div\"\n color={warn ? 'warning.main' : 'text.secondary'}\n >\n {children}\n </Typography>\n )\n}\n\nfunction Group({ title, children }: { title: string; children: ReactNode }) {\n const { classes } = useStyles()\n return (\n <section className={classes.group}>\n <Typography variant=\"subtitle1\" className={classes.heading}>\n {title}\n </Typography>\n {children}\n </section>\n )\n}\n\nfunction SettingSwitch({\n label,\n checked,\n onChange,\n children,\n}: {\n label: string\n checked: boolean\n onChange: (checked: boolean) => void\n children?: ReactNode\n}) {\n const { classes } = useStyles()\n return (\n <div className={classes.section}>\n <FormControlLabel\n control={\n <Switch\n checked={checked}\n onChange={e => {\n onChange(e.target.checked)\n }}\n />\n }\n label={label}\n />\n {children}\n </div>\n )\n}\n\n// one dropdown setting, at the dialog's width, and its caption\nfunction SettingSelect<T extends string>({\n children,\n ...props\n}: Omit<Parameters<typeof LabelledSelect<T>>[0], 'size' | 'sx'> & {\n children?: ReactNode\n}) {\n const { classes } = useStyles()\n return (\n <div className={classes.section}>\n <LabelledSelect sx={{ minWidth: 200 }} {...props} />\n {children}\n </div>\n )\n}\n\nconst NODE_LIMITS = [5000, 20_000, 50_000, 100_000]\n\n// the presets, with a limit a session states among them\nfunction nodeLimitOptions(current: number) {\n return [...new Set([...NODE_LIMITS, current])]\n .sort((a, b) => a - b)\n .map(limit => ({ value: String(limit), label: limit.toLocaleString() }))\n}\n\ninterface NamedTrack {\n trackId: string\n name: string\n}\n\n// '' leaves the pick to the heuristic, so a session can go back to it\nfunction TrackPickSetting({\n label,\n choices,\n stored,\n auto,\n testId,\n onChange,\n children,\n}: {\n label: string\n choices: NamedTrack[]\n stored: string\n auto: NamedTrack | undefined\n testId: string\n onChange: (trackId: string) => void\n children: ReactNode\n}) {\n return choices.length > 0 ? (\n <SettingSelect\n label={label}\n value={choices.some(t => t.trackId === stored) ? stored : ''}\n options={[\n { value: '', label: `Automatic (${auto?.name ?? 'none'})` },\n ...choices.map(({ trackId, name }) => ({\n value: trackId,\n label: name,\n })),\n ]}\n testId={testId}\n onChange={onChange}\n >\n {children}\n </SettingSelect>\n ) : null\n}\n\n// Toggles the menus already offer (halos, genes, color) stay out of here.\n// `children` is the host's own part of the subgraph group.\nconst GraphSettingsDialog = observer(function GraphSettingsDialog(props: {\n model: GraphPaneModel\n onClose: () => void\n children?: ReactNode\n}) {\n const { model, onClose, children } = props\n const { classes } = useStyles()\n\n return (\n <Dialog open onClose={onClose} title=\"Graph settings\">\n <DialogContent>\n <Group title=\"Subgraph\">\n {children}\n <SettingSelect\n label=\"Node limit\"\n value={String(model.maxGraphNodes)}\n options={nodeLimitOptions(model.maxGraphNodes)}\n testId=\"graph-node-limit-select\"\n onChange={limit => {\n model.setMaxGraphNodes(Number(limit))\n }}\n >\n <Caption>\n The most nodes a layout draws; past it the graph is declined. Walk\n rows take no limit.\n </Caption>\n </SettingSelect>\n </Group>\n\n <Group title=\"Drawing\">\n {model.anchorPaths.length > 1 ? (\n <SettingSelect\n label=\"Reference path\"\n value={model.activeReferencePath ?? ''}\n options={model.anchorPaths.map(({ name }) => ({\n value: name,\n label: name,\n }))}\n testId=\"graph-reference-path-select\"\n onChange={name => {\n model.setReferencePath(name)\n void model.recomputeLayout()\n }}\n >\n <Caption>The path the anchored layouts place x along</Caption>\n </SettingSelect>\n ) : null}\n\n <SettingSelect\n label=\"Node width\"\n value={model.nodeWidth}\n options={NODE_WIDTHS}\n testId=\"graph-node-width-select\"\n onChange={width => {\n model.setNodeWidth(width)\n }}\n >\n <Caption>\n Depth as width. In a cut with walks, depth is how many haplotypes\n carry the node.\n </Caption>\n </SettingSelect>\n\n <SettingSelect\n label=\"Link width\"\n value={model.linkWidth}\n options={EDGE_WIDTHS}\n testId=\"graph-link-width-select\"\n onChange={links => {\n model.setLinkWidth(links)\n }}\n >\n <Caption>\n Walks as width, so a common route reads heavy and a private one\n thin.\n </Caption>\n </SettingSelect>\n\n <SettingSwitch\n label=\"Draw paths\"\n checked={model.drawPaths}\n onChange={draw => {\n model.setLayer('paths', draw)\n }}\n >\n <Caption>\n Color each node by the paths through it, one lane per path\n </Caption>\n {model.drawPaths && !model.effectiveDrawPaths ? (\n <Caption warn>\n {model.pathCount > MAX_PATH_COLORS\n ? `Off: ${model.pathCount.toLocaleString()} paths is past the ${MAX_PATH_COLORS} this can tell apart`\n : 'Off: this graph states no paths'}\n </Caption>\n ) : null}\n </SettingSwitch>\n\n <TrackPickSetting\n label=\"Gene track\"\n choices={model.geneTrackChoices}\n stored={model.geneTrackId}\n auto={pickGeneTrack(model.geneTrackChoices, '')}\n testId=\"graph-gene-track-select\"\n onChange={trackId => {\n model.setGeneTrackId(trackId)\n }}\n >\n <Caption>Where genes on the backbone come from</Caption>\n </TrackPickSetting>\n\n <TrackPickSetting\n label=\"Repeat track\"\n choices={model.repeatTrackChoices}\n stored={model.repeatTrackId}\n auto={pickRepeatTrack(model.repeatTrackChoices, '')}\n testId=\"graph-repeat-track-select\"\n onChange={trackId => {\n model.setRepeatTrackId(trackId)\n }}\n >\n <Caption>\n The tandem repeat annotation walk rows measure and tile by\n </Caption>\n </TrackPickSetting>\n </Group>\n\n <Group title=\"Force-directed layout\">\n {model.hasGraph && !model.usesLayoutEngine ? (\n <div className={classes.section}>\n <Caption warn>\n No effect on the current layout until Layout is Force-directed\n </Caption>\n </div>\n ) : null}\n\n <SettingSelect\n label=\"Engine\"\n value={model.layoutEngine}\n options={LAYOUT_ENGINES}\n testId=\"graph-layout-engine-select\"\n onChange={engine => {\n model.setLayoutEngine(engine)\n }}\n >\n <Caption>\n Stress keeps the reference straight, so a zoom keeps the picture;\n FMMM lets the whole graph settle.\n </Caption>\n </SettingSelect>\n\n <SettingSelect\n label=\"Layout quality\"\n value={String(model.layoutQuality)}\n options={LAYOUT_QUALITIES.map(q => ({\n value: String(q.value),\n label: q.label,\n }))}\n testId=\"graph-layout-quality-select\"\n onChange={quality => {\n model.setLayoutQuality(Number(quality))\n }}\n >\n <Caption>\n The engine's iteration budget; higher is slower\n </Caption>\n </SettingSelect>\n\n <SettingSelect\n label=\"Bubble spread\"\n value={model.bubbleSpread}\n options={BUBBLE_SPREADS}\n testId=\"graph-bubble-spread-select\"\n onChange={spread => {\n model.setBubbleSpread(spread)\n }}\n >\n <Caption>How far the layout opens a bubble</Caption>\n </SettingSelect>\n\n {model.layoutEngine === 'stress' ? null : (\n <SettingSwitch\n label=\"Linear layout\"\n checked={model.linearLayout}\n onChange={linear => {\n model.setLinearLayout(linear)\n }}\n >\n <Caption>Keeps a chain of nodes on one line where it can</Caption>\n </SettingSwitch>\n )}\n </Group>\n </DialogContent>\n\n <DialogActions>\n <Button variant=\"contained\" color=\"primary\" onClick={onClose}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default GraphSettingsDialog\n"],
|
|
5
5
|
"mappings": "8WACA,IAAIA,EAAmB,CACrB,CAAE,MAAO,EAAG,MAAO,SAAU,EAC7B,CAAE,MAAO,EAAG,MAAO,MAAO,EAC1B,CAAE,MAAO,EAAG,MAAO,SAAU,EAC7B,CAAE,MAAO,EAAG,MAAO,MAAO,EAC1B,CAAE,MAAO,EAAG,MAAO,MAAO,CAC5B,ECee,SAARC,EAAkD,CACvD,MAAAC,EACA,MAAAC,EACA,QAAAC,E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GT,EACF,EAEAG,EAACa,EAAA,CACC,MAAM,iBACN,MAAO,OAAOmB,EAAM,aAAa,EACjC,QAASc,EAAiB,IAAIC,IAAM,CAClC,MAAO,OAAOA,EAAE,KAAK,EACrB,MAAOA,EAAE,KACX,EAAE,EACF,OAAO,8BACP,SAAUC,GAAW,CACnBhB,EAAM,iBAAiB,OAAOgB,CAAO,CAAC,CACxC,EAEA,SAAAhD,EAACH,EAAA,CAAQ,2DAET,EACF,EAEAG,EAACa,EAAA,CACC,MAAM,gBACN,MAAOmB,EAAM,aACb,QAASiB,EACT,OAAO,6BACP,SAAUC,GAAU,CAClBlB,EAAM,gBAAgBkB,CAAM,CAC9B,EAEA,SAAAlD,EAACH,EAAA,CAAQ,6CAAiC,EAC5C,EAECmC,EAAM,eAAiB,SAAW,KACjChC,EAACM,EAAA,CACC,MAAM,gBACN,QAAS0B,EAAM,aACf,SAAUmB,GAAU,CAClBnB,EAAM,gBAAgBmB,CAAM,CAC9B,EAEA,SAAAnD,EAACH,EAAA,CAAQ,2DAA+C,EAC1D,GAEJ,GACF,EAEAG,EAACoD,EAAA,CACC,SAAApD,EAACqD,EAAA,CAAO,QAAQ,YAAY,MAAM,UAAU,QAASpB,EAAS,iBAE9D,EACF,GACF,CAEJ,CAAC,EAEMqB,GAAQxB",
|
|
6
6
|
"names": ["LAYOUT_QUALITIES", "LabelledSelect", "label", "value", "options", "testId", "size", "sx", "disabled", "title", "shown", "onChange", "labelId", "useId", "jsxs", "FormControl", "jsx", "InputLabel", "Select", "picked", "o", "e", "MenuItem", "ListItemText", "useStyles", "makeStyles", "Caption", "warn", "children", "jsx", "Typography", "Group", "title", "classes", "jsxs", "SettingSwitch", "label", "checked", "onChange", "FormControlLabel", "Switch", "e", "SettingSelect", "props", "LabelledSelect", "NODE_LIMITS", "nodeLimitOptions", "current", "a", "b", "limit", "TrackPickSetting", "choices", "stored", "auto", "testId", "t", "trackId", "name", "GraphSettingsDialog", "observer", "model", "onClose", "Dialog", "DialogContent", "NODE_WIDTHS", "width", "EDGE_WIDTHS", "links", "draw", "MAX_PATH_COLORS", "pickGeneTrack", "pickRepeatTrack", "LAYOUT_ENGINES", "engine", "LAYOUT_QUALITIES", "q", "quality", "BUBBLE_SPREADS", "spread", "linear", "DialogActions", "Button", "GraphSettingsDialog_default"]
|