@jbrowse/bandage-core 12.5.1 → 12.6.1
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/bubbles/bubbleHalos.js +6 -6
- package/dist/bubbles/classifyBubble.js +5 -5
- package/dist/bubbles/popBubble.js +2 -2
- package/dist/bubbles/superbubbles.js +8 -8
- package/dist/chunks/{chunk-23KZAXYG.js → chunk-2C5O34JJ.js} +14 -14
- package/dist/chunks/{chunk-AROLTYCK.js → chunk-3A4XRB2C.js} +1 -1
- package/dist/chunks/{chunk-RV6YKJA3.js → chunk-3LAOZB2I.js} +1 -1
- package/dist/chunks/{chunk-72HYCU7V.js → chunk-3UYMOEKF.js} +2 -2
- package/dist/chunks/{chunk-JQVS4DRW.js → chunk-4J4IKYSL.js} +1 -1
- package/dist/chunks/{chunk-LQNQFFPY.js → chunk-4MS7JFRY.js} +2 -2
- package/dist/chunks/{chunk-UEIUFEQY.js → chunk-54DLYBBU.js} +1 -1
- package/dist/chunks/{chunk-EH64AFZH.js → chunk-5QAQV7DT.js} +4 -4
- package/dist/chunks/{chunk-55CFTY5H.js → chunk-5XXUBTSN.js} +3 -3
- package/dist/chunks/{chunk-ZTH7T5QK.js → chunk-5ZWKBAAS.js} +29 -18
- package/dist/chunks/chunk-77TYCUVR.js +118 -0
- package/dist/chunks/{chunk-T6EWT5ET.js → chunk-BMU7JPHI.js} +3 -3
- package/dist/chunks/{chunk-VA5U4F23.js → chunk-D7ZTAGDM.js} +3 -2
- package/dist/chunks/{chunk-H5N3HE53.js → chunk-DMP3DQZT.js} +1 -1
- package/dist/chunks/{chunk-OPTHW6IZ.js → chunk-EAKP6VH6.js} +1 -1
- package/dist/chunks/{chunk-U6ILKBCW.js → chunk-EEDZY4E5.js} +1 -1
- package/dist/chunks/{chunk-YR3HOBN2.js → chunk-ESTKW37X.js} +2 -2
- package/dist/chunks/{chunk-VUUVL3WZ.js → chunk-FCCKHTQP.js} +1 -1
- package/dist/chunks/{chunk-WUTD47OG.js → chunk-H5NMBQZG.js} +1 -1
- package/dist/chunks/{chunk-FTVESWXT.js → chunk-IDPBN2BP.js} +1 -1
- package/dist/chunks/{chunk-XDTIBSTI.js → chunk-K2Y5BWHF.js} +2 -2
- package/dist/chunks/{chunk-ZXGGKW3X.js → chunk-KGMCRRKM.js} +1 -1
- package/dist/chunks/{chunk-H4UHV22B.js → chunk-L2FHURWV.js} +1 -1
- package/dist/chunks/{chunk-IXRW2FCR.js → chunk-LDHBYZAB.js} +1 -1
- package/dist/chunks/{chunk-ZAKP7T6S.js → chunk-LWLO2B37.js} +1 -1
- package/dist/chunks/{chunk-XM4ZBF5P.js → chunk-MHOE34QT.js} +8 -8
- package/dist/chunks/{chunk-YI7CEK4W.js → chunk-O6SLIY74.js} +3 -3
- package/dist/chunks/{chunk-GAZWQMC6.js → chunk-OUYHOHHF.js} +2 -2
- package/dist/chunks/{chunk-UGECUIDN.js → chunk-PAPUFUJZ.js} +3 -3
- package/dist/chunks/{chunk-BPIKXPB4.js → chunk-PQYOXT6V.js} +2 -2
- package/dist/chunks/{chunk-PLX2PMGF.js → chunk-Q4B4O2M4.js} +2 -2
- package/dist/chunks/{chunk-BRH73RCH.js → chunk-QBI6SC74.js} +19 -9
- package/dist/chunks/{chunk-BGEAXWE7.js → chunk-QPKSULKV.js} +1 -1
- package/dist/chunks/{chunk-4NUW2F2Y.js → chunk-RQHIDUZR.js} +1 -1
- package/dist/chunks/{chunk-URPU4XCM.js → chunk-RV5RJZKO.js} +1 -1
- package/dist/chunks/{chunk-MJ7ADOYX.js → chunk-RYDRC3Y5.js} +1 -1
- package/dist/chunks/{chunk-MQQ7E5SC.js → chunk-SPSYFAIP.js} +1 -1
- package/dist/chunks/{chunk-ZULVAGVE.js → chunk-TAHZ6TZ6.js} +2 -2
- package/dist/chunks/{chunk-VA2RAPPR.js → chunk-ULFBFEPG.js} +2 -2
- package/dist/chunks/{chunk-6ZO2MD6Q.js → chunk-WLOSINY4.js} +1 -1
- package/dist/chunks/{chunk-PQWVJUL7.js → chunk-WMP72ZWV.js} +1 -1
- package/dist/chunks/{chunk-ALGYCMMH.js → chunk-XDG2VSEC.js} +66 -45
- package/dist/chunks/{chunk-RRFGPMJE.js → chunk-XDO7E7P3.js} +3 -3
- package/dist/chunks/{chunk-NQPCXWVP.js → chunk-Y4ZWAC23.js} +2 -2
- package/dist/chunks/{chunk-V35LJPJL.js → chunk-ZGCRG46V.js} +1 -1
- package/dist/chunks/{chunk-DGKR4JJX.js → chunk-ZWIKCBQD.js} +11 -11
- package/dist/cli/figure.js +34 -34
- package/dist/cli/fold.js +9 -9
- package/dist/deletionEdges.js +9 -7
- package/dist/figure.js +29 -29
- package/dist/figureData.js +29 -29
- package/dist/figureScene.js +22 -22
- package/dist/figureSettings.js +10 -10
- package/dist/gbzCut.js +4 -4
- package/dist/gbzWindow.js +3 -3
- package/dist/gfa/gfaConverter.js +3 -3
- package/dist/gfa/gfaTables.js +2 -2
- package/dist/gfa/graphTables.js +2 -2
- package/dist/gfa/walkStops.js +1 -1
- package/dist/graphLabels.js +4 -4
- package/dist/index.js +45 -45
- package/dist/labelLayout.js +8 -8
- package/dist/layout/deletionRoutes.js +5 -1
- package/dist/layout/forceCache.js +10 -10
- package/dist/layout/trimToWindow.js +2 -2
- package/dist/layout/tubeMapLayout.js +10 -10
- package/dist/layout/walkRowDraw.js +9 -9
- package/dist/layout/walkRowLayout.js +13 -13
- package/dist/layout/walkRowRuns.js +4 -4
- package/dist/layout/walkRows.js +5 -5
- package/dist/layout/walkStrip.js +14 -14
- package/dist/layoutModes.js +15 -15
- package/dist/pathAnchoring.js +3 -1
- package/dist/pathColors.js +5 -5
- package/dist/pipeline.js +9 -9
- package/dist/referenceStrip.js +8 -8
- package/dist/renderer/GeometryBuilder.js +7 -7
- package/dist/tubeMap/axis.js +5 -5
- package/dist/tubeMap/bundle.js +11 -11
- package/dist/tubeMap/coarsen.js +11 -11
- package/dist/tubeMap/deviations.js +12 -12
- package/dist/tubeMap/draw.js +6 -6
- package/dist/tubeMap/genes.js +6 -6
- package/dist/tubeMap/nodeColors.js +8 -8
- package/dist/types/deletionEdges.d.ts +2 -1
- package/dist/types/layout/deletionRoutes.d.ts +2 -1
- package/dist/types/pathAnchoring.d.ts +5 -0
- package/dist/types/pipeline.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/util/SpatialIndex.js +5 -5
- package/dist/util/edgeCurves.js +4 -4
- package/dist/util/hitDetection.js +6 -6
- package/dist/version.js +1 -1
- package/dist/viewport.js +10 -10
- package/dist/walkEncoding.js +8 -8
- package/dist/walkHighlight.js +10 -10
- package/dist/walkKey.js +6 -6
- package/package.json +1 -1
- package/dist/chunks/chunk-VPE4AYP7.js +0 -79
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleHalos,
|
|
3
3
|
coversGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-RYDRC3Y5.js";
|
|
5
|
+
import "../chunks/chunk-EEDZY4E5.js";
|
|
6
6
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-EAKP6VH6.js";
|
|
8
8
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
9
9
|
import "../chunks/chunk-S43IBA5Y.js";
|
|
10
10
|
import "../chunks/chunk-HNNP5QUN.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
13
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-XDG2VSEC.js";
|
|
12
|
+
import "../chunks/chunk-L2FHURWV.js";
|
|
13
|
+
import "../chunks/chunk-QBI6SC74.js";
|
|
14
14
|
import "../chunks/chunk-JJV2GT2Z.js";
|
|
15
15
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
16
16
|
import "../chunks/chunk-BEUTROKU.js";
|
|
@@ -3,15 +3,15 @@ import {
|
|
|
3
3
|
BUBBLE_KIND_NAMES,
|
|
4
4
|
bubbleSegmentIds,
|
|
5
5
|
classifyBubble
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-EEDZY4E5.js";
|
|
7
7
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
import "../chunks/chunk-EAKP6VH6.js";
|
|
9
9
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
10
10
|
import "../chunks/chunk-S43IBA5Y.js";
|
|
11
11
|
import "../chunks/chunk-HNNP5QUN.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
13
|
-
import "../chunks/chunk-
|
|
14
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-XDG2VSEC.js";
|
|
13
|
+
import "../chunks/chunk-L2FHURWV.js";
|
|
14
|
+
import "../chunks/chunk-QBI6SC74.js";
|
|
15
15
|
import "../chunks/chunk-JJV2GT2Z.js";
|
|
16
16
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
17
17
|
import "../chunks/chunk-BEUTROKU.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleSubgraph
|
|
3
|
-
} from "../chunks/chunk-
|
|
4
|
-
import "../chunks/chunk-
|
|
3
|
+
} from "../chunks/chunk-3LAOZB2I.js";
|
|
4
|
+
import "../chunks/chunk-QBI6SC74.js";
|
|
5
5
|
import "../chunks/chunk-BEUTROKU.js";
|
|
6
6
|
import "../chunks/chunk-BSOZW3FC.js";
|
|
7
7
|
import "../chunks/chunk-RJWPJCIB.js";
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-BMU7JPHI.js";
|
|
5
|
+
import "../chunks/chunk-RYDRC3Y5.js";
|
|
6
6
|
import "../chunks/chunk-V6WSDZPL.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-EEDZY4E5.js";
|
|
8
8
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
9
|
-
import "../chunks/chunk-
|
|
9
|
+
import "../chunks/chunk-3LAOZB2I.js";
|
|
10
10
|
import "../chunks/chunk-Q7OFBTBW.js";
|
|
11
11
|
import "../chunks/chunk-L4DBSRA2.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-EAKP6VH6.js";
|
|
13
13
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
14
14
|
import "../chunks/chunk-S43IBA5Y.js";
|
|
15
15
|
import "../chunks/chunk-HNNP5QUN.js";
|
|
16
|
-
import "../chunks/chunk-
|
|
17
|
-
import "../chunks/chunk-
|
|
18
|
-
import "../chunks/chunk-
|
|
16
|
+
import "../chunks/chunk-XDG2VSEC.js";
|
|
17
|
+
import "../chunks/chunk-L2FHURWV.js";
|
|
18
|
+
import "../chunks/chunk-QBI6SC74.js";
|
|
19
19
|
import "../chunks/chunk-JJV2GT2Z.js";
|
|
20
20
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
21
21
|
import "../chunks/chunk-BEUTROKU.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
stripGeneGaps,
|
|
6
6
|
walkStripFrame,
|
|
7
7
|
walkStripLabelsTree
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5XXUBTSN.js";
|
|
9
9
|
import {
|
|
10
10
|
Canvas2DRenderer
|
|
11
11
|
} from "./chunk-4DMSPNYV.js";
|
|
@@ -17,39 +17,39 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
geneLabelCandidates,
|
|
19
19
|
geneLeader
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-3UYMOEKF.js";
|
|
21
21
|
import {
|
|
22
22
|
nodesUnderBox
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-LDHBYZAB.js";
|
|
24
24
|
import {
|
|
25
25
|
genePins
|
|
26
26
|
} from "./chunk-HEYIAMTC.js";
|
|
27
27
|
import {
|
|
28
28
|
version
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-3A4XRB2C.js";
|
|
30
30
|
import {
|
|
31
31
|
axisScaleOf
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-ZGCRG46V.js";
|
|
33
33
|
import {
|
|
34
34
|
figureScene
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-MHOE34QT.js";
|
|
36
36
|
import {
|
|
37
37
|
fadedKey
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5QAQV7DT.js";
|
|
39
39
|
import {
|
|
40
40
|
encodingStops
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-WLOSINY4.js";
|
|
42
42
|
import {
|
|
43
43
|
rangeText
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-K2Y5BWHF.js";
|
|
45
45
|
import {
|
|
46
46
|
walkRowLabels
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-OUYHOHHF.js";
|
|
48
48
|
import {
|
|
49
49
|
walkRowsKey,
|
|
50
50
|
walkRowsKeyTree,
|
|
51
51
|
walkRowsTree
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-XDO7E7P3.js";
|
|
53
53
|
import {
|
|
54
54
|
THREAD_PX,
|
|
55
55
|
passesKey,
|
|
@@ -60,11 +60,11 @@ import {
|
|
|
60
60
|
} from "./chunk-XWH4LB56.js";
|
|
61
61
|
import {
|
|
62
62
|
FIGURE_DEFAULTS
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-SPSYFAIP.js";
|
|
64
64
|
import {
|
|
65
65
|
FIT_PADDING,
|
|
66
66
|
fitTransform
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-5ZWKBAAS.js";
|
|
68
68
|
import {
|
|
69
69
|
LABEL_CHAR_PX,
|
|
70
70
|
LABEL_PAD,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
import {
|
|
76
76
|
dashedDeletions,
|
|
77
77
|
deletionKey
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-XDG2VSEC.js";
|
|
79
79
|
import {
|
|
80
80
|
escapeAttr,
|
|
81
81
|
serializeEl
|
|
@@ -2,17 +2,17 @@ import {
|
|
|
2
2
|
encodedColor,
|
|
3
3
|
resolveEncoding,
|
|
4
4
|
splitFamilies
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-WLOSINY4.js";
|
|
6
6
|
import {
|
|
7
7
|
rampFraction
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-Y4ZWAC23.js";
|
|
9
9
|
import {
|
|
10
10
|
gapParts
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-D7ZTAGDM.js";
|
|
12
12
|
import {
|
|
13
13
|
pathOrigin,
|
|
14
14
|
referenceVisitStarts
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QBI6SC74.js";
|
|
16
16
|
import {
|
|
17
17
|
isBackbone
|
|
18
18
|
} from "./chunk-RJWPJCIB.js";
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
READOUT_ROOM,
|
|
3
3
|
longestBar
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OUYHOHHF.js";
|
|
5
5
|
import {
|
|
6
6
|
alongRow,
|
|
7
7
|
barEnd,
|
|
8
8
|
boxesGenes,
|
|
9
9
|
rowPitch,
|
|
10
10
|
rowSpan
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-XDO7E7P3.js";
|
|
12
12
|
import {
|
|
13
13
|
LABEL_CHAR_PX
|
|
14
14
|
} from "./chunk-S43IBA5Y.js";
|
|
15
15
|
import {
|
|
16
16
|
pathOrigin
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-QBI6SC74.js";
|
|
18
18
|
import {
|
|
19
19
|
partitionPoint
|
|
20
20
|
} from "./chunk-HOAIOEI7.js";
|
|
@@ -8,13 +8,14 @@ import {
|
|
|
8
8
|
seededNodes
|
|
9
9
|
} from "./chunk-4FRX2SPT.js";
|
|
10
10
|
import {
|
|
11
|
+
archRoutes,
|
|
11
12
|
routeNodes,
|
|
12
13
|
takeRoutes,
|
|
13
14
|
withDeletionRoutes
|
|
14
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-77TYCUVR.js";
|
|
15
16
|
import {
|
|
16
17
|
convertGFAToGraph
|
|
17
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-Q4B4O2M4.js";
|
|
18
19
|
import {
|
|
19
20
|
parseGFA
|
|
20
21
|
} from "./chunk-CFXXFHRK.js";
|
|
@@ -23,10 +24,10 @@ import {
|
|
|
23
24
|
} from "./chunk-FGH4D6WT.js";
|
|
24
25
|
import {
|
|
25
26
|
graphFromTables
|
|
26
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-IDPBN2BP.js";
|
|
27
28
|
import {
|
|
28
29
|
gfaTables
|
|
29
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-4J4IKYSL.js";
|
|
30
31
|
import {
|
|
31
32
|
mergeRuns,
|
|
32
33
|
splitRuns
|
|
@@ -40,12 +41,13 @@ import {
|
|
|
40
41
|
layoutScaling
|
|
41
42
|
} from "./chunk-34BOZKIE.js";
|
|
42
43
|
import {
|
|
43
|
-
|
|
44
|
-
deletionEdges
|
|
45
|
-
|
|
44
|
+
closableLinks,
|
|
45
|
+
deletionEdges,
|
|
46
|
+
offReferenceLinks
|
|
47
|
+
} from "./chunk-XDG2VSEC.js";
|
|
46
48
|
import {
|
|
47
49
|
anchorGraph
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-QBI6SC74.js";
|
|
49
51
|
import {
|
|
50
52
|
isBackbone
|
|
51
53
|
} from "./chunk-RJWPJCIB.js";
|
|
@@ -127,18 +129,17 @@ function engineKey(graph, settings) {
|
|
|
127
129
|
async function forceLayout(cut, settings, engine) {
|
|
128
130
|
const graph = withoutStrayHandles(cut);
|
|
129
131
|
const spread = spreadFor(settings.bubbleSpread);
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
);
|
|
135
|
-
const routed = withDeletionRoutes(graph, deletions, dropped);
|
|
132
|
+
const loose = closableLinks(graph, offReferenceLinks(graph));
|
|
133
|
+
const deletions = deletionEdges(graph);
|
|
134
|
+
const kept = deletions.filter((d) => !loose.has(d.edgeIndex));
|
|
135
|
+
const routed = withDeletionRoutes(graph, kept, loose);
|
|
136
136
|
const merged = mergeRuns(routed.graph, routed.ids);
|
|
137
137
|
const runs = {
|
|
138
138
|
...merged.graph,
|
|
139
139
|
nodes: merged.graph.nodes.filter((n) => !routed.ids.has(n.id))
|
|
140
140
|
};
|
|
141
141
|
const engineScaling = layoutScaling(runs, spread);
|
|
142
|
+
const drawnOf = drawnLengthOf(runs, spread);
|
|
142
143
|
const { result, duration } = await engine(
|
|
143
144
|
engineRequest(
|
|
144
145
|
merged.graph,
|
|
@@ -148,10 +149,11 @@ async function forceLayout(cut, settings, engine) {
|
|
|
148
149
|
...engineScaling.nodes,
|
|
149
150
|
...routeNodes(
|
|
150
151
|
graph,
|
|
151
|
-
|
|
152
|
+
kept,
|
|
152
153
|
routed.routes,
|
|
153
|
-
|
|
154
|
-
engineScaling.opts
|
|
154
|
+
drawnOf,
|
|
155
|
+
engineScaling.opts,
|
|
156
|
+
runs.nodes.reduce((sum, n) => sum + drawnOf(n.length), 0)
|
|
155
157
|
)
|
|
156
158
|
]
|
|
157
159
|
},
|
|
@@ -169,10 +171,19 @@ async function forceLayout(cut, settings, engine) {
|
|
|
169
171
|
])
|
|
170
172
|
);
|
|
171
173
|
const positions = splitRuns(smoothed, merged.runs, (id) => drawn.get(id) ?? 0);
|
|
172
|
-
const
|
|
174
|
+
const taken = takeRoutes(
|
|
173
175
|
graph.nodes.some(isBackbone) ? orientToReference(graph, positions) : positions,
|
|
174
176
|
routed.routes
|
|
175
177
|
);
|
|
178
|
+
const { nodePositions } = taken;
|
|
179
|
+
const deletionRoutes = {
|
|
180
|
+
...taken.deletionRoutes,
|
|
181
|
+
...archRoutes(
|
|
182
|
+
graph,
|
|
183
|
+
deletions.filter((d) => loose.has(d.edgeIndex)),
|
|
184
|
+
nodePositions
|
|
185
|
+
)
|
|
186
|
+
};
|
|
176
187
|
return {
|
|
177
188
|
result: {
|
|
178
189
|
...result,
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
strandSides
|
|
3
|
+
} from "./chunk-JJV2GT2Z.js";
|
|
4
|
+
|
|
5
|
+
// src/layout/deletionRoutes.ts
|
|
6
|
+
import { ROUTE_ID } from "@jbrowse/graph-stress-layout";
|
|
7
|
+
var ROUTE_FRACTION = 0.5;
|
|
8
|
+
function withDeletionRoutes(graph, deletions, dropped = /* @__PURE__ */ new Set()) {
|
|
9
|
+
const routes = new Map(
|
|
10
|
+
deletions.map((d) => [d.edgeIndex, `${ROUTE_ID}${d.edgeIndex}`])
|
|
11
|
+
);
|
|
12
|
+
const edges = [];
|
|
13
|
+
graph.edges.forEach((edge, ei) => {
|
|
14
|
+
const id = routes.get(ei);
|
|
15
|
+
if (dropped.has(ei)) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
if (id === void 0) {
|
|
19
|
+
edges.push(edge);
|
|
20
|
+
} else {
|
|
21
|
+
const { fromStrand, toStrand } = edge;
|
|
22
|
+
edges.push(
|
|
23
|
+
{ from: edge.from, to: id, ...fromStrand ? { fromStrand } : {} },
|
|
24
|
+
{ from: id, to: edge.to, ...toStrand ? { toStrand } : {} }
|
|
25
|
+
);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
return {
|
|
29
|
+
graph: {
|
|
30
|
+
...graph,
|
|
31
|
+
nodes: [
|
|
32
|
+
...graph.nodes,
|
|
33
|
+
...[...routes.values()].map((id) => ({
|
|
34
|
+
id,
|
|
35
|
+
name: id,
|
|
36
|
+
length: 0,
|
|
37
|
+
depth: 0
|
|
38
|
+
}))
|
|
39
|
+
],
|
|
40
|
+
edges
|
|
41
|
+
},
|
|
42
|
+
routes,
|
|
43
|
+
ids: new Set(routes.values())
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function routeNodes(graph, deletions, routes, drawnOf, opts, budget) {
|
|
47
|
+
const lengths = new Map(graph.nodes.map((n) => [n.id, n.length]));
|
|
48
|
+
const wanted = deletions.map(
|
|
49
|
+
(d) => Math.max(
|
|
50
|
+
opts.minimumNodeLength,
|
|
51
|
+
drawnOf(d.bypassed.reduce((sum, id) => sum + (lengths.get(id) ?? 0), 0)) * ROUTE_FRACTION
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
const total = wanted.reduce((sum, drawn) => sum + drawn, 0);
|
|
55
|
+
const scale = total > budget ? budget / total : 1;
|
|
56
|
+
return deletions.map((d, i) => {
|
|
57
|
+
const drawn = Math.max(opts.minimumNodeLength, wanted[i] * scale);
|
|
58
|
+
const id = routes.get(d.edgeIndex);
|
|
59
|
+
return {
|
|
60
|
+
id,
|
|
61
|
+
name: id,
|
|
62
|
+
length: Math.round(drawn * 1e6 / opts.nodeLengthPerMegabase),
|
|
63
|
+
depth: 0
|
|
64
|
+
};
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function takeRoutes(positions, routes) {
|
|
68
|
+
const nodePositions = { ...positions };
|
|
69
|
+
const deletionRoutes = {};
|
|
70
|
+
for (const [edgeIndex, id] of routes) {
|
|
71
|
+
const route = nodePositions[id];
|
|
72
|
+
delete nodePositions[id];
|
|
73
|
+
if (route?.length) {
|
|
74
|
+
deletionRoutes[edgeIndex] = route;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return { nodePositions, deletionRoutes };
|
|
78
|
+
}
|
|
79
|
+
var ARCH = 0.25;
|
|
80
|
+
var ARCH_CAP = 150;
|
|
81
|
+
function archRoutes(graph, deletions, nodePositions) {
|
|
82
|
+
const starts = new Map(
|
|
83
|
+
graph.nodes.flatMap((n) => n.stable ? [[n.id, n.stable.start]] : [])
|
|
84
|
+
);
|
|
85
|
+
const end = (segments, side) => side === "start" ? segments[0] : segments.at(-1);
|
|
86
|
+
const routes = {};
|
|
87
|
+
for (const d of deletions) {
|
|
88
|
+
const from = nodePositions[d.from];
|
|
89
|
+
const to = nodePositions[d.to];
|
|
90
|
+
if (from?.length && to?.length) {
|
|
91
|
+
const sides = strandSides(graph.edges[d.edgeIndex]);
|
|
92
|
+
const a = end(from, sides.from);
|
|
93
|
+
const b = end(to, sides.to);
|
|
94
|
+
const chord = Math.hypot(b.x - a.x, b.y - a.y);
|
|
95
|
+
if (chord > 0) {
|
|
96
|
+
const downstream = (starts.get(d.from) ?? 0) <= (starts.get(d.to) ?? 0) ? 1 : -1;
|
|
97
|
+
const rise = Math.min(ARCH * chord, ARCH_CAP) * downstream;
|
|
98
|
+
const n = { x: -(b.y - a.y) / chord, y: (b.x - a.x) / chord };
|
|
99
|
+
routes[d.edgeIndex] = [1, 2, 3, 4, 5, 6, 7].map((k) => {
|
|
100
|
+
const t = k / 8;
|
|
101
|
+
const lift = 4 * t * (1 - t) * rise;
|
|
102
|
+
return {
|
|
103
|
+
x: a.x + (b.x - a.x) * t - n.x * lift,
|
|
104
|
+
y: a.y + (b.y - a.y) * t - n.y * lift
|
|
105
|
+
};
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return routes;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export {
|
|
114
|
+
withDeletionRoutes,
|
|
115
|
+
routeNodes,
|
|
116
|
+
takeRoutes,
|
|
117
|
+
archRoutes
|
|
118
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
coversGraph
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RYDRC3Y5.js";
|
|
4
4
|
import {
|
|
5
5
|
bubblesFromGraph,
|
|
6
6
|
derivedBubble,
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-V6WSDZPL.js";
|
|
11
11
|
import {
|
|
12
12
|
bubbleSegmentIds
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-EEDZY4E5.js";
|
|
14
14
|
import {
|
|
15
15
|
bubbleSubgraph
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-3LAOZB2I.js";
|
|
17
17
|
import {
|
|
18
18
|
strandSides
|
|
19
19
|
} from "./chunk-JJV2GT2Z.js";
|
|
@@ -7,8 +7,9 @@ var GAP_CAUSE_TEXT = {
|
|
|
7
7
|
elsewhere: "on nodes filed elsewhere",
|
|
8
8
|
unknown: "gap, cause unknown",
|
|
9
9
|
abridged: "abridged: steps not loaded",
|
|
10
|
-
// a walk file's skip row: the haplotype
|
|
11
|
-
|
|
10
|
+
// a walk file's skip row: the haplotype has no step on the reference
|
|
11
|
+
// across the window, which says nothing of what it carries instead
|
|
12
|
+
deleted: "no step on the reference"
|
|
12
13
|
};
|
|
13
14
|
var OUTSIDE_TEXT = "outside the extracted subgraph";
|
|
14
15
|
function gapParts(bp, after, before) {
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-KKHXMJEE.js";
|
|
10
10
|
import {
|
|
11
11
|
referenceWalkName
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-O6SLIY74.js";
|
|
13
13
|
import {
|
|
14
14
|
pathOrigin
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-QBI6SC74.js";
|
|
16
16
|
import {
|
|
17
17
|
pushTo
|
|
18
18
|
} from "./chunk-BSOZW3FC.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GAP_CAUSE_TEXT,
|
|
3
3
|
OUTSIDE_TEXT
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-D7ZTAGDM.js";
|
|
5
5
|
import {
|
|
6
6
|
formatBp,
|
|
7
7
|
groupDigits
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-EAKP6VH6.js";
|
|
9
9
|
|
|
10
10
|
// src/walkKey.ts
|
|
11
11
|
function rangeText(contig, start, end) {
|