@jbrowse/bandage-core 10.2.6 → 10.3.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/dist/alleleProjection/projectAlleles.js +8 -4
- package/dist/anchoredNodes.js +2 -1
- package/dist/bubbleSpreads.js +2 -2
- package/dist/bubbles/bubbleHalos.js +10 -11
- package/dist/bubbles/bubblesFromGraph.js +8 -3
- package/dist/bubbles/classifyBubble.js +9 -6
- package/dist/bubbles/popBubble.js +7 -5
- package/dist/bubbles/superbubbles.js +18 -14
- package/dist/chunks/{chunk-RAKOB6IV.js → chunk-234NFZS4.js} +8 -6
- package/dist/chunks/{chunk-A4PFFC4Q.js → chunk-2XEQR54X.js} +60 -102
- package/dist/chunks/{chunk-6JEWNXCQ.js → chunk-34BOZKIE.js} +0 -2
- package/dist/chunks/{chunk-RVS2QCOX.js → chunk-3GLG3ZLE.js} +2 -11
- package/dist/chunks/{chunk-PUG7LXDF.js → chunk-3PZSBNLI.js} +4 -1
- package/dist/chunks/{chunk-KBEP7VYK.js → chunk-3VCKBSML.js} +4 -4
- package/dist/chunks/{chunk-BPLIXMH7.js → chunk-4XWZNPQ2.js} +14 -0
- package/dist/chunks/{chunk-LKW2TP4N.js → chunk-5YILQTHE.js} +18 -16
- package/dist/chunks/{chunk-B6IW3IRE.js → chunk-65ILXEIN.js} +14 -15
- package/dist/chunks/{chunk-4DRQTBBE.js → chunk-6EOB6ANX.js} +1 -1
- package/dist/chunks/{chunk-XBHMXTOR.js → chunk-7JGLJK44.js} +41 -36
- package/dist/chunks/{chunk-T2PCSAFY.js → chunk-7XR26JST.js} +2 -2
- package/dist/chunks/{chunk-URZ3CH2R.js → chunk-A4JDEUAI.js} +1 -1
- package/dist/chunks/{chunk-JLSJMCDJ.js → chunk-A54O52XZ.js} +3 -3
- package/dist/chunks/chunk-A55OZVYX.js +327 -0
- package/dist/chunks/{chunk-CWFNEKST.js → chunk-A7H753BA.js} +3 -3
- package/dist/chunks/{chunk-FB5RKZQY.js → chunk-AMX4OQAW.js} +18 -27
- package/dist/chunks/{chunk-RPRHR56C.js → chunk-BS6HPYCZ.js} +3 -3
- package/dist/chunks/chunk-BSOZW3FC.js +30 -0
- package/dist/chunks/{chunk-CU6P5RUG.js → chunk-BVYR7IFN.js} +22 -16
- package/dist/chunks/{chunk-XXT2JCAC.js → chunk-BX4AUMZE.js} +11 -13
- package/dist/chunks/{chunk-N73TI3VG.js → chunk-BZFOFC4D.js} +6 -9
- package/dist/chunks/{chunk-4ETPXDO6.js → chunk-CGFPFBT2.js} +1 -1
- package/dist/chunks/{chunk-24WITXQY.js → chunk-CGMSKIEO.js} +9 -25
- package/dist/chunks/{chunk-IGVV37VI.js → chunk-CKUVEHSS.js} +3 -3
- package/dist/chunks/{chunk-JBCZIBFC.js → chunk-CRCD3ODN.js} +0 -1
- package/dist/chunks/{chunk-PSMKPSO4.js → chunk-DBLV7PGG.js} +33 -27
- package/dist/chunks/{chunk-JA2HJIYS.js → chunk-E4ZM4OOJ.js} +3 -5
- package/dist/chunks/{chunk-ABUIN5AK.js → chunk-EHXBZ5JZ.js} +29 -24
- package/dist/chunks/{chunk-QLWI2PZ3.js → chunk-EJRJAAN7.js} +24 -21
- package/dist/chunks/{chunk-Q7LYHGGQ.js → chunk-GIHTHYXY.js} +5 -4
- package/dist/chunks/{chunk-L3O7AWLI.js → chunk-GJLZ2MKE.js} +2 -2
- package/dist/chunks/{chunk-LOEA5IHZ.js → chunk-GJU6BJJA.js} +8 -8
- package/dist/chunks/{chunk-XL472HHD.js → chunk-GQZVR5DW.js} +12 -7
- package/dist/chunks/{chunk-UVBGRJQX.js → chunk-HKYXWZQS.js} +1 -1
- package/dist/chunks/chunk-HMXCN6PG.js +17 -0
- package/dist/chunks/{chunk-WSIFAZU7.js → chunk-HNWJ4B7S.js} +12 -13
- package/dist/chunks/chunk-HOAIOEI7.js +18 -0
- package/dist/chunks/{chunk-XMW266WS.js → chunk-HSVFCA2J.js} +18 -20
- package/dist/chunks/{chunk-3XSM4OZU.js → chunk-IYALCKNB.js} +5 -5
- package/dist/chunks/{chunk-2QLLQJ72.js → chunk-KWHWNOTY.js} +22 -17
- package/dist/chunks/{chunk-M6LK4GII.js → chunk-LGJBB5BP.js} +8 -9
- package/dist/chunks/{chunk-VQWHMWLF.js → chunk-M5NPD55W.js} +18 -14
- package/dist/chunks/{chunk-TKIJ5535.js → chunk-MD5VPXXT.js} +6 -6
- package/dist/chunks/{chunk-HK5Y2YWV.js → chunk-MYDHU2UV.js} +6 -11
- package/dist/chunks/{chunk-TZFWUT2C.js → chunk-MYLAJDKB.js} +2 -2
- package/dist/chunks/{chunk-4HWM3FNK.js → chunk-OMUPUB4J.js} +39 -56
- package/dist/chunks/{chunk-PTABFYQ7.js → chunk-PFRQBCGC.js} +49 -60
- package/dist/chunks/{chunk-T6V4KI2L.js → chunk-PPDE4IVT.js} +1 -1
- package/dist/chunks/{chunk-KC7T5RWG.js → chunk-PSCSZSVK.js} +9 -16
- package/dist/chunks/{chunk-YYMW5XOF.js → chunk-PTQPTDZH.js} +1 -1
- package/dist/chunks/{chunk-L2HDM2R3.js → chunk-QQCOVMMT.js} +7 -7
- package/dist/chunks/{chunk-CQHUZHET.js → chunk-RFG42VIO.js} +46 -30
- package/dist/chunks/{chunk-FYQWPEEY.js → chunk-RJWPJCIB.js} +5 -11
- package/dist/chunks/{chunk-AR4BUBMU.js → chunk-RWKP7UO4.js} +34 -35
- package/dist/chunks/{chunk-WBSWROE6.js → chunk-SHKGYGM4.js} +14 -18
- package/dist/chunks/{chunk-2CMYNW3E.js → chunk-SI3BB4DO.js} +1 -1
- package/dist/chunks/{chunk-DY3JCAMX.js → chunk-SOMZGDVS.js} +7 -16
- package/dist/chunks/{chunk-EFQLEGWM.js → chunk-SZHQK6GL.js} +7 -8
- package/dist/chunks/{chunk-5GMFEPWR.js → chunk-TCOLHD7N.js} +16 -28
- package/dist/chunks/{chunk-XV4P5KEQ.js → chunk-TGUFT6KK.js} +6 -3
- package/dist/chunks/{chunk-CM6LO6OC.js → chunk-UAFATXYA.js} +10 -14
- package/dist/chunks/{chunk-7SRWJLSC.js → chunk-UBQSRCWR.js} +11 -8
- package/dist/chunks/{chunk-RUCH6ZFL.js → chunk-V4YML3GR.js} +2 -1
- package/dist/chunks/{chunk-VQC7KELB.js → chunk-V7J6U4XC.js} +11 -3
- package/dist/chunks/{chunk-ES2N6V56.js → chunk-VX656OAZ.js} +6 -11
- package/dist/chunks/chunk-WA5WNP6V.js +37 -0
- package/dist/chunks/{chunk-WZNPX7Q6.js → chunk-WJ4TIAVA.js} +1 -1
- package/dist/chunks/{chunk-BS4UZ44I.js → chunk-WONB6LMC.js} +1 -1
- package/dist/chunks/{chunk-HFVGGB3U.js → chunk-XUT4HXVE.js} +29 -13
- package/dist/chunks/{chunk-G45YY72K.js → chunk-Z6XZWPXK.js} +17 -25
- package/dist/chunks/{chunk-XI3ZUTWF.js → chunk-ZNJ4JAPT.js} +14 -20
- package/dist/chunks/{chunk-HNCXR2VS.js → chunk-ZPBEUOBM.js} +3 -1
- package/dist/chunks/{chunk-RAEABQNW.js → chunk-ZPZ7GNBT.js} +1 -0
- package/dist/cli/figure.js +59 -56
- package/dist/cli/fold.js +19 -17
- package/dist/deletionEdges.js +5 -7
- package/dist/facetGrid.js +2 -1
- package/dist/figure.js +45 -42
- package/dist/figureData.js +48 -44
- package/dist/figureScene.js +34 -29
- package/dist/figureSettings.js +19 -17
- package/dist/foldVariants.js +5 -3
- package/dist/gbzCut.js +12 -7
- package/dist/gbzJoin.js +2 -1
- package/dist/gbzWindow.js +11 -6
- package/dist/genes/genePins.js +6 -4
- package/dist/gfa/gfaConverter.js +7 -5
- package/dist/gfa/gfaTables.js +2 -1
- package/dist/gfa/graphTables.js +3 -3
- package/dist/graphLabels.js +8 -5
- package/dist/index.js +88 -85
- package/dist/labelLayout.js +12 -9
- package/dist/layout/anchoredLayout.js +8 -5
- package/dist/layout/drawnScale.js +1 -5
- package/dist/layout/forceCache.js +19 -17
- package/dist/layout/mergeRuns.js +5 -3
- package/dist/layout/orderedLayout.js +5 -2
- package/dist/layout/orientToReference.js +3 -2
- package/dist/layout/placeOffReference.js +7 -4
- package/dist/layout/referenceSeeds.js +6 -4
- package/dist/layout/sampleRowLayout.js +8 -5
- package/dist/layout/trimToWindow.js +6 -4
- package/dist/layout/tubeMapLayout.js +17 -19
- package/dist/layout/walkRowDraw.js +18 -17
- package/dist/layout/walkRowLayout.js +10 -6
- package/dist/layout/walkRows.js +9 -5
- package/dist/layout/walkStrip.js +21 -18
- package/dist/layoutModes.js +23 -20
- package/dist/nodeWidths.js +1 -3
- package/dist/pansn.js +5 -1
- package/dist/pathAnchoring.js +6 -4
- package/dist/pathColors.js +12 -9
- package/dist/pathVisits.js +3 -1
- package/dist/pipeline.js +18 -16
- package/dist/reference.js +5 -3
- package/dist/referenceRampCss.js +9 -17
- package/dist/referenceSpan.js +4 -2
- package/dist/referenceStrip.js +18 -14
- package/dist/renderer/Canvas2DRenderer.js +1 -1
- package/dist/renderer/GeometryBuilder.js +19 -14
- package/dist/renderer/svgCanvas.js +1 -1
- package/dist/tubeMap/axis.js +11 -6
- package/dist/tubeMap/bundle.js +16 -12
- package/dist/tubeMap/coarsen.js +20 -345
- package/dist/tubeMap/deviations.js +53 -23
- package/dist/tubeMap/draw.js +11 -8
- package/dist/tubeMap/frame.js +3 -2
- package/dist/tubeMap/genes.js +10 -7
- package/dist/tubeMap/mismatches.js +1 -1
- package/dist/tubeMap/nodeColors.js +18 -14
- package/dist/tubeMap/reads.js +1 -1
- package/dist/tubeMap/warp.js +2 -1
- package/dist/types/alleleProjection/projectAlleles.d.ts +1 -4
- package/dist/types/bubbles/bubbleHalos.d.ts +0 -2
- package/dist/types/bubbles/bubblesFromGraph.d.ts +6 -4
- package/dist/types/bubbles/classifyBubble.d.ts +2 -1
- package/dist/types/deletionEdges.d.ts +0 -8
- package/dist/types/figureScene.d.ts +17 -7
- package/dist/types/figureSettings.d.ts +2 -0
- package/dist/types/gbzCut.d.ts +4 -0
- package/dist/types/gbzWindow.d.ts +1 -0
- package/dist/types/gfa/graphTables.d.ts +3 -1
- package/dist/types/gfa-core/gfaParser.d.ts +1 -1
- package/dist/types/graphLabels.d.ts +2 -1
- package/dist/types/layout/drawnScale.d.ts +0 -2
- package/dist/types/layout/referenceSeeds.d.ts +2 -1
- package/dist/types/layout/tubeMapLayout.d.ts +0 -7
- package/dist/types/layout/walkRowDraw.d.ts +0 -1
- package/dist/types/layout/walkRowLayout.d.ts +1 -0
- package/dist/types/layout/walkRows.d.ts +1 -0
- package/dist/types/nodeWidths.d.ts +0 -1
- package/dist/types/pansn.d.ts +9 -0
- package/dist/types/pathVisits.d.ts +6 -0
- package/dist/types/referenceRampCss.d.ts +4 -0
- package/dist/types/renderer/Canvas2DRenderer.d.ts +1 -0
- package/dist/types/renderer/GeometryBuilder.d.ts +3 -2
- package/dist/types/tubeMap/axis.d.ts +3 -1
- package/dist/types/tubeMap/coarsen.d.ts +3 -1
- package/dist/types/tubeMap/deviations.d.ts +2 -1
- package/dist/types/tubeMap/mismatches.d.ts +0 -1
- package/dist/types/tubeMap/warp.d.ts +2 -1
- package/dist/types/util/SpatialIndex.d.ts +1 -1
- package/dist/types/util/geometry.d.ts +4 -0
- package/dist/types/util/groups.d.ts +3 -0
- package/dist/types/util/hitDetection.d.ts +2 -2
- package/dist/types/util/partitionPoint.d.ts +1 -0
- package/dist/types/util/weakMemo.d.ts +1 -0
- package/dist/types/version.d.ts +1 -1
- package/dist/util/SpatialIndex.js +8 -5
- package/dist/util/edgeCurves.js +7 -4
- package/dist/util/geometry.js +3 -1
- package/dist/util/groups.js +10 -0
- package/dist/util/hitDetection.js +9 -6
- package/dist/util/partitionPoint.js +6 -0
- package/dist/util/weakMemo.js +6 -0
- package/dist/version.js +1 -1
- package/dist/viewport.js +19 -17
- package/dist/walkEncoding.js +18 -14
- package/dist/walkHighlight.js +19 -15
- package/dist/walkKey.js +9 -6
- package/package.json +2 -2
- package/dist/chunks/chunk-ZY2AFL4Y.js +0 -43
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
parsePanSN,
|
|
3
2
|
projectAlleles
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
6
|
-
import "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-3GLG3ZLE.js";
|
|
4
|
+
import "../chunks/chunk-VX656OAZ.js";
|
|
5
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
6
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
7
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
8
|
+
import {
|
|
9
|
+
parsePanSN
|
|
10
|
+
} from "../chunks/chunk-4XWZNPQ2.js";
|
|
7
11
|
export {
|
|
8
12
|
parsePanSN,
|
|
9
13
|
projectAlleles
|
package/dist/anchoredNodes.js
CHANGED
package/dist/bubbleSpreads.js
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
BUBBLE_SPREADS,
|
|
3
3
|
BUBBLE_SPREAD_VALUES,
|
|
4
4
|
spreadFor
|
|
5
|
-
} from "./chunks/chunk-
|
|
6
|
-
import "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-HKYXWZQS.js";
|
|
6
|
+
import "./chunks/chunk-34BOZKIE.js";
|
|
7
7
|
export {
|
|
8
8
|
BUBBLE_SPREADS,
|
|
9
9
|
BUBBLE_SPREAD_VALUES,
|
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
|
-
SMALL_VARIANT_BP,
|
|
3
|
-
WHOLE_FRACTION,
|
|
4
2
|
bubbleHalos,
|
|
5
3
|
coversGraph
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-E4ZM4OOJ.js";
|
|
5
|
+
import "../chunks/chunk-A4JDEUAI.js";
|
|
8
6
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
9
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-PFRQBCGC.js";
|
|
8
|
+
import "../chunks/chunk-HMXCN6PG.js";
|
|
10
9
|
import "../chunks/chunk-AB35TJST.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
13
|
-
import "../chunks/chunk-
|
|
10
|
+
import "../chunks/chunk-BZFOFC4D.js";
|
|
11
|
+
import "../chunks/chunk-CGMSKIEO.js";
|
|
12
|
+
import "../chunks/chunk-UBQSRCWR.js";
|
|
14
13
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
15
|
-
import "../chunks/chunk-
|
|
14
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
15
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
16
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
16
17
|
export {
|
|
17
|
-
SMALL_VARIANT_BP,
|
|
18
|
-
WHOLE_FRACTION,
|
|
19
18
|
bubbleHalos,
|
|
20
19
|
coversGraph
|
|
21
20
|
};
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubblesFromGraph,
|
|
3
|
+
derivedBubble,
|
|
3
4
|
relax,
|
|
4
5
|
walkIndexOf,
|
|
5
6
|
walkRoutes
|
|
6
|
-
} from "../chunks/chunk-
|
|
7
|
+
} from "../chunks/chunk-RFG42VIO.js";
|
|
7
8
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
9
|
+
import "../chunks/chunk-UAFATXYA.js";
|
|
10
|
+
import "../chunks/chunk-VX656OAZ.js";
|
|
9
11
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
10
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
13
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
14
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
11
15
|
export {
|
|
12
16
|
bubblesFromGraph,
|
|
17
|
+
derivedBubble,
|
|
13
18
|
relax,
|
|
14
19
|
walkIndexOf,
|
|
15
20
|
walkRoutes
|
|
@@ -3,15 +3,18 @@ import {
|
|
|
3
3
|
BUBBLE_KIND_NAMES,
|
|
4
4
|
bubbleSegmentIds,
|
|
5
5
|
classifyBubble
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-A4JDEUAI.js";
|
|
7
7
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
import "../chunks/chunk-PFRQBCGC.js";
|
|
9
|
+
import "../chunks/chunk-HMXCN6PG.js";
|
|
9
10
|
import "../chunks/chunk-AB35TJST.js";
|
|
10
|
-
import "../chunks/chunk-
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-BZFOFC4D.js";
|
|
12
|
+
import "../chunks/chunk-CGMSKIEO.js";
|
|
13
|
+
import "../chunks/chunk-UBQSRCWR.js";
|
|
13
14
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
14
|
-
import "../chunks/chunk-
|
|
15
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
16
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
17
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
15
18
|
export {
|
|
16
19
|
BUBBLE_KIND_COLORS,
|
|
17
20
|
BUBBLE_KIND_NAMES,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleSubgraph
|
|
3
|
-
} from "../chunks/chunk-
|
|
4
|
-
import "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
6
|
-
import "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-PPDE4IVT.js";
|
|
4
|
+
import "../chunks/chunk-LGJBB5BP.js";
|
|
5
|
+
import "../chunks/chunk-ZPZ7GNBT.js";
|
|
6
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
7
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
8
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
9
|
+
import "../chunks/chunk-4XWZNPQ2.js";
|
|
8
10
|
export {
|
|
9
11
|
bubbleSubgraph
|
|
10
12
|
};
|
|
@@ -1,23 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
6
|
-
import "../chunks/chunk-
|
|
7
|
-
import "../chunks/chunk-
|
|
8
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-EHXBZ5JZ.js";
|
|
5
|
+
import "../chunks/chunk-RFG42VIO.js";
|
|
6
|
+
import "../chunks/chunk-PPDE4IVT.js";
|
|
7
|
+
import "../chunks/chunk-E4ZM4OOJ.js";
|
|
8
|
+
import "../chunks/chunk-A4JDEUAI.js";
|
|
9
9
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
10
|
-
import "../chunks/chunk-
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
13
|
-
import "../chunks/chunk-
|
|
14
|
-
import "../chunks/chunk-
|
|
10
|
+
import "../chunks/chunk-UAFATXYA.js";
|
|
11
|
+
import "../chunks/chunk-LGJBB5BP.js";
|
|
12
|
+
import "../chunks/chunk-VX656OAZ.js";
|
|
13
|
+
import "../chunks/chunk-ZPZ7GNBT.js";
|
|
14
|
+
import "../chunks/chunk-PFRQBCGC.js";
|
|
15
|
+
import "../chunks/chunk-HMXCN6PG.js";
|
|
15
16
|
import "../chunks/chunk-AB35TJST.js";
|
|
16
|
-
import "../chunks/chunk-
|
|
17
|
-
import "../chunks/chunk-
|
|
18
|
-
import "../chunks/chunk-
|
|
17
|
+
import "../chunks/chunk-BZFOFC4D.js";
|
|
18
|
+
import "../chunks/chunk-CGMSKIEO.js";
|
|
19
|
+
import "../chunks/chunk-UBQSRCWR.js";
|
|
19
20
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
20
|
-
import "../chunks/chunk-
|
|
21
|
+
import "../chunks/chunk-BSOZW3FC.js";
|
|
22
|
+
import "../chunks/chunk-RJWPJCIB.js";
|
|
23
|
+
import "../chunks/chunk-HOAIOEI7.js";
|
|
24
|
+
import "../chunks/chunk-4XWZNPQ2.js";
|
|
21
25
|
export {
|
|
22
26
|
graphBubbles,
|
|
23
27
|
superbubblesFromGraph
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
+
import {
|
|
2
|
+
addTo
|
|
3
|
+
} from "./chunk-BSOZW3FC.js";
|
|
4
|
+
import {
|
|
5
|
+
isBackbone
|
|
6
|
+
} from "./chunk-RJWPJCIB.js";
|
|
1
7
|
import {
|
|
2
8
|
isGenericSample,
|
|
3
9
|
panSNContig,
|
|
4
10
|
panSNHaplotype,
|
|
5
11
|
panSNSample
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import {
|
|
8
|
-
isBackbone
|
|
9
|
-
} from "./chunk-FYQWPEEY.js";
|
|
12
|
+
} from "./chunk-4XWZNPQ2.js";
|
|
10
13
|
|
|
11
14
|
// src/reference.ts
|
|
12
15
|
var WELL_KNOWN_SAMPLES = /* @__PURE__ */ new Map([
|
|
@@ -37,8 +40,7 @@ function graphHaplotypes(graph) {
|
|
|
37
40
|
for (const refName of refNames) {
|
|
38
41
|
const sample = sampleOf(refName);
|
|
39
42
|
if (sample !== void 0) {
|
|
40
|
-
|
|
41
|
-
haplotypes.add(haplotypeOf(refName));
|
|
43
|
+
addTo(bySample, sample, haplotypeOf(refName));
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
return bySample;
|
|
@@ -3,29 +3,38 @@ import {
|
|
|
3
3
|
fadeAbgr,
|
|
4
4
|
packAbgr
|
|
5
5
|
} from "./chunk-G2FD7S3C.js";
|
|
6
|
+
import {
|
|
7
|
+
REFERENCE_RAMP_LIGHTNESS,
|
|
8
|
+
REFERENCE_RAMP_SATURATION,
|
|
9
|
+
rampHueAt
|
|
10
|
+
} from "./chunk-GQZVR5DW.js";
|
|
6
11
|
import {
|
|
7
12
|
baseEdgeCurves
|
|
8
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WA5WNP6V.js";
|
|
9
14
|
import {
|
|
10
15
|
PATH_LIGHTNESS,
|
|
11
16
|
PATH_SATURATION,
|
|
12
17
|
nameHue,
|
|
13
18
|
pathHueAt
|
|
14
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-IYALCKNB.js";
|
|
15
20
|
import {
|
|
16
21
|
meanDepth,
|
|
17
22
|
nodeWidthPx
|
|
18
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CRCD3ODN.js";
|
|
19
24
|
import {
|
|
20
25
|
referenceMidpoints
|
|
21
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VX656OAZ.js";
|
|
22
27
|
import {
|
|
23
28
|
dashCurves,
|
|
24
29
|
pathRibbonOffsets,
|
|
30
|
+
polylinePx,
|
|
25
31
|
strandSides,
|
|
26
32
|
translateCurves,
|
|
27
33
|
yToXOf
|
|
28
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-UBQSRCWR.js";
|
|
35
|
+
import {
|
|
36
|
+
pushTo
|
|
37
|
+
} from "./chunk-BSOZW3FC.js";
|
|
29
38
|
|
|
30
39
|
// src/renderer/GeometryBuilder.ts
|
|
31
40
|
var EDGE_DEFAULT_COLOR = packAbgr(119, 119, 119, 217);
|
|
@@ -119,7 +128,7 @@ function arrowheadFor({
|
|
|
119
128
|
const lengthPx = walkPx[n - 1];
|
|
120
129
|
const abutting = lengthPx < ABUTTING_PX;
|
|
121
130
|
const inset = Math.min(nodeHalfWidth, lengthPx);
|
|
122
|
-
const fit = abutting ? Math.min(1, polylinePx(fromSegments, scale, yToX) / length) : 1;
|
|
131
|
+
const fit = abutting ? Math.min(1, polylinePx(fromSegments, scale, scale * yToX) / length) : 1;
|
|
123
132
|
if (abutting ? fit < MIN_ARROW_FIT : lengthPx < MIN_LINK_HEADS * length) {
|
|
124
133
|
return void 0;
|
|
125
134
|
}
|
|
@@ -137,16 +146,6 @@ function arrowheadFor({
|
|
|
137
146
|
color
|
|
138
147
|
};
|
|
139
148
|
}
|
|
140
|
-
function polylinePx(segments, scale, yToX) {
|
|
141
|
-
let length = 0;
|
|
142
|
-
for (let i = 1; i < segments.length; i++) {
|
|
143
|
-
length += Math.hypot(
|
|
144
|
-
segments[i].x - segments[i - 1].x,
|
|
145
|
-
(segments[i].y - segments[i - 1].y) * yToX
|
|
146
|
-
);
|
|
147
|
-
}
|
|
148
|
-
return length * scale;
|
|
149
|
-
}
|
|
150
149
|
function leavesStart(edge, segments, first, stranded, yToX) {
|
|
151
150
|
if (stranded) {
|
|
152
151
|
return strandSides(edge).from === "start";
|
|
@@ -163,58 +162,28 @@ function intoDirection(last, toSegments) {
|
|
|
163
162
|
const atStart = Math.hypot(last.x1 - first.x, last.y1 - first.y) <= Math.hypot(last.x1 - final.x, last.y1 - final.y);
|
|
164
163
|
return atStart ? { from: first, to: toSegments[1] } : { from: final, to: toSegments[toSegments.length - 2] };
|
|
165
164
|
}
|
|
165
|
+
function normal(a, b) {
|
|
166
|
+
if (!a || !b) {
|
|
167
|
+
return void 0;
|
|
168
|
+
}
|
|
169
|
+
const dx = b.x - a.x;
|
|
170
|
+
const dy = b.y - a.y;
|
|
171
|
+
const len = Math.hypot(dx, dy);
|
|
172
|
+
return len > 0 ? { nx: -dy / len, ny: dx / len } : void 0;
|
|
173
|
+
}
|
|
166
174
|
function pointNormalsOf(rawPoints, yToX = 1) {
|
|
167
175
|
const points = yToX === 1 ? rawPoints : rawPoints.map((p) => ({ x: p.x, y: p.y * yToX }));
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
const
|
|
175
|
-
|
|
176
|
-
if (len > 0) {
|
|
177
|
-
nx = -dy / len;
|
|
178
|
-
ny = dx / len;
|
|
179
|
-
}
|
|
180
|
-
} else if (i === points.length - 1) {
|
|
181
|
-
const dx = points[i].x - points[i - 1].x;
|
|
182
|
-
const dy = points[i].y - points[i - 1].y;
|
|
183
|
-
const len = Math.hypot(dx, dy);
|
|
184
|
-
if (len > 0) {
|
|
185
|
-
nx = -dy / len;
|
|
186
|
-
ny = dx / len;
|
|
187
|
-
}
|
|
188
|
-
} else {
|
|
189
|
-
const dx1 = points[i].x - points[i - 1].x;
|
|
190
|
-
const dy1 = points[i].y - points[i - 1].y;
|
|
191
|
-
const len1 = Math.hypot(dx1, dy1);
|
|
192
|
-
const dx2 = points[i + 1].x - points[i].x;
|
|
193
|
-
const dy2 = points[i + 1].y - points[i].y;
|
|
194
|
-
const len2 = Math.hypot(dx2, dy2);
|
|
195
|
-
if (len1 > 0 && len2 > 0) {
|
|
196
|
-
const nx1 = -dy1 / len1;
|
|
197
|
-
const ny1 = dx1 / len1;
|
|
198
|
-
const nx2 = -dy2 / len2;
|
|
199
|
-
const ny2 = dx2 / len2;
|
|
200
|
-
nx = (nx1 + nx2) / 2;
|
|
201
|
-
ny = (ny1 + ny2) / 2;
|
|
202
|
-
const dot = nx1 * nx + ny1 * ny;
|
|
203
|
-
if (dot > 0.1) {
|
|
204
|
-
nx /= dot;
|
|
205
|
-
ny /= dot;
|
|
206
|
-
}
|
|
207
|
-
} else if (len1 > 0) {
|
|
208
|
-
nx = -dy1 / len1;
|
|
209
|
-
ny = dx1 / len1;
|
|
210
|
-
} else if (len2 > 0) {
|
|
211
|
-
nx = -dy2 / len2;
|
|
212
|
-
ny = dx2 / len2;
|
|
213
|
-
}
|
|
176
|
+
return points.map((p, i) => {
|
|
177
|
+
const before = normal(points[i - 1], p);
|
|
178
|
+
const after = normal(p, points[i + 1]);
|
|
179
|
+
if (before && after) {
|
|
180
|
+
const nx = (before.nx + after.nx) / 2;
|
|
181
|
+
const ny = (before.ny + after.ny) / 2;
|
|
182
|
+
const dot = before.nx * nx + before.ny * ny;
|
|
183
|
+
return dot > 0.1 ? { nx: nx / dot, ny: ny / dot } : { nx, ny };
|
|
214
184
|
}
|
|
215
|
-
|
|
216
|
-
}
|
|
217
|
-
return pointNormals;
|
|
185
|
+
return before ?? after ?? { nx: 0, ny: 0 };
|
|
186
|
+
});
|
|
218
187
|
}
|
|
219
188
|
function offsetPolyline(points, normals, distance, yToX = 1) {
|
|
220
189
|
return points.map((p, i) => ({
|
|
@@ -222,14 +191,6 @@ function offsetPolyline(points, normals, distance, yToX = 1) {
|
|
|
222
191
|
y: p.y + normals[i].ny * distance / yToX
|
|
223
192
|
}));
|
|
224
193
|
}
|
|
225
|
-
function packNorm(r, g, b, a) {
|
|
226
|
-
return packAbgr(
|
|
227
|
-
Math.round(r * 255),
|
|
228
|
-
Math.round(g * 255),
|
|
229
|
-
Math.round(b * 255),
|
|
230
|
-
Math.round(a * 255)
|
|
231
|
-
);
|
|
232
|
-
}
|
|
233
194
|
function hslToRgb(h, s, l) {
|
|
234
195
|
const c = (1 - Math.abs(2 * l - 1)) * s;
|
|
235
196
|
const x = c * (1 - Math.abs(h / 60 % 2 - 1));
|
|
@@ -258,6 +219,15 @@ function hslToRgb(h, s, l) {
|
|
|
258
219
|
}
|
|
259
220
|
return [r + m, g + m, b + m];
|
|
260
221
|
}
|
|
222
|
+
function packHsl(h, s, l, a = 1) {
|
|
223
|
+
const [r, g, b] = hslToRgb(h, s, l);
|
|
224
|
+
return packAbgr(
|
|
225
|
+
Math.round(r * 255),
|
|
226
|
+
Math.round(g * 255),
|
|
227
|
+
Math.round(b * 255),
|
|
228
|
+
Math.round(a * 255)
|
|
229
|
+
);
|
|
230
|
+
}
|
|
261
231
|
var DEPTH_GRADIENT = [
|
|
262
232
|
[68, 1, 84],
|
|
263
233
|
[59, 82, 139],
|
|
@@ -287,12 +257,8 @@ function sampleGradient(stops, t) {
|
|
|
287
257
|
);
|
|
288
258
|
}
|
|
289
259
|
function hashColor(str, alpha) {
|
|
290
|
-
|
|
291
|
-
return packNorm(r, g, b, alpha);
|
|
260
|
+
return packHsl(nameHue(str), PATH_SATURATION, PATH_LIGHTNESS, alpha);
|
|
292
261
|
}
|
|
293
|
-
var REFERENCE_RAMP_MAX_HUE = 300;
|
|
294
|
-
var REFERENCE_RAMP_SATURATION = 0.7;
|
|
295
|
-
var REFERENCE_RAMP_LIGHTNESS = 0.5;
|
|
296
262
|
var REFERENCE_RAMP_ALT_RGB = [60, 65, 72];
|
|
297
263
|
var REFERENCE_RAMP_ALT_COLOR = packAbgr(...REFERENCE_RAMP_ALT_RGB, 255);
|
|
298
264
|
var REFERENCE_RAMP_ALT_CSS = `rgb(${REFERENCE_RAMP_ALT_RGB.join(", ")})`;
|
|
@@ -317,7 +283,7 @@ function computeReferenceRamp(graph, domain) {
|
|
|
317
283
|
midpoints
|
|
318
284
|
};
|
|
319
285
|
}
|
|
320
|
-
function computeColorSchemeRange(graph) {
|
|
286
|
+
function computeColorSchemeRange(graph, referenceRamp) {
|
|
321
287
|
let minDepth = Infinity;
|
|
322
288
|
let maxDepth = -Infinity;
|
|
323
289
|
let minLength = Infinity;
|
|
@@ -346,7 +312,8 @@ function computeColorSchemeRange(graph) {
|
|
|
346
312
|
minLength,
|
|
347
313
|
maxLength,
|
|
348
314
|
maxRank,
|
|
349
|
-
nodeCount: graph.nodes.length
|
|
315
|
+
nodeCount: graph.nodes.length,
|
|
316
|
+
referenceRamp
|
|
350
317
|
};
|
|
351
318
|
}
|
|
352
319
|
function getNodeColor(node, nodeIndex, colorScheme, range) {
|
|
@@ -384,20 +351,17 @@ function getNodeColor(node, nodeIndex, colorScheme, range) {
|
|
|
384
351
|
if (node.stable !== void 0 && node.stable.rank > 0) {
|
|
385
352
|
return REFERENCE_RAMP_ALT_COLOR;
|
|
386
353
|
}
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
frac * REFERENCE_RAMP_MAX_HUE,
|
|
354
|
+
return packHsl(
|
|
355
|
+
rampHueAt((mid - ramp.start) / ramp.span),
|
|
390
356
|
REFERENCE_RAMP_SATURATION,
|
|
391
357
|
REFERENCE_RAMP_LIGHTNESS
|
|
392
358
|
);
|
|
393
|
-
return packNorm(r, g, b, 1);
|
|
394
359
|
}
|
|
395
360
|
case "grey":
|
|
396
361
|
return packAbgr(160, 160, 160, 255);
|
|
397
362
|
case "rainbow": {
|
|
398
363
|
const hue = range.nodeCount > 1 ? nodeIndex / range.nodeCount * 360 : 0;
|
|
399
|
-
|
|
400
|
-
return packNorm(r, g, b, 1);
|
|
364
|
+
return packHsl(hue, 0.75, 0.5);
|
|
401
365
|
}
|
|
402
366
|
default:
|
|
403
367
|
return packAbgr(52, 152, 219, 255);
|
|
@@ -447,12 +411,14 @@ function pathPaletteOf(graph) {
|
|
|
447
411
|
const pathIndexByName = /* @__PURE__ */ new Map();
|
|
448
412
|
const paths = graph.paths ?? [];
|
|
449
413
|
for (let i = 0; i < paths.length; i++) {
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
414
|
+
pathColorByIndex.push(
|
|
415
|
+
packHsl(
|
|
416
|
+
pathHueAt(i, paths.length),
|
|
417
|
+
PATH_SATURATION,
|
|
418
|
+
PATH_LIGHTNESS,
|
|
419
|
+
0.85
|
|
420
|
+
)
|
|
454
421
|
);
|
|
455
|
-
pathColorByIndex.push(packNorm(r, g, b, 0.85));
|
|
456
422
|
if (!pathIndexByName.has(paths[i].name)) {
|
|
457
423
|
pathIndexByName.set(paths[i].name, i);
|
|
458
424
|
}
|
|
@@ -470,12 +436,7 @@ function pathSlotsOf(graph) {
|
|
|
470
436
|
slots = /* @__PURE__ */ new Map();
|
|
471
437
|
for (const [pathIdx, path] of (graph.paths ?? []).entries()) {
|
|
472
438
|
for (const nodeId of new Set(path.nodeIds)) {
|
|
473
|
-
|
|
474
|
-
if (visits) {
|
|
475
|
-
visits.push(pathIdx);
|
|
476
|
-
} else {
|
|
477
|
-
slots.set(nodeId, [pathIdx]);
|
|
478
|
-
}
|
|
439
|
+
pushTo(slots, nodeId, pathIdx);
|
|
479
440
|
}
|
|
480
441
|
}
|
|
481
442
|
slotsCache.set(graph, slots);
|
|
@@ -505,6 +466,7 @@ function buildGeometry(options) {
|
|
|
505
466
|
} = options;
|
|
506
467
|
const depthNorm = nodeWidth === "depth" ? meanDepth(graph) : 0;
|
|
507
468
|
const scale = axis.scaleX;
|
|
469
|
+
const worldPerScreenPx = 1 / Math.max(scale, MIN_SCALE_FOR_OFFSET);
|
|
508
470
|
const yToX = yToXOf(axis);
|
|
509
471
|
const sharedCurves = baseEdgeCurves(
|
|
510
472
|
nodePositions,
|
|
@@ -521,7 +483,7 @@ function buildGeometry(options) {
|
|
|
521
483
|
const arrowRuns = /* @__PURE__ */ new Map();
|
|
522
484
|
const edgeCurves = [];
|
|
523
485
|
const edgeCurveRuns = /* @__PURE__ */ new Map();
|
|
524
|
-
const colorRange =
|
|
486
|
+
const colorRange = computeColorSchemeRange(graph, referenceRamp);
|
|
525
487
|
const nodeIndexMap = /* @__PURE__ */ new Map();
|
|
526
488
|
if (colorScheme === "rainbow") {
|
|
527
489
|
for (let i = 0; i < graph.nodes.length; i++) {
|
|
@@ -594,7 +556,6 @@ function buildGeometry(options) {
|
|
|
594
556
|
nx: 0,
|
|
595
557
|
ny: 0
|
|
596
558
|
};
|
|
597
|
-
const worldPerScreenPx = 1 / Math.max(scale, MIN_SCALE_FOR_OFFSET);
|
|
598
559
|
laneWalks.forEach((walk, lane) => {
|
|
599
560
|
if (!walk.edgeIndexes.has(ei)) {
|
|
600
561
|
return;
|
|
@@ -677,7 +638,6 @@ function buildGeometry(options) {
|
|
|
677
638
|
if (drawable && lanes) {
|
|
678
639
|
const laneWidth = Math.max(width / lanes.length, MIN_WALK_LANE_PX);
|
|
679
640
|
const normals = pointNormalsOf(segments, yToX);
|
|
680
|
-
const worldPerScreenPx = 1 / Math.max(scale, MIN_SCALE_FOR_OFFSET);
|
|
681
641
|
lanes.forEach((walk, lane) => {
|
|
682
642
|
const laneColor = walk.colors.get(nodeId);
|
|
683
643
|
if (laneColor === void 0) {
|
|
@@ -692,7 +652,6 @@ function buildGeometry(options) {
|
|
|
692
652
|
});
|
|
693
653
|
} else if (drawable && slots?.length && slotWidth >= MIN_PATH_STRIPE_PX) {
|
|
694
654
|
const normals = pointNormalsOf(segments, yToX);
|
|
695
|
-
const worldPerScreenPx = 1 / Math.max(scale, MIN_SCALE_FOR_OFFSET);
|
|
696
655
|
for (const slot of slots) {
|
|
697
656
|
const offset = (slot - (pathCount - 1) / 2) * slotWidth * worldPerScreenPx;
|
|
698
657
|
const stripe = pathColorByIndex[slot] ?? EDGE_PATH_FALLBACK_COLOR;
|
|
@@ -726,7 +685,6 @@ export {
|
|
|
726
685
|
FADED_ALPHA,
|
|
727
686
|
LIFT_BACKDROP_CSS,
|
|
728
687
|
hslToRgb,
|
|
729
|
-
REFERENCE_RAMP_MAX_HUE,
|
|
730
688
|
REFERENCE_RAMP_ALT_COLOR,
|
|
731
689
|
REFERENCE_RAMP_ALT_CSS,
|
|
732
690
|
computeReferenceRamp,
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
buildNeighbors
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VX656OAZ.js";
|
|
4
4
|
import {
|
|
5
5
|
REFERENCE_RANK,
|
|
6
6
|
isAnchored
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-RJWPJCIB.js";
|
|
8
8
|
|
|
9
9
|
// src/alleleProjection/projectAlleles.ts
|
|
10
|
-
function parsePanSN(refName) {
|
|
11
|
-
const parts = refName.split("#");
|
|
12
|
-
const haplotype = parts.length >= 2 ? Number(parts[1]) : Number.NaN;
|
|
13
|
-
return {
|
|
14
|
-
sample: parts[0] ?? refName,
|
|
15
|
-
haplotype: Number.isFinite(haplotype) ? haplotype : void 0
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
10
|
function collectRun(seed, byId, adj, claimed) {
|
|
19
11
|
const members = [];
|
|
20
12
|
const anchors = [];
|
|
@@ -130,6 +122,5 @@ function projectAlleles(graph) {
|
|
|
130
122
|
}
|
|
131
123
|
|
|
132
124
|
export {
|
|
133
|
-
parsePanSN,
|
|
134
125
|
projectAlleles
|
|
135
126
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
isBackbone
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RJWPJCIB.js";
|
|
4
4
|
|
|
5
5
|
// src/layout/orientToReference.ts
|
|
6
6
|
function orientToReference(graph, positions) {
|
|
@@ -21,6 +21,9 @@ function orientToReference(graph, positions) {
|
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
const weight = points.reduce((sum, p) => sum + p.w, 0);
|
|
24
|
+
if (weight === 0) {
|
|
25
|
+
return positions;
|
|
26
|
+
}
|
|
24
27
|
const cx = points.reduce((sum, p) => sum + p.x * p.w, 0) / weight;
|
|
25
28
|
const cy = points.reduce((sum, p) => sum + p.y * p.w, 0) / weight;
|
|
26
29
|
const cr = points.reduce((sum, p) => sum + p.r * p.w, 0) / weight;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
baseEdgeCurves
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-WA5WNP6V.js";
|
|
4
4
|
import {
|
|
5
5
|
curveBounds,
|
|
6
6
|
pathRibbonOffsets
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-UBQSRCWR.js";
|
|
8
8
|
|
|
9
9
|
// src/util/SpatialIndex.ts
|
|
10
10
|
var FALLBACK_CELL_SIZE = 50;
|
|
@@ -118,7 +118,7 @@ var SpatialIndex = class {
|
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
var EdgeSpatialIndex = class {
|
|
121
|
-
constructor(nodePositions, graph, drawPaths, axis,
|
|
121
|
+
constructor(nodePositions, graph, drawPaths, axis, deletions, version = 0, routes, stranded = false) {
|
|
122
122
|
this.cells = /* @__PURE__ */ new Map();
|
|
123
123
|
this.edgeCurves = baseEdgeCurves(
|
|
124
124
|
nodePositions,
|
|
@@ -162,7 +162,7 @@ var EdgeSpatialIndex = class {
|
|
|
162
162
|
boxes.push({ ei, minX, minY, maxX, maxY });
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
this.cellSize =
|
|
165
|
+
this.cellSize = cellSizeFrom(boxes, extentX, extentY);
|
|
166
166
|
for (const b of boxes) {
|
|
167
167
|
addToGrid(this.cells, this.cellSize, b.minX, b.minY, b.maxX, b.maxY, b.ei);
|
|
168
168
|
}
|
|
@@ -15,6 +15,18 @@ function panSNContig(refName) {
|
|
|
15
15
|
const parts = refName.split(SEP);
|
|
16
16
|
return parts.length >= 3 ? parts.slice(2).join(SEP) : parts.length === 2 ? parts[1] : refName;
|
|
17
17
|
}
|
|
18
|
+
function panSNFields(name) {
|
|
19
|
+
const [sample = "", haplotype = "", ...contig] = name.split(SEP);
|
|
20
|
+
return contig.length > 0 ? { sample, haplotype: +haplotype, contig: contig.join(SEP) } : void 0;
|
|
21
|
+
}
|
|
22
|
+
function parsePanSN(refName) {
|
|
23
|
+
const parts = refName.split(SEP);
|
|
24
|
+
const haplotype = parts.length >= 2 ? Number(parts[1]) : Number.NaN;
|
|
25
|
+
return {
|
|
26
|
+
sample: parts[0],
|
|
27
|
+
haplotype: Number.isFinite(haplotype) ? haplotype : void 0
|
|
28
|
+
};
|
|
29
|
+
}
|
|
18
30
|
function panSNMatchesPrefix(refName, prefix) {
|
|
19
31
|
return prefix !== void 0 && (refName === prefix || refName.startsWith(prefix + SEP));
|
|
20
32
|
}
|
|
@@ -46,6 +58,8 @@ export {
|
|
|
46
58
|
isGenericSample,
|
|
47
59
|
panSNHaplotype,
|
|
48
60
|
panSNContig,
|
|
61
|
+
panSNFields,
|
|
62
|
+
parsePanSN,
|
|
49
63
|
panSNMatchesPrefix,
|
|
50
64
|
resolvePanSNPrefix,
|
|
51
65
|
assemblyByPanSNPrefix
|