jbrowse-plugin-graphgenomeviewer 4.4.1 → 4.5.0
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/README.md +1 -1
- package/dist/chunks/AddTrackWorkflow-U3UNCVXJ.js +2 -0
- package/dist/chunks/{AddTrackWorkflow-F6FBBEJM.js.map → AddTrackWorkflow-U3UNCVXJ.js.map} +1 -1
- package/dist/chunks/{GbzBaseSyntenyAdapter-3BCUI2JI.js → GbzBaseSyntenyAdapter-AZBYMDIW.js} +5 -5
- package/dist/chunks/{GbzBaseSyntenyAdapter-3BCUI2JI.js.map → GbzBaseSyntenyAdapter-AZBYMDIW.js.map} +3 -3
- package/dist/chunks/{GraphGenomeView-QGJN2S27.js → GraphGenomeView-TJ667XWP.js} +2 -2
- package/dist/chunks/{GraphGenomeView-QGJN2S27.js.map → GraphGenomeView-TJ667XWP.js.map} +1 -1
- package/dist/chunks/GraphTrackSettingsDialog-JVPM25GV.js +4 -0
- package/dist/chunks/{GraphTrackSettingsDialog-LXYUYPZS.js.map → GraphTrackSettingsDialog-JVPM25GV.js.map} +1 -1
- package/dist/chunks/LinearGraphDisplay-ME3WCBV3.js +2 -0
- package/dist/chunks/{LinearGraphDisplay-WPXUCJNR.js.map → LinearGraphDisplay-ME3WCBV3.js.map} +1 -1
- package/dist/chunks/{MinigraphBubbleAdapter-CK7AE4QT.js → MinigraphBubbleAdapter-CZYQROL2.js} +2 -2
- package/dist/chunks/{RgfaTabixAdapter-QPKEJZXA.js → RgfaTabixAdapter-BBWH5IPF.js} +2 -2
- package/dist/chunks/TrackWarningsDialog-HPHM5S7U.js +2 -0
- package/dist/chunks/TrackWarningsDialog-HPHM5S7U.js.map +7 -0
- package/dist/chunks/{chunk-CNFN6EVE.js → chunk-BUXVOMDL.js} +2 -2
- package/dist/chunks/{chunk-LGKM2PZH.js → chunk-E7J6SB5P.js} +1 -1
- package/dist/chunks/{chunk-LGKM2PZH.js.map → chunk-E7J6SB5P.js.map} +1 -1
- package/dist/chunks/chunk-J6KYLXRD.js +2 -0
- package/dist/chunks/chunk-J6KYLXRD.js.map +7 -0
- package/dist/chunks/{chunk-EI5D5NAM.js → chunk-LXG44JKP.js} +2 -2
- package/dist/chunks/{chunk-EI5D5NAM.js.map → chunk-LXG44JKP.js.map} +3 -3
- package/dist/chunks/chunk-S3X3QFQD.js +2 -0
- package/dist/chunks/{chunk-KDIBFGZM.js.map → chunk-S3X3QFQD.js.map} +4 -4
- package/dist/chunks/chunk-TYJTJGPO.js +2 -0
- package/dist/chunks/chunk-TYJTJGPO.js.map +7 -0
- package/dist/chunks/chunk-WJ7SERCV.js +3 -0
- package/dist/chunks/{chunk-I2IONPCZ.js.map → chunk-WJ7SERCV.js.map} +2 -2
- package/dist/chunks/executeDiagonalize-DTKT5PPY.js +2 -0
- package/dist/chunks/{executeDiagonalize-XMPEDHVZ.js.map → executeDiagonalize-DTKT5PPY.js.map} +4 -4
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js +4 -4
- package/dist/jbrowse-plugin-graphgenomeviewer.esm.js.map +2 -2
- package/package.json +19 -19
- package/src/GetSubgraph.test.ts +1 -0
- package/src/GraphGenomeView/components/WalkStrip.tsx +1 -1
- package/src/GraphGenomeView/model.ts +3 -0
- package/src/panSNTabix.test.ts +1 -1
- package/src/panSNTabix.ts +2 -1
- package/src/synteny/ComparativeAdapterBase.ts +4 -6
- package/src/synteny/clipFeatureToRegion.test.ts +1 -2
- package/src/version.ts +1 -1
- package/dist/chunks/AddTrackWorkflow-F6FBBEJM.js +0 -2
- package/dist/chunks/GraphTrackSettingsDialog-LXYUYPZS.js +0 -4
- package/dist/chunks/LinearGraphDisplay-WPXUCJNR.js +0 -2
- package/dist/chunks/chunk-I2IONPCZ.js +0 -3
- package/dist/chunks/chunk-KDIBFGZM.js +0 -2
- package/dist/chunks/chunk-XEJ47DLD.js +0 -2
- package/dist/chunks/chunk-XEJ47DLD.js.map +0 -7
- package/dist/chunks/executeDiagonalize-XMPEDHVZ.js +0 -2
- /package/dist/chunks/{MinigraphBubbleAdapter-CK7AE4QT.js.map → MinigraphBubbleAdapter-CZYQROL2.js.map} +0 -0
- /package/dist/chunks/{RgfaTabixAdapter-QPKEJZXA.js.map → RgfaTabixAdapter-BBWH5IPF.js.map} +0 -0
- /package/dist/chunks/{chunk-CNFN6EVE.js.map → chunk-BUXVOMDL.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x}from"./chunk-
|
|
1
|
+
import{a as x}from"./chunk-WJ7SERCV.js";import"./chunk-LXG44JKP.js";import"./chunk-UQEPPJEO.js";import"./chunk-SCMIJAAX.js";import"./chunk-FCWXYIFC.js";import"./chunk-BUXVOMDL.js";import{Z as L}from"./chunk-UTWFU4X6.js";import"./chunk-7BKUWQE5.js";import"./chunk-KULNKXPT.js";import{a as B}from"./chunk-J6KYLXRD.js";import{a as s,b as v,c as g,d as G}from"./chunk-TYJTJGPO.js";import{b as a}from"./chunk-FY3BTKY4.js";var S=a(g(),1);var m=a(v(),1),n=a(G(),1),C=a(g(),1),P=a(L(),1),o=a(s(),1),I=(0,P.makeStyles)()({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}}),b=(0,C.observer)(function({model:e}){let{classes:r}=I();return e.isLoading?(0,o.jsxs)(n.Paper,{className:r.paper,"data-testid":"graph-genome-loading",children:[(0,o.jsxs)("div",{className:r.row,children:[(0,o.jsx)(m.LoadingEllipses,{variant:"h6",message:e.statusMessage}),(0,o.jsx)(n.Button,{size:"small","data-testid":"graph-genome-cancel",onClick:()=>{e.cancelLoad()},children:"Cancel"})]}),(0,o.jsx)(n.LinearProgress,{variant:"indeterminate"})]}):e.error?(0,o.jsx)(n.Paper,{className:r.paper,children:(0,o.jsx)(m.ErrorBanner,{error:e.error,onReset:()=>{e.retryLoad()}})}):(0,o.jsx)(n.Paper,{className:r.paper,"data-testid":"graph-genome-load-canceled",children:(0,o.jsxs)("div",{className:r.row,children:[(0,o.jsx)(n.Typography,{variant:"h6",children:"Loading canceled"}),(0,o.jsx)(n.Button,{variant:"contained",size:"small","data-testid":"graph-genome-retry",onClick:()=>{e.retryLoad()},children:"Retry"})]})})}),h=b;var M=a(B(),1),N=a(v(),1),i=a(G(),1),w=a(g(),1),E=a(L(),1),t=a(s(),1),k=`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`,z=(0,E.makeStyles)()({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"}}),R=(0,w.observer)(function({model:e}){let{classes:r}=z(),[d,T]=(0,M.useState)("");function y(){d.trim()&&e.loadGFAFromLocation({uri:d,locationType:"UriLocation"})}function A(p){let c=p.target.files?.[0];c&&c.text().then(f=>e.loadGFA(f,c.name)).catch(f=>{e.setError(f)})}return(0,t.jsxs)(i.Paper,{className:r.paper,children:[(0,t.jsx)("div",{className:r.header,children:(0,t.jsx)(i.Typography,{variant:"h6",children:"Load a GFA graph"})}),(0,t.jsxs)("div",{className:r.column,children:[(0,t.jsxs)("div",{className:r.rowCenter,children:[(0,t.jsxs)(i.Button,{variant:"outlined",component:"label",size:"small",children:["Choose file",(0,t.jsx)("input",{type:"file",accept:".gfa,.gfa1,.gfa2",hidden:!0,onChange:p=>{A(p)}})]}),(0,t.jsx)(i.Typography,{variant:"caption",color:"text.secondary",children:"Whole-file GFA; best for small/medium graphs."})]}),(0,t.jsxs)("div",{className:r.rowEnd,children:[(0,t.jsx)(i.TextField,{size:"small",label:"URL",placeholder:"https://example.com/graph.gfa",value:d,onChange:p=>{T(p.target.value)},onKeyDown:p=>{p.key==="Enter"&&y()},className:r.flex1}),(0,t.jsx)(i.Button,{variant:"contained",onClick:()=>{y()},disabled:!d.trim(),children:"Open"})]})]}),(0,t.jsx)("div",{className:r.footer,children:(0,t.jsx)(i.Button,{size:"small",onClick:()=>{e.loadGFA(k,"Example graph")},children:"Load 4-node example"})}),e.error?(0,t.jsx)(N.ErrorBanner,{error:e.error}):null]})}),F=R;var l=a(s(),1),U=(0,S.observer)(function({model:e}){return e.hasGraph?(0,l.jsx)(x,{model:e}):e.canRetryLoad&&(e.error||e.loadCanceled)?(0,l.jsx)(h,{model:e}):(0,l.jsxs)(l.Fragment,{children:[e.isLoading?(0,l.jsx)(h,{model:e}):null,(0,l.jsx)("div",{hidden:e.isLoading,children:(0,l.jsx)(F,{model:e})})]})}),O=U;export{O as default};
|
|
10
|
-
//# sourceMappingURL=GraphGenomeView-
|
|
10
|
+
//# sourceMappingURL=GraphGenomeView-TJ667XWP.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/GraphGenomeView/components/GraphGenomeView.tsx", "../../src/GraphGenomeView/components/GraphLoadStatus.tsx", "../../src/GraphGenomeView/components/ImportForm.tsx"],
|
|
4
4
|
"sourcesContent": ["import { observer } from 'mobx-react'\n\nimport GraphCanvas from './GraphCanvas'\nimport GraphLoadStatus from './GraphLoadStatus'\nimport ImportForm from './ImportForm'\n\nimport type { GraphPaneModel } from '../model'\n\nconst GraphGenomeView = observer(function GraphGenomeView({\n model,\n}: {\n model: GraphPaneModel\n}) {\n if (model.hasGraph) {\n return <GraphCanvas model={model} />\n }\n // A launched or restored view has a source of its own, so the import form\n // has nothing to offer it when that source fails\n if (model.canRetryLoad && (model.error || model.loadCanceled)) {\n return <GraphLoadStatus model={model} />\n }\n // Hidden rather than unmounted, so a typed URL survives a failed load\n return (\n <>\n {model.isLoading ? <GraphLoadStatus model={model} /> : null}\n <div hidden={model.isLoading}>\n <ImportForm model={model} />\n </div>\n </>\n )\n})\n\nexport default GraphGenomeView\n", "import { ErrorBanner, LoadingEllipses } from '@jbrowse/core/ui'\nimport { Button, LinearProgress, Paper, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { GraphPaneModel } from '../model'\n\nconst useStyles = makeStyles()({\n paper: {\n padding: 16,\n margin: 8,\n maxWidth: 560,\n marginInline: 'auto',\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n },\n row: {\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 8,\n },\n})\n\n// What a view with no graph on screen shows while its load runs, and after a\n// load of a source it can retry was canceled or failed.\nconst GraphLoadStatus = observer(function GraphLoadStatus({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n if (model.isLoading) {\n return (\n <Paper className={classes.paper} data-testid=\"graph-genome-loading\">\n <div className={classes.row}>\n <LoadingEllipses variant=\"h6\" message={model.statusMessage} />\n <Button\n size=\"small\"\n data-testid=\"graph-genome-cancel\"\n onClick={() => {\n model.cancelLoad()\n }}\n >\n Cancel\n </Button>\n </div>\n <LinearProgress variant=\"indeterminate\" />\n </Paper>\n )\n }\n if (model.error) {\n return (\n <Paper className={classes.paper}>\n <ErrorBanner\n error={model.error}\n onReset={() => {\n model.retryLoad()\n }}\n />\n </Paper>\n )\n }\n return (\n <Paper className={classes.paper} data-testid=\"graph-genome-load-canceled\">\n <div className={classes.row}>\n <Typography variant=\"h6\">Loading canceled</Typography>\n <Button\n variant=\"contained\"\n size=\"small\"\n data-testid=\"graph-genome-retry\"\n onClick={() => {\n model.retryLoad()\n }}\n >\n Retry\n </Button>\n </div>\n </Paper>\n )\n})\n\nexport default GraphLoadStatus\n", "import { useState } from 'react'\n\nimport { ErrorBanner } from '@jbrowse/core/ui'\nimport { Button, Paper, TextField, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { GraphPaneModel } from '../model'\n\nconst EXAMPLE_GFA = `H\\tVN:Z:1.0\nS\\t1\\tACGT\nS\\t2\\tGGCC\nS\\t3\\tTTAA\nS\\t4\\tCCGG\nL\\t1\\t+\\t2\\t+\\t0M\nL\\t1\\t+\\t3\\t+\\t0M\nL\\t2\\t+\\t4\\t+\\t0M\nL\\t3\\t+\\t4\\t+\\t0M`\n\nconst useStyles = makeStyles()({\n column: { display: 'flex', flexDirection: 'column', gap: 8 },\n rowEnd: { display: 'flex', gap: 8, alignItems: 'flex-end' },\n rowCenter: { display: 'flex', gap: 8, alignItems: 'center' },\n flex1: { flex: 1 },\n paper: { padding: 16, margin: 8, maxWidth: 560, marginInline: 'auto' },\n header: { marginBottom: 12 },\n footer: { marginTop: 12, display: 'flex', justifyContent: 'flex-end' },\n})\n\nconst ImportForm = observer(function ImportForm({\n model,\n}: {\n model: GraphPaneModel\n}) {\n const { classes } = useStyles()\n const [url, setUrl] = useState('')\n\n function handleUrlLoad() {\n if (url.trim()) {\n void model.loadGFAFromLocation({ uri: url, locationType: 'UriLocation' })\n }\n }\n\n function handleFileUpload(event: React.ChangeEvent<HTMLInputElement>) {\n const file = event.target.files?.[0]\n if (file) {\n file\n .text()\n .then(text => model.loadGFA(text, file.name))\n .catch((err: unknown) => {\n model.setError(err)\n })\n }\n }\n\n return (\n <Paper className={classes.paper}>\n <div className={classes.header}>\n <Typography variant=\"h6\">Load a GFA graph</Typography>\n </div>\n\n <div className={classes.column}>\n <div className={classes.rowCenter}>\n <Button variant=\"outlined\" component=\"label\" size=\"small\">\n Choose file\n <input\n type=\"file\"\n accept=\".gfa,.gfa1,.gfa2\"\n hidden\n onChange={event => {\n handleFileUpload(event)\n }}\n />\n </Button>\n <Typography variant=\"caption\" color=\"text.secondary\">\n Whole-file GFA; best for small/medium graphs.\n </Typography>\n </div>\n\n <div className={classes.rowEnd}>\n <TextField\n size=\"small\"\n label=\"URL\"\n placeholder=\"https://example.com/graph.gfa\"\n value={url}\n onChange={e => {\n setUrl(e.target.value)\n }}\n onKeyDown={e => {\n if (e.key === 'Enter') {\n handleUrlLoad()\n }\n }}\n className={classes.flex1}\n />\n <Button\n variant=\"contained\"\n onClick={() => {\n handleUrlLoad()\n }}\n disabled={!url.trim()}\n >\n Open\n </Button>\n </div>\n </div>\n\n <div className={classes.footer}>\n <Button\n size=\"small\"\n onClick={() => {\n void model.loadGFA(EXAMPLE_GFA, 'Example graph')\n }}\n >\n Load 4-node example\n </Button>\n </div>\n\n {model.error ? <ErrorBanner error={model.error} /> : null}\n </Paper>\n )\n})\n\nexport default ImportForm\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "iaAAA,IAAAA,EAAyB,SCAzB,IAAAC,EAA6C,SAC7CC,EAA0D,SAC1DC,EAAyB,SACzBC,EAA2B,SAiCnBC,EAAA,SA7BFC,KAAY,cAAW,EAAE,CAC7B,MAAO,CACL,QAAS,GACT,OAAQ,EACR,SAAU,IACV,aAAc,OACd,QAAS,OACT,cAAe,SACf,IAAK,EACP,EACA,IAAK,CACH,QAAS,OACT,WAAY,SACZ,eAAgB,gBAChB,IAAK,CACP,CACF,CAAC,EAIKC,KAAkB,YAAS,SAAyB,CACxD,MAAAC,CACF,EAEG,CACD,GAAM,CAAE,QAAAC,CAAQ,EAAIH,EAAU,EAC9B,OAAIE,EAAM,aAEN,QAAC,SAAM,UAAWC,EAAQ,MAAO,cAAY,uBAC3C,qBAAC,OAAI,UAAWA,EAAQ,IACtB,oBAAC,mBAAgB,QAAQ,KAAK,QAASD,EAAM,cAAe,KAC5D,OAAC,UACC,KAAK,QACL,cAAY,sBACZ,QAAS,IAAM,CACbA,EAAM,WAAW,CACnB,EACD,kBAED,GACF,KACA,OAAC,kBAAe,QAAQ,gBAAgB,GAC1C,EAGAA,EAAM,SAEN,OAAC,SAAM,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EAIhCA,EAAM,eAAiBA,EAAM,OAASA,EAAM,iBACvC,OAACE,EAAA,CAAgB,MAAOF,EAAO,KAItC,oBACG,UAAAA,EAAM,aAAY,OAACE,EAAA,CAAgB,MAAOF,EAAO,EAAK,QACvD,OAAC,OAAI,OAAQA,EAAM,UACjB,mBAACG,EAAA,CAAW,MAAOH,EAAO,EAC5B,GACF,CAEJ,CAAC,EAEMI,EAAQL",
|
|
6
6
|
"names": ["import_mobx_react", "import_ui", "import_material", "import_mobx_react", "import_mui", "import_jsx_runtime", "useStyles", "GraphLoadStatus", "model", "classes", "GraphLoadStatus_default", "import_react", "import_ui", "import_material", "import_mobx_react", "import_mui", "import_jsx_runtime", "EXAMPLE_GFA", "useStyles", "ImportForm", "model", "classes", "url", "setUrl", "handleUrlLoad", "handleFileUpload", "event", "file", "text", "err", "e", "ImportForm_default", "import_jsx_runtime", "GraphGenomeView", "model", "GraphCanvas_default", "GraphLoadStatus_default", "ImportForm_default", "GraphGenomeView_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as g}from"./chunk-BUXVOMDL.js";import{Z as f}from"./chunk-UTWFU4X6.js";import"./chunk-7BKUWQE5.js";import"./chunk-KULNKXPT.js";import{a as x}from"./chunk-J6KYLXRD.js";import{a as l,c as m,d as y}from"./chunk-TYJTJGPO.js";import{b as o}from"./chunk-FY3BTKY4.js";var a=o(y(),1),b=o(m(),1),S=o(f(),1),n=o(l(),1),L=(0,S.makeStyles)()({section:{marginBottom:24},formControl:{minWidth:200}}),w=[{value:0,label:"None"},{value:1,label:"1 hop"},{value:2,label:"2 hops"}],k=(0,b.observer)(function({model:e}){let{classes:t}=L();return(0,n.jsxs)("div",{className:t.section,children:[(0,n.jsxs)(a.FormControl,{className:t.formControl,children:[(0,n.jsx)(a.InputLabel,{children:"Graph context"}),(0,n.jsx)(a.Select,{value:e.subgraphContext,label:"Graph context","data-testid":"graph-context-select",onChange:p=>{e.setSubgraphContext(p.target.value),e.cut()},children:w.map(({value:p,label:u})=>(0,n.jsx)(a.MenuItem,{value:p,children:u},p))})]}),(0,n.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"How far the cut follows links out of the region, one hop by default. A detour that leaves the reference before the window and rejoins after it is indexed under its own sequence, so at none its middle is missing and the one bubble draws as two unrelated stubs. Each hop costs a query per off-reference segment already reached."})]})}),v=k;var C=o(x(),1),d=o(y(),1),c=o(m(),1),G=o(f(),1),i=o(l(),1),T=(0,G.makeStyles)()({section:{marginBottom:24}});function M(r){let e=r.split(/[\s,]+/).map(t=>t.trim()).filter(t=>t!=="");return e.length===0?void 0:e}var F=(0,c.observer)(function({model:e}){let[t,p]=(0,C.useState)(e.chosenHaplotypes?.join(", ")??""),u=()=>{let s=M(t)??[];s.join(`
|
|
2
|
+
`)===(e.chosenHaplotypes??[]).join(`
|
|
3
|
+
`)||(e.setSubgraphHaplotypes(s),e.cut())};return(0,i.jsx)(d.TextField,{fullWidth:!0,label:"Haplotypes",placeholder:"every haplotype",value:t,slotProps:{htmlInput:{"data-testid":"graph-haplotypes-field"}},onChange:s=>{p(s.target.value)},onBlur:()=>{u()},onKeyDown:s=>{s.key==="Enter"&&u()}})}),N=(0,c.observer)(function({model:e}){let{classes:t}=T();return e.adapterConfig.type==="GbzBaseSyntenyAdapter"?(0,i.jsxs)("div",{className:t.section,children:[(0,i.jsx)(F,{model:e},e.chosenHaplotypes?.join(",")??""),(0,i.jsx)(d.Typography,{variant:"caption",color:"text.secondary",children:"The haplotypes the cut is for, as lane assembly names or PanSN prefixes (HG002#1, or HG002 for both), separated by commas. The cut keeps their walks and the nodes those walks visit, with the reference. Empty is every haplotype."})]}):null}),H=N;var h=o(l(),1);function B({model:r,open:e,onClose:t}){return(0,h.jsxs)(g,{model:r,open:e,onClose:t,children:[(0,h.jsx)(v,{model:r}),(0,h.jsx)(H,{model:r})]})}export{B as default};
|
|
4
|
+
//# sourceMappingURL=GraphTrackSettingsDialog-JVPM25GV.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 {\n FormControl,\n InputLabel,\n MenuItem,\n Select,\n Typography,\n} from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { LinearGraphCutModel } from '../model'\n\nconst useStyles = makeStyles()({\n section: {\n marginBottom: 24,\n },\n formControl: {\n minWidth: 200,\n },\n})\n\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 return (\n <div className={classes.section}>\n <FormControl className={classes.formControl}>\n <InputLabel>Graph context</InputLabel>\n <Select\n value={model.subgraphContext}\n label=\"Graph context\"\n data-testid=\"graph-context-select\"\n onChange={e => {\n model.setSubgraphContext(e.target.value)\n void model.cut()\n }}\n >\n {SUBGRAPH_CONTEXTS.map(({ value, label }) => (\n <MenuItem key={value} value={value}>\n {label}\n </MenuItem>\n ))}\n </Select>\n </FormControl>\n <Typography variant=\"caption\" color=\"text.secondary\">\n How far the cut follows links out of the region, one hop by default. A\n detour that leaves the reference before the window and rejoins after it\n is indexed under its own sequence, so at none its middle is missing and\n the one bubble draws as two unrelated stubs. Each hop costs a query per\n off-reference segment already reached.\n </Typography>\n </div>\n )\n})\n\nexport default SubgraphContextSelect\n", "import { useState } from 'react'\n\nimport { TextField, Typography } from '@mui/material'\nimport { observer } from 'mobx-react'\nimport { makeStyles } from 'tss-react/mui'\n\nimport type { LinearGraphCutModel } from '../model'\n\nconst useStyles = makeStyles()({\n section: {\n marginBottom: 24,\n },\n})\n\nexport function parseHaplotypeList(text: string) {\n const names = text\n .split(/[\\s,]+/)\n .map(name => name.trim())\n .filter(name => name !== '')\n return names.length === 0 ? undefined : names\n}\n\nconst HaplotypeListField = observer(function HaplotypeListField({\n model,\n}: {\n model: LinearGraphCutModel\n}) {\n const [draft, setDraft] = useState(model.chosenHaplotypes?.join(', ') ?? '')\n const apply = () => {\n const parsed = parseHaplotypeList(draft) ?? []\n const unchanged =\n parsed.join('\\n') === (model.chosenHaplotypes ?? []).join('\\n')\n if (!unchanged) {\n model.setSubgraphHaplotypes(parsed)\n void model.cut()\n }\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// Only a GBZ cut reads the set. The inner field is keyed on it so an outside\n// change (a restored session, a launch) resets the draft rather than fighting\n// it.\nconst SubgraphHaplotypesField = observer(function SubgraphHaplotypesField({\n model,\n}: {\n model: LinearGraphCutModel\n}) {\n const { classes } = useStyles()\n return model.adapterConfig.type === 'GbzBaseSyntenyAdapter' ? (\n <div className={classes.section}>\n <HaplotypeListField\n key={model.chosenHaplotypes?.join(',') ?? ''}\n model={model}\n />\n <Typography variant=\"caption\" color=\"text.secondary\">\n The haplotypes the cut is for, as lane assembly names or PanSN prefixes\n (HG002#1, or HG002 for both), separated by commas. The cut keeps their\n walks and the nodes those walks visit, with the reference. Empty is\n 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 open,\n onClose,\n}: {\n model: LinearGraphCutModel\n open: boolean\n onClose: () => void\n}) {\n return (\n <GraphSettingsDialog model={model} open={open} onClose={onClose}>\n <SubgraphContextSelect model={model} />\n <SubgraphHaplotypesField model={model} />\n </GraphSettingsDialog>\n )\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "8QAAA,IAAAA,EAMO,SACPC,EAAyB,SACzBC,EAA2B,SAkCrBC,EAAA,SA9BAC,KAAY,cAAW,EAAE,CAC7B,QAAS,CACP,aAAc,EAChB,EACA,YAAa,CACX,SAAU,GACZ,CACF,CAAC,EASKC,EAAoB,CACxB,CAAE,MAAO,EAAG,MAAO,MAAO,EAC1B,CAAE,MAAO,EAAG,MAAO,OAAQ,EAC3B,CAAE,MAAO,EAAG,MAAO,QAAS,CAC9B,EAEMC,KAAwB,YAAS,SAA+B,CACpE,MAAAC,CACF,EAEG,CACD,GAAM,CAAE,QAAAC,CAAQ,EAAIJ,EAAU,EAC9B,SACE,QAAC,OAAI,UAAWI,EAAQ,QACtB,qBAAC,eAAY,UAAWA,EAAQ,YAC9B,oBAAC,cAAW,yBAAa,KACzB,OAAC,UACC,MAAOD,EAAM,gBACb,MAAM,gBACN,cAAY,uBACZ,SAAUE,GAAK,CACbF,EAAM,mBAAmBE,EAAE,OAAO,KAAK,EAClCF,EAAM,IAAI,CACjB,EAEC,SAAAF,EAAkB,IAAI,CAAC,CAAE,MAAAK,EAAO,MAAAC,CAAM,OACrC,OAAC,YAAqB,MAAOD,EAC1B,SAAAC,GADYD,CAEf,CACD,EACH,GACF,KACA,OAAC,cAAW,QAA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AkB,KAAK,GAAG,GAAK,EAE5C,KACA,OAAC,cAAW,QAAQ,UAAU,MAAM,iBAAiB,+OAKrD,GACF,EACE,IACN,CAAC,EAEMQ,EAAQF,ECpEX,IAAAG,EAAA,SAVW,SAARC,EAA0C,CAC/C,MAAAC,EACA,KAAAC,EACA,QAAAC,CACF,EAIG,CACD,SACE,QAACC,EAAA,CAAoB,MAAOH,EAAO,KAAMC,EAAM,QAASC,EACtD,oBAACE,EAAA,CAAsB,MAAOJ,EAAO,KACrC,OAACK,EAAA,CAAwB,MAAOL,EAAO,GACzC,CAEJ",
|
|
6
6
|
"names": ["import_material", "import_mobx_react", "import_mui", "import_jsx_runtime", "useStyles", "SUBGRAPH_CONTEXTS", "SubgraphContextSelect", "model", "classes", "e", "value", "label", "SubgraphContextSelect_default", "import_react", "import_material", "import_mobx_react", "import_mui", "import_jsx_runtime", "useStyles", "parseHaplotypeList", "text", "names", "name", "HaplotypeListField", "model", "draft", "setDraft", "apply", "parsed", "e", "SubgraphHaplotypesField", "classes", "SubgraphHaplotypesField_default", "import_jsx_runtime", "GraphTrackSettingsDialog", "model", "open", "onClose", "GraphSettingsDialog_default", "SubgraphContextSelect_default", "SubgraphHaplotypesField_default"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as i}from"./chunk-WJ7SERCV.js";import"./chunk-LXG44JKP.js";import"./chunk-UQEPPJEO.js";import"./chunk-SCMIJAAX.js";import"./chunk-FCWXYIFC.js";import"./chunk-BUXVOMDL.js";import"./chunk-UTWFU4X6.js";import"./chunk-7BKUWQE5.js";import"./chunk-KULNKXPT.js";import"./chunk-J6KYLXRD.js";import{a as e,c as d}from"./chunk-TYJTJGPO.js";import{a as h,b as t}from"./chunk-FY3BTKY4.js";var p=h((l,o)=>{o.exports=JBrowseExports["@jbrowse/display-kit/DisplayChrome"]});var s=t(p(),1),n=t(d(),1);var r=t(e(),1),y=(0,n.observer)(function({model:a}){return(0,r.jsx)(s.DisplayStatusChrome,{model:a,phase:a.displayPhase,drawn:a.painted&&a.geometryPainted,testid:"linear-graph-display","data-layout":a.chosenLayoutMode,"data-cut-tier":a.cutTier,"data-recuts":a.recuts,"data-node-count":a.hasGraph?a.nodeCount:void 0,"data-loading":a.isLoading?"":void 0,style:{width:a.paneWidth,height:a.height,overflow:"hidden"},children:(0,r.jsx)(i,{model:a,ownChrome:!1})})}),c=y;export{c as default};
|
|
2
|
+
//# sourceMappingURL=LinearGraphDisplay-ME3WCBV3.js.map
|
package/dist/chunks/{LinearGraphDisplay-WPXUCJNR.js.map → LinearGraphDisplay-ME3WCBV3.js.map}
RENAMED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["global-externals:@jbrowse/display-kit/DisplayChrome", "../../src/LinearGraphDisplay/components/LinearGraphDisplay.tsx"],
|
|
4
4
|
"sourcesContent": ["module.exports = JBrowseExports[\"@jbrowse/display-kit/DisplayChrome\"];", "import { DisplayStatusChrome } from '@jbrowse/display-kit/DisplayChrome'\nimport { observer } from 'mobx-react'\n\nimport GraphCanvas from '../../GraphGenomeView/components/GraphCanvas'\n\nimport type { LinearGraphDisplayModel } from '../model'\n\nconst LinearGraphDisplay = observer(function LinearGraphDisplay({\n model,\n}: {\n model: LinearGraphDisplayModel\n}) {\n return (\n <DisplayStatusChrome\n model={model}\n phase={model.displayPhase}\n drawn={model.painted && model.geometryPainted}\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 <GraphCanvas model={model} ownChrome={false} />\n </DisplayStatusChrome>\n )\n})\n\nexport default LinearGraphDisplay\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": "kYAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAAAA,EAAO,QAAU,eAAe,oCAAoC,ICApE,IAAAC,EAAoC,SACpCC,EAAyB,SA4BnB,IAAAC,EAAA,SAtBAC,KAAqB,YAAS,SAA4B,CAC9D,MAAAC,CACF,EAEG,CACD,SACE,OAAC,uBACC,MAAOA,EACP,MAAOA,EAAM,aACb,MAAOA,EAAM,SAAWA,EAAM,gBAC9B,OAAO,uBACP,cAAaA,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,EAEA,mBAACC,EAAA,CAAY,MAAOD,EAAO,UAAW,GAAO,EAC/C,CAEJ,CAAC,EAEME,EAAQH",
|
|
6
6
|
"names": ["require_DisplayChrome", "__commonJSMin", "exports", "module", "import_DisplayChrome", "import_mobx_react", "import_jsx_runtime", "LinearGraphDisplay", "model", "GraphCanvas_default", "LinearGraphDisplay_default"]
|
|
7
7
|
}
|
package/dist/chunks/{MinigraphBubbleAdapter-CK7AE4QT.js → MinigraphBubbleAdapter-CZYQROL2.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as N,b as C,d as b,e as p}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=MinigraphBubbleAdapter-
|
|
1
|
+
import{a as N,b as C,d as b,e as p}from"./chunk-S3X3QFQD.js";import"./chunk-KWAXLUPQ.js";import{a as y}from"./chunk-J4OLMLS5.js";import{a as u,c as m,e as g}from"./chunk-UQEPPJEO.js";import"./chunk-KULNKXPT.js";import{b as n}from"./chunk-FY3BTKY4.js";var f=n(N(),1),r=n(y(),1),c=n(C(),1);var o=class extends f.BaseFeatureDataAdapter{static{this.capabilities=["getFeatures","getRefNames"]}constructor(t,a,s){super(t,a,s),this.bubbles=b(this,["bubblesLocation"],["index"]),this.refNames=new p(this.bubbles,this)}async getRefNames(t={}){return this.refNames.assemblyRefNames(t)}async hasDataForRefName(){return!0}getFeatures(t,a={}){let{signal:s,statusCallback:d}=a;return(0,c.ObservableCreate)(async i=>{let l=await this.refNames.resolve(t,a);l!==void 0&&await(0,r.updateStatus)("Downloading bubbles",d,()=>this.bubbles.getLines(l,t.start,t.end,{signal:s,lineCallback:(h,A)=>{let e=u(h);i.next(new r.SimpleFeature({uniqueId:`bubble-${A}`,refName:t.refName,start:e.start,end:e.end,name:m(e),description:g(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}))}})),i.complete()},s)}};export{o as default};
|
|
2
|
+
//# sourceMappingURL=MinigraphBubbleAdapter-CZYQROL2.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as O,b as P,d as h,e as L}from"./chunk-
|
|
1
|
+
import{a as O,b as P,d as h,e as L}from"./chunk-S3X3QFQD.js";import"./chunk-KWAXLUPQ.js";import{a as B}from"./chunk-J4OLMLS5.js";import"./chunk-KULNKXPT.js";import{b as S}from"./chunk-FY3BTKY4.js";var F=S(O(),1),l=S(B(),1),M=S(P(),1);function x(t){let e=t.split(" ");return{refName:e[0],start:+e[1],end:+e[2],id:e[3],rank:+e[4],tags:e[5]??""}}function $(t){let e=t.tags.split(" ").find(a=>a.startsWith("SM:Z:"));if(e===void 0)return;let n=e.slice(5).split(",").map(a=>a.trim()).filter(Boolean);return n.length>0?n:void 0}function w(t){return{id:t.slice(0,-1),strand:t.slice(-1)}}function A(t){let e=t.split(" "),n=w(e[3]),a=w(e[4]);return{source:n.id,sourceStrand:n.strand,target:a.id,targetStrand:a.strand,sourceSegment:{id:n.id,refName:e[5],start:+e[6],end:+e[7],rank:+e[8],tags:e[13]??""},targetSegment:{id:a.id,refName:e[9],start:+e[10],end:+e[11],rank:+e[12],tags:e[14]??""}}}function I(t){return`${t.source}${t.sourceStrand}${t.target}${t.targetStrand}`}var j=/^[A-Za-z][A-Za-z0-9]:[AifZJHB]:/;function G(t){let{id:e,refName:n,start:a,end:r,rank:s,tags:m}=t,o=m.split(" ").filter(g=>j.test(g)),i=o.length===0?"":` ${o.join(" ")}`;return`S ${e} * LN:i:${r-a} SN:Z:${n} SO:i:${a} SR:i:${s}${i}`}function Z(t){let{source:e,sourceStrand:n,target:a,targetStrand:r}=t;return`L ${e} ${n} ${a} ${r} 0M`}function b(t,e){return t<e?-1:t>e?1:0}function T(t,e){let n=[...t.values()].sort((r,s)=>b(r.refName,s.refName)||r.start-s.start||b(r.id,s.id)),a=[...e.keys()].sort((r,s)=>b(r,s));return["H VN:Z:1.0",...n.map(r=>G(r)),...a.map(r=>Z(e.get(r)))].join(`
|
|
2
2
|
`)}function C(t){return t.filter(e=>e.rank>0)}var N=class extends F.BaseFeatureDataAdapter{static{this.capabilities=["getFeatures","getRefNames"]}constructor(e,n,a){super(e,n,a),this.fine=this.openIndex([])}openIndex(e){let n=h(this,[...e,"segmentsLocation"],[...e,"segmentsIndex"]);return{segments:n,links:h(this,[...e,"linksLocation"],[...e,"linksIndex"]),refNames:new L(n,this)}}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 hasDataForRefName(){return!0}getFeatures(e,n={}){let{signal:a,statusCallback:r}=n;return(0,M.ObservableCreate)(async s=>{let m=await this.fine.refNames.resolve(e,n);m!==void 0&&await(0,l.updateStatus)("Downloading segments",r,()=>this.fine.segments.getLines(m,e.start,e.end,{signal:a,lineCallback:o=>{let i=x(o),g=$(i);s.next(new l.SimpleFeature({uniqueId:i.id,refName:e.refName,start:i.start,end:i.end,name:i.id,type:"segment",rank:i.rank,stableName:i.refName,...g&&{samples:g,sampleCount:g.length}}))}})),s.complete()},a)}async getSubgraph(e,n={}){let{hops:a=0,signal:r,tier:s}=n,m=this.index(s),o=new Map,i=new Map,g=await m.refNames.resolve(e,{signal:r}),R=async(f,p,d)=>{let y=[];return await m.links.getLines(f,p,d,{signal:r,lineCallback:v=>{let c=A(v);i.set(I(c),c);for(let u of[c.sourceSegment,c.targetSegment])o.has(u.id)||(o.set(u.id,u),y.push(u))}}),y};if(g===void 0)throw new Error(`${e.assemblyName} ${e.refName} is not in this graph's index; a graph with PanSN names (GRCh38#0#chr1) needs ${e.assemblyName} mapped to its prefix in assemblyNameToPanSN`);await m.segments.getLines(g,e.start,e.end,{signal:r,lineCallback:f=>{let p=x(f);o.set(p.id,p)}});let k=C(await R(g,e.start,e.end));for(let f=0;f<a;f++){let p=await Promise.all(k.map(d=>R(d.refName,d.start,d.end)));k=C(p.flat())}return T(o,i)}};export{N as default};
|
|
3
|
-
//# sourceMappingURL=RgfaTabixAdapter-
|
|
3
|
+
//# sourceMappingURL=RgfaTabixAdapter-BBWH5IPF.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as u,b as d,c as h,d as y}from"./chunk-TYJTJGPO.js";import{b as r}from"./chunk-FY3BTKY4.js";var t=r(u(),1),a=r(d(),1),o=r(y(),1),i=r(h(),1),k=(0,i.observer)(function({model:n,title:s,children:l,handleClose:m}){return(0,t.jsxs)(a.InfoDialog,{open:!0,title:s,onClose:()=>{m()},children:[l,n.trackWarnings.flatMap(({name:f,warnings:g},p)=>g.map((e,c)=>(0,t.jsxs)(o.Alert,{severity:"warning",style:{marginBottom:8},children:[(0,t.jsxs)(o.Typography,{variant:"subtitle2",children:[f,": ",e.message]}),e.effect]},`${p}_${c}`)))]})}),x=k;export{x as default};
|
|
2
|
+
//# sourceMappingURL=TrackWarningsDialog-HPHM5S7U.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/@jbrowse+synteny-core@5.0.0-beta.11_@emotion+react@11.14.0_@types+react@19.3.0_react@19_62128aa7a8a5629affa9cb1a58afadc3/node_modules/@jbrowse/synteny-core/esm/TrackWarningsDialog.js"],
|
|
4
|
+
"sourcesContent": ["import { jsxs as _jsxs } from \"react/jsx-runtime\";\nimport { InfoDialog } from '@jbrowse/core/ui';\nimport { Alert, Typography } from '@mui/material';\nimport { observer } from 'mobx-react';\n/**\n * The render-warnings report both comparative views open, over the rows\n * `collectTrackWarnings` builds for them. Reads them off the view rather than\n * taking a copy, so a refetch that raises or clears a warning while the dialog\n * is open shows in it.\n *\n * Grouped by track, with the track name leading each row: a stacked view's\n * levels raise the same swapped-assemblies warning verbatim, and so does every\n * overlaid track that hits it, so an ungrouped list repeated one sentence N\n * times without ever naming the file to go fix.\n *\n * Keyed by position \u2014 the message is not an identity, and neither is the track\n * name once one track raises two warnings.\n */\nconst TrackWarningsDialog = observer(function TrackWarningsDialog({ model, title, children, handleClose, }) {\n return (_jsxs(InfoDialog, { open: true, title: title, onClose: () => {\n handleClose();\n }, children: [children, model.trackWarnings.flatMap(({ name, warnings }, i) => warnings.map((w, j) => (_jsxs(Alert\n // eslint-disable-next-line @eslint-react/no-array-index-key -- see above\n , { severity: \"warning\", style: { marginBottom: 8 }, children: [_jsxs(Typography, { variant: \"subtitle2\", children: [name, \": \", w.message] }), w.effect] }, `${i}_${j}`))))] }));\n});\nexport default TrackWarningsDialog;\n"],
|
|
5
|
+
"mappings": "qGAAA,IAAAA,EAA8B,SAC9BC,EAA2B,SAC3BC,EAAkC,SAClCC,EAAyB,SAenBC,KAAsB,YAAS,SAA6B,CAAE,MAAAC,EAAO,MAAAC,EAAO,SAAAC,EAAU,YAAAC,CAAa,EAAG,CACxG,SAAQ,EAAAC,MAAM,aAAY,CAAE,KAAM,GAAM,MAAOH,EAAO,QAAS,IAAM,CAC7DE,EAAY,CAChB,EAAG,SAAU,CAACD,EAAUF,EAAM,cAAc,QAAQ,CAAC,CAAE,KAAAK,EAAM,SAAAC,CAAS,EAAGC,IAAMD,EAAS,IAAI,CAACE,EAAGC,OAAO,EAAAL,MAAM,QAEvG,CAAE,SAAU,UAAW,MAAO,CAAE,aAAc,CAAE,EAAG,SAAU,IAAC,EAAAA,MAAM,aAAY,CAAE,QAAS,YAAa,SAAU,CAACC,EAAM,KAAMG,EAAE,OAAO,CAAE,CAAC,EAAGA,EAAE,MAAM,CAAE,EAAG,GAAGD,CAAC,IAAIE,CAAC,EAAE,CAAE,CAAC,CAAC,CAAE,CAAC,CAC3L,CAAC,EACMC,EAAQX",
|
|
6
|
+
"names": ["import_jsx_runtime", "import_ui", "import_material", "import_mobx_react", "TrackWarningsDialog", "model", "title", "children", "handleClose", "_jsxs", "name", "warnings", "i", "w", "j", "TrackWarningsDialog_default"]
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{G as c,O as m,R as u,U as g,Z as M}from"./chunk-UTWFU4X6.js";import{a as d,b as N,c as I,d as G}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{G as c,O as m,R as u,U as g,Z as M}from"./chunk-UTWFU4X6.js";import{a as d,b as N,c as I,d as G}from"./chunk-TYJTJGPO.js";import{a as T,b as l}from"./chunk-FY3BTKY4.js";var b=T((D,y)=>{y.exports=JBrowseExports["@mui/material/Button"]});var C=l(N(),1),a=l(G(),1),f=l(b(),1),h=l(I(),1),k=l(M(),1),e=l(d(),1),B=(0,k.makeStyles)()({section:{marginBottom:24},formControl:{minWidth:200}}),R=["Lowest","Low","Medium","High","Highest"],v=(0,h.observer)(function({model:s}){return s.hasGraph&&!s.usesLayoutEngine?(0,e.jsx)(a.Typography,{variant:"caption",color:"warning.main",children:"No effect on this layout: only the force-directed layout is drawn by the engine that reads this."}):null}),x=(0,h.observer)(function(s){let{model:o,open:S,onClose:p,children:L}=s,{classes:n}=B();return(0,e.jsxs)(C.Dialog,{open:S,onClose:p,title:"Graph settings",children:[(0,e.jsxs)(a.DialogContent,{children:[(0,e.jsx)("div",{className:n.section,children:(0,e.jsxs)(a.FormControl,{fullWidth:!0,children:[(0,e.jsx)(a.FormLabel,{component:"legend",children:"Layout quality"}),(0,e.jsx)(a.RadioGroup,{value:o.layoutQuality,onChange:t=>{let r=parseInt(t.target.value);o.setLayoutQuality(r),o.recomputeLayout()},children:R.map((t,r)=>(0,e.jsx)(a.FormControlLabel,{value:r,control:(0,e.jsx)(a.Radio,{}),label:t},t))}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"FMMM's iteration budget, the same scale Bandage exposes. Higher is slower: on a thousand-node cut the top setting is seconds rather than tenths."}),(0,e.jsx)(v,{model:o})]})}),(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsx)(a.FormControlLabel,{control:(0,e.jsx)(a.Switch,{checked:o.drawPaths,onChange:t=>{o.setDrawPaths(t.target.checked)}}),label:"Draw paths"}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"Color each node and connector by the paths through it, one lane per path in legend order, so a path that skips a node leaves its lane empty"}),o.drawPaths&&!o.effectiveDrawPaths?(0,e.jsx)(a.Typography,{variant:"caption",color:"warning.main",children:o.pathCount>c?`Off: ${o.pathCount.toLocaleString()} paths is past the ${c} this can tell apart`:"Off: this graph states no paths"}):null]}),(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsx)(a.FormControlLabel,{control:(0,e.jsx)(a.Switch,{checked:o.showBubbles,onChange:t=>{o.setShowBubbles(t.target.checked)}}),label:"Mark bubbles"}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"A halo along the nodes of each bubble, labelled by what it is, with the label opening the bubble on its own"})]}),(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsx)(a.FormControlLabel,{control:(0,e.jsx)(a.Switch,{checked:o.showGenes,onChange:t=>{o.setShowGenes(t.target.checked)}}),label:"Genes on the backbone"}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"Exons along the reference nodes that carry them and each gene's name at its midpoint, from the assembly's annotation track"}),o.geneTrackChoices.length>1?(0,e.jsxs)(a.FormControl,{className:n.formControl,sx:{mt:1},children:[(0,e.jsx)(a.InputLabel,{children:"Gene track"}),(0,e.jsx)(a.Select,{value:o.geneTrack?.trackId??"",label:"Gene track","data-testid":"graph-gene-track-select",onChange:t=>{o.setGeneTrackId(t.target.value),o.reloadGenes()},children:o.geneTrackChoices.map(({trackId:t,name:r})=>(0,e.jsx)(a.MenuItem,{value:t,children:r},t))})]}):null,o.repeatTrackChoices.length>1?(0,e.jsxs)(a.FormControl,{className:n.formControl,sx:{mt:1},children:[(0,e.jsx)(a.InputLabel,{children:"Repeat track"}),(0,e.jsx)(a.Select,{value:o.repeatTrack?.trackId??"",label:"Repeat track","data-testid":"graph-repeat-track-select",onChange:t=>{o.setRepeatTrackId(t.target.value),o.reloadRepeats()},children:o.repeatTrackChoices.map(({trackId:t,name:r})=>(0,e.jsx)(a.MenuItem,{value:t,children:r},t))})]}):null]}),o.anchorPaths.length>1?(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsxs)(a.FormControl,{className:n.formControl,children:[(0,e.jsx)(a.InputLabel,{children:"Reference path"}),(0,e.jsx)(a.Select,{value:o.activeReferencePath??"",label:"Reference path","data-testid":"graph-reference-path-select",onChange:t=>{o.setReferencePath(t.target.value),o.recomputeLayout()},children:o.anchorPaths.map(({name:t})=>(0,e.jsx)(a.MenuItem,{value:t,children:t},t))})]}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"Which path the anchored layouts draw x against. A GFA with no rGFA tags states its coordinates only in its paths, and marks none of them as the reference."})]}):null,(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsxs)(a.FormControl,{className:n.formControl,children:[(0,e.jsx)(a.InputLabel,{children:"Bubble spread"}),(0,e.jsx)(a.Select,{value:o.bubbleSpread,label:"Bubble spread","data-testid":"graph-bubble-spread-select",onChange:t=>{o.setBubbleSpread(t.target.value),o.recomputeLayout()},children:m.map(({value:t,label:r,description:i})=>(0,e.jsx)(a.MenuItem,{value:t,children:(0,e.jsx)(a.Tooltip,{title:i,placement:"right",children:(0,e.jsx)("span",{children:r})})},t))})]}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"How far the force layout opens a bubble. A pangenome allele is a few bp, so at Bandage's own scale both arms land inside one node thickness and the graph draws as a rope."}),(0,e.jsx)(v,{model:o})]}),(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsxs)(a.FormControl,{className:n.formControl,children:[(0,e.jsx)(a.InputLabel,{children:"Node width"}),(0,e.jsx)(a.Select,{value:o.nodeWidth,label:"Node width","data-testid":"graph-node-width-select",onChange:t=>{o.setNodeWidth(t.target.value)},children:g.map(({value:t,label:r,description:i})=>(0,e.jsx)(a.MenuItem,{value:t,children:(0,e.jsx)(a.Tooltip,{title:i,placement:"right",children:(0,e.jsx)("span",{children:r})})},t))})]}),(0,e.jsx)(a.Typography,{variant:"caption",color:"text.secondary",children:"Bandage's depth as width. In a cut with walks, depth is how many haplotypes carry the node."})]}),L,(0,e.jsxs)("div",{className:n.section,children:[(0,e.jsxs)(a.FormControl,{className:n.formControl,children:[(0,e.jsx)(a.InputLabel,{children:"Color scheme"}),(0,e.jsx)(a.Select,{value:o.chosenColorScheme,label:"Color scheme",onChange:t=>{o.setColorScheme(t.target.value)},children:u.map(({value:t,label:r})=>(0,e.jsx)(a.MenuItem,{value:t,children:r},t))})]}),o.colorSchemeLock?(0,e.jsxs)(a.Typography,{variant:"caption",color:"warning.main",children:["No effect now. ",o.colorSchemeLock.why]}):null]})]}),(0,e.jsx)(a.DialogActions,{children:(0,e.jsx)(f.default,{variant:"contained",color:"primary",onClick:p,children:"Close"})})]})}),O=x;export{O as a};
|
|
2
|
+
//# sourceMappingURL=chunk-BUXVOMDL.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
function o(n,{refRefNameMap:f={},queryRefNameMap:m={}}={}){let r=[];for(let e of n){let t=e.get("mate");if(t){let a=e.get("refName");r.push({refRefName:f[a]??a,queryRefName:m[t.refName]??t.refName,refStart:e.get("start"),refEnd:e.get("end"),queryStart:t.start,queryEnd:t.end,strand:e.get("strand")??1})}}return r}export{o as a};
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
//# sourceMappingURL=chunk-E7J6SB5P.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../node_modules/.pnpm/@jbrowse+synteny-core@5.0.0-beta.
|
|
3
|
+
"sources": ["../../node_modules/.pnpm/@jbrowse+synteny-core@5.0.0-beta.11_@emotion+react@11.14.0_@types+react@19.3.0_react@19_62128aa7a8a5629affa9cb1a58afadc3/node_modules/@jbrowse/synteny-core/esm/extractAlignmentData.js"],
|
|
4
4
|
"sourcesContent": ["/**\n * Extract diagonalization input (one entry per mated alignment) from raw\n * comparative features. Shared by the dotplot and synteny diagonalize RPCs so\n * both feed `diagonalizeRegions` from the same feature shape \u2014 a feature with a\n * `mate` (the paired location on the other assembly), `refName`, `start`,\n * `end`, and `strand`. Features without a `mate` are skipped.\n *\n * Features are fetched with adapter-space regions, so their `refName`/\n * `mate.refName` come back in the adapter's namespace. The optional\n * `refRefNameMap`/`queryRefNameMap` (both adapter refName -> canonical refName)\n * translate the reference and query axes back into the view's canonical\n * namespace so the diagonalization can match them against canonical regions and\n * hand canonical regions back to the view. A refName absent from a map is\n * already canonical (no alias) and passes through unchanged; an omitted map\n * leaves that axis in adapter space (fine when the caller passes adapter-space\n * regions for that axis).\n */\nexport function extractAlignmentData(features, { refRefNameMap = {}, queryRefNameMap = {}, } = {}) {\n const out = [];\n for (const feat of features) {\n const mate = feat.get('mate');\n if (mate) {\n const refName = feat.get('refName');\n out.push({\n refRefName: refRefNameMap[refName] ?? refName,\n queryRefName: queryRefNameMap[mate.refName] ?? mate.refName,\n refStart: feat.get('start'),\n refEnd: feat.get('end'),\n queryStart: mate.start,\n queryEnd: mate.end,\n strand: feat.get('strand') ?? 1,\n });\n }\n }\n return out;\n}\n"],
|
|
5
5
|
"mappings": "AAiBO,SAASA,EAAqBC,EAAU,CAAE,cAAAC,EAAgB,CAAC,EAAG,gBAAAC,EAAkB,CAAC,CAAG,EAAI,CAAC,EAAG,CAC/F,IAAMC,EAAM,CAAC,EACb,QAAWC,KAAQJ,EAAU,CACzB,IAAMK,EAAOD,EAAK,IAAI,MAAM,EAC5B,GAAIC,EAAM,CACN,IAAMC,EAAUF,EAAK,IAAI,SAAS,EAClCD,EAAI,KAAK,CACL,WAAYF,EAAcK,CAAO,GAAKA,EACtC,aAAcJ,EAAgBG,EAAK,OAAO,GAAKA,EAAK,QACpD,SAAUD,EAAK,IAAI,OAAO,EAC1B,OAAQA,EAAK,IAAI,KAAK,EACtB,WAAYC,EAAK,MACjB,SAAUA,EAAK,IACf,OAAQD,EAAK,IAAI,QAAQ,GAAK,CAClC,CAAC,CACL,CACJ,CACA,OAAOD,CACX",
|
|
6
6
|
"names": ["extractAlignmentData", "features", "refRefNameMap", "queryRefNameMap", "out", "feat", "mate", "refName"]
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["global-externals:react"],
|
|
4
|
+
"sourcesContent": ["module.exports = JBrowseExports[\"react\"];"],
|
|
5
|
+
"mappings": "wCAAA,IAAAA,EAAAC,EAAA,CAAAC,EAAAC,IAAA,CAAAA,EAAO,QAAU,eAAe",
|
|
6
|
+
"names": ["require_react", "__commonJSMin", "exports", "module"]
|
|
7
|
+
}
|