@jbrowse/bandage-core 11.5.0 → 11.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/alleleProjection/projectAlleles.js +1 -1
- package/dist/bubbles/bubbleHalos.js +9 -6
- package/dist/bubbles/classifyBubble.js +8 -5
- package/dist/bubbles/popBubble.js +3 -3
- package/dist/bubbles/superbubbles.js +11 -11
- package/dist/chunks/{chunk-FFHJGWDK.js → chunk-2C5SATRZ.js} +5 -5
- package/dist/chunks/{chunk-4XWZNPQ2.js → chunk-2JL2JVZ2.js} +1 -1
- package/dist/chunks/{chunk-BZFOFC4D.js → chunk-2VMKQKVO.js} +17 -7
- package/dist/chunks/{chunk-HN3WHMPJ.js → chunk-2XEAITWM.js} +15 -5
- package/dist/chunks/{chunk-7BTO7MZS.js → chunk-376YFQOY.js} +2 -2
- package/dist/chunks/{chunk-K5LDBMLX.js → chunk-3FWNQNF7.js} +1 -1
- package/dist/chunks/{chunk-B5X2RLJG.js → chunk-3YBP46PB.js} +27 -2
- package/dist/chunks/{chunk-EJRJAAN7.js → chunk-4DMSPNYV.js} +47 -27
- package/dist/chunks/{chunk-A32ZKSHN.js → chunk-4WXFQOYV.js} +5 -5
- package/dist/chunks/{chunk-OMUPUB4J.js → chunk-56L6R6D2.js} +2 -2
- package/dist/chunks/{chunk-C44YRP5F.js → chunk-5OJZV6YT.js} +3 -2
- package/dist/chunks/{chunk-234NFZS4.js → chunk-5ORP7EFJ.js} +1 -1
- package/dist/chunks/{chunk-J3JODFDF.js → chunk-5WB7O7IT.js} +3 -3
- package/dist/chunks/{chunk-3VCKBSML.js → chunk-6YRSOL4K.js} +2 -2
- package/dist/chunks/{chunk-WG5D2H7X.js → chunk-7OTWJQGA.js} +10 -10
- package/dist/chunks/{chunk-77EGQQJU.js → chunk-BFUS3ENH.js} +2 -2
- package/dist/chunks/{chunk-TGUFT6KK.js → chunk-BLUEFYIR.js} +4 -1
- package/dist/chunks/{chunk-3BCVMZUT.js → chunk-BVWMVWLJ.js} +10 -10
- package/dist/chunks/{chunk-3GP3KT5L.js → chunk-BW2NMXRV.js} +5 -5
- package/dist/chunks/{chunk-2E25TX4G.js → chunk-C6E6HXP5.js} +4 -4
- package/dist/chunks/{chunk-5I3K4R2G.js → chunk-CFXXFHRK.js} +2 -1
- package/dist/chunks/{chunk-JMABOQWL.js → chunk-CO6RGQAD.js} +1 -6
- package/dist/chunks/{chunk-64FCX424.js → chunk-D3E7AXBB.js} +40 -9
- package/dist/chunks/{chunk-CGMSKIEO.js → chunk-DV5B5UU7.js} +55 -8
- package/dist/chunks/{chunk-G6UIYQZR.js → chunk-EQDQ7P4Y.js} +3 -2
- package/dist/chunks/{chunk-VQ7474EH.js → chunk-EVXXFMZ7.js} +8 -7
- package/dist/chunks/{chunk-AKLSY4GD.js → chunk-F3KQQDKP.js} +1 -1
- package/dist/chunks/{chunk-6EOB6ANX.js → chunk-GZ36HNPJ.js} +1 -1
- package/dist/chunks/{chunk-3U3C4PRK.js → chunk-HV35LDYH.js} +3 -3
- package/dist/chunks/{chunk-JOWKKQAL.js → chunk-JGHZ3N34.js} +14 -9
- package/dist/chunks/{chunk-D4ZFRBB4.js → chunk-JGQQAUVL.js} +3 -3
- package/dist/chunks/{chunk-PSCSZSVK.js → chunk-KA4F3N55.js} +4 -4
- package/dist/chunks/{chunk-SOMZGDVS.js → chunk-KJDERUQF.js} +1 -1
- package/dist/chunks/{chunk-E4ZM4OOJ.js → chunk-KZMSSPS6.js} +2 -2
- package/dist/chunks/{chunk-IOWLTUEB.js → chunk-MEVTV4FI.js} +1 -1
- package/dist/chunks/{chunk-PNMJFFNB.js → chunk-MHZTTLBU.js} +1 -1
- package/dist/chunks/{chunk-TRGKMLXT.js → chunk-MXLYBDOX.js} +14 -13
- package/dist/chunks/{chunk-RK3HRRCW.js → chunk-NXBW6KY6.js} +6 -7
- package/dist/chunks/{chunk-WC6HX6GJ.js → chunk-OUM54ZSQ.js} +2 -2
- package/dist/chunks/{chunk-WA5WNP6V.js → chunk-OYCQVJYY.js} +1 -1
- package/dist/chunks/{chunk-FWSERUJV.js → chunk-P5PBJONQ.js} +1 -1
- package/dist/chunks/{chunk-JOLLU34X.js → chunk-PQIFYQVI.js} +1 -1
- package/dist/chunks/{chunk-EGBBIXTG.js → chunk-QCOVHLJO.js} +1 -1
- package/dist/chunks/{chunk-5F4D35U5.js → chunk-QD35GH4C.js} +3 -3
- package/dist/chunks/{chunk-XKZ56L5A.js → chunk-RLCYVZ4B.js} +1 -1
- package/dist/chunks/{chunk-PQBALYSO.js → chunk-ROLACYCO.js} +16 -16
- package/dist/chunks/{chunk-A7H753BA.js → chunk-SDI6BVG7.js} +5 -6
- package/dist/chunks/{chunk-A4JDEUAI.js → chunk-SNF2MIEF.js} +1 -1
- package/dist/chunks/{chunk-NMWQUFPF.js → chunk-SVVFWTG4.js} +2 -2
- package/dist/chunks/{chunk-PFRQBCGC.js → chunk-T3H5ELLA.js} +4 -4
- package/dist/chunks/{chunk-WLR4KJVI.js → chunk-TXTSE44S.js} +1 -1
- package/dist/chunks/{chunk-UBQSRCWR.js → chunk-VACK24HF.js} +43 -3
- package/dist/chunks/{chunk-HSVFCA2J.js → chunk-VO6FKNZE.js} +1 -1
- package/dist/chunks/{chunk-NJGYLYU7.js → chunk-W2YAW36J.js} +1 -1
- package/dist/chunks/{chunk-VD4MLYEK.js → chunk-WI6SUU5B.js} +2 -2
- package/dist/chunks/{chunk-GJU6BJJA.js → chunk-XR2HMGAS.js} +1 -1
- package/dist/chunks/{chunk-KOJKFNCW.js → chunk-XXOBCANT.js} +26 -12
- package/dist/chunks/{chunk-7EDGWT67.js → chunk-YEYQFNFQ.js} +1 -1
- package/dist/chunks/{chunk-UFUSPK2A.js → chunk-YYIU7P73.js} +4 -1
- package/dist/chunks/{chunk-CRCD3ODN.js → chunk-ZANALBSX.js} +11 -3
- package/dist/cli/figure.js +51 -46
- package/dist/cli/fold.js +11 -11
- package/dist/deletionEdges.js +5 -2
- package/dist/facetGrid.js +2 -2
- package/dist/figure.js +35 -35
- package/dist/figureData.js +37 -37
- package/dist/figureScene.js +25 -25
- package/dist/figureSettings.js +11 -11
- package/dist/foldVariants.js +2 -2
- package/dist/gaf/parseGaf.js +1 -1
- package/dist/gbzCut.js +4 -4
- package/dist/gbzWindow.js +3 -3
- package/dist/genes/backboneGenes.js +4 -4
- package/dist/genes/geneFiles.js +1 -1
- package/dist/genes/genePins.js +3 -3
- package/dist/gfa/gfaConverter.js +4 -4
- package/dist/gfa/graphTables.js +2 -2
- package/dist/gfa-core/gfaParser.js +1 -1
- package/dist/gfa-core/index.js +1 -1
- package/dist/graphLabels.js +7 -4
- package/dist/index.js +62 -62
- package/dist/labelLayout.js +11 -8
- package/dist/layout/anchoredLayout.js +1 -1
- package/dist/layout/forceCache.js +11 -11
- package/dist/layout/mergeRuns.js +2 -2
- package/dist/layout/placeOffReference.js +1 -1
- package/dist/layout/sampleRowLayout.js +2 -2
- package/dist/layout/trimToWindow.js +2 -2
- package/dist/layout/tubeMapLayout.js +14 -14
- package/dist/layout/walkRowDraw.js +12 -12
- package/dist/layout/walkRowLayout.js +7 -7
- package/dist/layout/walkRowLinks.js +1 -1
- package/dist/layout/walkRowRuns.js +4 -4
- package/dist/layout/walkRows.js +5 -5
- package/dist/layout/walkStrip.js +17 -17
- package/dist/layoutEngines.js +1 -1
- package/dist/layoutModes.js +17 -17
- package/dist/locus.js +1 -1
- package/dist/nodeWidths.js +5 -3
- package/dist/pansn.js +1 -1
- package/dist/pathAnchoring.js +4 -2
- package/dist/pathColors.js +8 -8
- package/dist/pipeline.js +10 -10
- package/dist/reference.js +2 -2
- package/dist/referenceStrip.js +12 -12
- package/dist/renderer/Canvas2DRenderer.js +1 -1
- package/dist/renderer/GeometryBuilder.js +11 -11
- package/dist/tubeMap/axis.js +8 -5
- package/dist/tubeMap/bundle.js +15 -15
- package/dist/tubeMap/coarsen.js +15 -15
- package/dist/tubeMap/deviations.js +18 -18
- package/dist/tubeMap/draw.js +10 -8
- package/dist/tubeMap/genes.js +9 -6
- package/dist/tubeMap/nodeColors.js +12 -12
- package/dist/tubeMap/reads.js +4 -4
- package/dist/types/figureData.d.ts +12 -0
- package/dist/types/gaf/parseGaf.d.ts +1 -1
- package/dist/types/nodeWidths.d.ts +2 -1
- package/dist/types/pathAnchoring.d.ts +2 -0
- package/dist/types/renderer/Canvas2DRenderer.d.ts +2 -0
- package/dist/types/tubeMap/reads.d.ts +0 -1
- package/dist/types/util/geometry.d.ts +7 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/util/SpatialIndex.js +7 -4
- package/dist/util/edgeCurves.js +6 -3
- package/dist/util/geometry.js +1 -1
- package/dist/util/hitDetection.js +8 -5
- package/dist/version.js +1 -1
- package/dist/viewport.js +11 -11
- package/dist/walkEncoding.js +12 -12
- package/dist/walkHighlight.js +13 -13
- package/dist/walkKey.js +8 -5
- package/package.json +1 -1
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import {
|
|
2
|
-
canonicalStrand,
|
|
3
2
|
stepName,
|
|
4
3
|
tubeMapReads
|
|
5
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SDI6BVG7.js";
|
|
6
5
|
import {
|
|
7
6
|
referenceWalkName
|
|
8
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-D3E7AXBB.js";
|
|
9
8
|
import {
|
|
10
9
|
pathCssColor,
|
|
11
10
|
pathGreyCssColor
|
|
12
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BW2NMXRV.js";
|
|
13
12
|
import {
|
|
14
13
|
pathOrigin
|
|
15
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-3YBP46PB.js";
|
|
16
15
|
import {
|
|
17
16
|
ownStrand,
|
|
18
17
|
strandSides
|
|
19
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VACK24HF.js";
|
|
20
19
|
import {
|
|
21
20
|
groupBy
|
|
22
21
|
} from "./chunk-BSOZW3FC.js";
|
|
@@ -39,7 +38,7 @@ function pathSteps(graph) {
|
|
|
39
38
|
}
|
|
40
39
|
const at = visits && next ? next(visits.slot(node.name), walk) : -1;
|
|
41
40
|
return [
|
|
42
|
-
{ node, strand: at >= 0 ? visits.strand(at) :
|
|
41
|
+
{ node, strand: at >= 0 ? visits.strand(at) : ownStrand(node.id) }
|
|
43
42
|
];
|
|
44
43
|
});
|
|
45
44
|
});
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
hasTubeMapPaths,
|
|
4
4
|
tubeMapLayout,
|
|
5
5
|
tubeMapReferenceLayout
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-NXBW6KY6.js";
|
|
7
7
|
import {
|
|
8
8
|
sampleRowLayout
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-XR2HMGAS.js";
|
|
10
10
|
import {
|
|
11
11
|
anchoredLayout
|
|
12
12
|
} from "./chunk-GJLZ2MKE.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./chunk-UAFATXYA.js";
|
|
16
16
|
import {
|
|
17
17
|
walkRowLayout
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-P5PBJONQ.js";
|
|
19
19
|
import {
|
|
20
20
|
isBackbone,
|
|
21
21
|
isOffReference
|
|
@@ -2,10 +2,10 @@ import {
|
|
|
2
2
|
stripGeneGaps,
|
|
3
3
|
walkStripFrame,
|
|
4
4
|
walkStripLabelsTree
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-4WXFQOYV.js";
|
|
6
6
|
import {
|
|
7
7
|
Canvas2DRenderer
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-4DMSPNYV.js";
|
|
9
9
|
import {
|
|
10
10
|
svgCanvas
|
|
11
11
|
} from "./chunk-V4YML3GR.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
walkRowsKey,
|
|
14
14
|
walkRowsKeyTree,
|
|
15
15
|
walkRowsTree
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MXLYBDOX.js";
|
|
17
17
|
import {
|
|
18
18
|
EXON_COLOR,
|
|
19
19
|
exonOutlineTree,
|
|
@@ -21,45 +21,45 @@ import {
|
|
|
21
21
|
} from "./chunk-JSUCGZ6K.js";
|
|
22
22
|
import {
|
|
23
23
|
geneLabelCandidates
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-KA4F3N55.js";
|
|
25
25
|
import {
|
|
26
26
|
nodesUnderBox
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-56L6R6D2.js";
|
|
28
28
|
import {
|
|
29
29
|
escapeAttr,
|
|
30
30
|
serializeEl
|
|
31
31
|
} from "./chunk-H2H4Y3TV.js";
|
|
32
32
|
import {
|
|
33
33
|
genePins
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-BFUS3ENH.js";
|
|
35
35
|
import {
|
|
36
36
|
version
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-TXTSE44S.js";
|
|
38
38
|
import {
|
|
39
39
|
axisScaleOf
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RLCYVZ4B.js";
|
|
41
41
|
import {
|
|
42
42
|
figureScene
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-BVWMVWLJ.js";
|
|
44
44
|
import {
|
|
45
45
|
encodingStops
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-2XEAITWM.js";
|
|
47
47
|
import {
|
|
48
48
|
rangeText
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-JGQQAUVL.js";
|
|
50
50
|
import {
|
|
51
51
|
walkRowLabels
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-P5PBJONQ.js";
|
|
53
53
|
import {
|
|
54
54
|
nodeInk
|
|
55
|
-
} from "./chunk-
|
|
55
|
+
} from "./chunk-ZANALBSX.js";
|
|
56
56
|
import {
|
|
57
57
|
FIGURE_DEFAULTS
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-3FWNQNF7.js";
|
|
59
59
|
import {
|
|
60
60
|
FIT_PADDING,
|
|
61
61
|
fitTransform
|
|
62
|
-
} from "./chunk-
|
|
62
|
+
} from "./chunk-7OTWJQGA.js";
|
|
63
63
|
import {
|
|
64
64
|
LABEL_CHAR_PX,
|
|
65
65
|
LABEL_PAD,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
FACET_PAD_PX,
|
|
73
73
|
FACET_TITLE_PX,
|
|
74
74
|
facetGrid
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-BLUEFYIR.js";
|
|
76
76
|
|
|
77
77
|
// src/figure.ts
|
|
78
78
|
var FONT = 'font-family="Helvetica, Arial, sans-serif" font-size="11"';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
parseCs
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5OJZV6YT.js";
|
|
4
|
+
import {
|
|
5
|
+
ownStrand
|
|
6
|
+
} from "./chunk-VACK24HF.js";
|
|
4
7
|
|
|
5
8
|
// src/tubeMap/reads.ts
|
|
6
|
-
function canonicalStrand(node) {
|
|
7
|
-
return node.id.endsWith("-") ? "-" : "+";
|
|
8
|
-
}
|
|
9
9
|
function stepName(node, strand) {
|
|
10
|
-
return strand ===
|
|
10
|
+
return strand === ownStrand(node.id) ? node.id : `-${node.id}`;
|
|
11
11
|
}
|
|
12
12
|
function stepStarts(lengths, total) {
|
|
13
13
|
const starts = lengths.map(() => void 0);
|
|
@@ -137,7 +137,6 @@ function readColor(read) {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
export {
|
|
140
|
-
canonicalStrand,
|
|
141
140
|
stepName,
|
|
142
141
|
tubeMapReads,
|
|
143
142
|
FORWARD_READ_COLORS,
|
|
@@ -3,14 +3,14 @@ import {
|
|
|
3
3
|
} from "./chunk-HNWJ4B7S.js";
|
|
4
4
|
import {
|
|
5
5
|
wellKnownSample
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5ORP7EFJ.js";
|
|
7
7
|
import {
|
|
8
8
|
gfaTables
|
|
9
9
|
} from "./chunk-DZR37KXT.js";
|
|
10
10
|
import {
|
|
11
11
|
panSNMatchesPrefix,
|
|
12
12
|
panSNSample
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2JL2JVZ2.js";
|
|
14
14
|
|
|
15
15
|
// src/gbzWindow.ts
|
|
16
16
|
import { isReverse, nodeId } from "@gmod/gbz-base";
|
|
@@ -7,15 +7,15 @@ import {
|
|
|
7
7
|
} from "./chunk-AB35TJST.js";
|
|
8
8
|
import {
|
|
9
9
|
polylineMidpoint
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-2VMKQKVO.js";
|
|
11
11
|
import {
|
|
12
12
|
edgeCurvesOf
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DV5B5UU7.js";
|
|
14
14
|
import {
|
|
15
15
|
curveBounds,
|
|
16
16
|
curveMidpoint,
|
|
17
17
|
polylinePx
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-VACK24HF.js";
|
|
19
19
|
|
|
20
20
|
// src/graphLabels.ts
|
|
21
21
|
var MIN_DELETION_LABEL_PX = 26;
|
|
@@ -55,7 +55,7 @@ function groupDigits(n) {
|
|
|
55
55
|
return String(n).replace(/\B(?=(\d{3})+$)/g, ",");
|
|
56
56
|
}
|
|
57
57
|
function formatBp(bp) {
|
|
58
|
-
const [value, unit] = bp >=
|
|
58
|
+
const [value, unit] = bp >= 999500 ? [bp / 1e6, "Mb"] : bp >= 1e3 ? [bp / 1e3, "kb"] : [];
|
|
59
59
|
if (value === void 0) {
|
|
60
60
|
return `${bp} bp`;
|
|
61
61
|
}
|
|
@@ -71,16 +71,56 @@ function curveTangentAt(c, t) {
|
|
|
71
71
|
y: a * (c.cy0 - c.y0) + b * (c.cy1 - c.cy0) + d * (c.y1 - c.cy1)
|
|
72
72
|
};
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
var VISIBLE_SAMPLES = 32;
|
|
75
|
+
function visibleStretches(curves, lengths, bounds, yToX) {
|
|
76
|
+
const stretches = [];
|
|
77
|
+
let start = 0;
|
|
78
|
+
curves.forEach((c, k) => {
|
|
79
|
+
const length = lengths[k];
|
|
80
|
+
const pad = length / VISIBLE_SAMPLES;
|
|
81
|
+
let last = curvePointAt(c, 0);
|
|
82
|
+
for (let i = 1; i <= VISIBLE_SAMPLES; i++) {
|
|
83
|
+
const next = curvePointAt(c, i / VISIBLE_SAMPLES);
|
|
84
|
+
if (Math.max(last.x, next.x) + pad >= bounds.minX && Math.min(last.x, next.x) - pad <= bounds.maxX && Math.max(last.y, next.y) + pad / yToX >= bounds.minY && Math.min(last.y, next.y) - pad / yToX <= bounds.maxY) {
|
|
85
|
+
const from = start + length * (i - 1) / VISIBLE_SAMPLES;
|
|
86
|
+
const to = start + length * i / VISIBLE_SAMPLES;
|
|
87
|
+
const prev = stretches.at(-1);
|
|
88
|
+
if (prev && prev[1] >= from) {
|
|
89
|
+
prev[1] = to;
|
|
90
|
+
} else {
|
|
91
|
+
stretches.push([from, to]);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
last = next;
|
|
95
|
+
}
|
|
96
|
+
start += length;
|
|
97
|
+
});
|
|
98
|
+
return stretches;
|
|
99
|
+
}
|
|
100
|
+
function dashCurves(curves, dashWorld, yToX = 1, bounds) {
|
|
75
101
|
const lengths = curves.map(
|
|
76
|
-
(c) => Math.hypot(c.cx0 - c.x0, c.cy0 - c.y0) + Math.hypot(c.cx1 - c.cx0, c.cy1 - c.cy0) + Math.hypot(c.x1 - c.cx1, c.y1 - c.cy1)
|
|
102
|
+
(c) => Math.hypot(c.cx0 - c.x0, (c.cy0 - c.y0) * yToX) + Math.hypot(c.cx1 - c.cx0, (c.cy1 - c.cy0) * yToX) + Math.hypot(c.x1 - c.cx1, (c.y1 - c.cy1) * yToX)
|
|
77
103
|
);
|
|
78
104
|
const total = lengths.reduce((a, b) => a + b, 0);
|
|
79
|
-
const
|
|
105
|
+
const periods = Math.round(total / dashWorld);
|
|
106
|
+
const spans = Math.max(3, periods % 2 ? periods : periods + 1);
|
|
107
|
+
const stretches = bounds ? visibleStretches(curves, lengths, bounds, yToX) : void 0;
|
|
108
|
+
let seen = 0;
|
|
80
109
|
const out = [];
|
|
81
110
|
for (let i = 0; i < spans; i += 2) {
|
|
82
111
|
const from = i / spans * total;
|
|
83
112
|
const to = (i + 1) / spans * total;
|
|
113
|
+
if (stretches) {
|
|
114
|
+
while (seen < stretches.length && stretches[seen][1] < from) {
|
|
115
|
+
seen++;
|
|
116
|
+
}
|
|
117
|
+
if (seen === stretches.length) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
if (stretches[seen][0] > to) {
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
84
124
|
const dash = [];
|
|
85
125
|
let start = 0;
|
|
86
126
|
curves.forEach((c, k) => {
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
layoutEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-CO6RGQAD.js";
|
|
4
4
|
import {
|
|
5
5
|
layoutModeByValue
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QD35GH4C.js";
|
|
7
7
|
import {
|
|
8
8
|
parseRegion
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5WB7O7IT.js";
|
|
10
10
|
import {
|
|
11
11
|
genePins
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-BFUS3ENH.js";
|
|
13
13
|
import {
|
|
14
14
|
version
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-TXTSE44S.js";
|
|
16
16
|
import {
|
|
17
17
|
axisScaleOf
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RLCYVZ4B.js";
|
|
19
19
|
import {
|
|
20
20
|
figureScene
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-BVWMVWLJ.js";
|
|
22
22
|
import {
|
|
23
23
|
encodingStops
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-2XEAITWM.js";
|
|
25
25
|
import {
|
|
26
26
|
abgrAlpha,
|
|
27
27
|
abgrBlue,
|
|
@@ -30,13 +30,16 @@ import {
|
|
|
30
30
|
} from "./chunk-G2FD7S3C.js";
|
|
31
31
|
import {
|
|
32
32
|
FIGURE_DEFAULTS
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-3FWNQNF7.js";
|
|
34
34
|
import {
|
|
35
35
|
engineSettingsOf,
|
|
36
36
|
fitTransform,
|
|
37
37
|
forceLayout,
|
|
38
38
|
loadGraph
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7OTWJQGA.js";
|
|
40
|
+
import {
|
|
41
|
+
referenceVisitStarts
|
|
42
|
+
} from "./chunk-3YBP46PB.js";
|
|
40
43
|
import {
|
|
41
44
|
isBackbone
|
|
42
45
|
} from "./chunk-RJWPJCIB.js";
|
|
@@ -68,6 +71,7 @@ function figureData(graph, layout, o = {}) {
|
|
|
68
71
|
const {
|
|
69
72
|
bounds,
|
|
70
73
|
colorScheme,
|
|
74
|
+
referenceRamp,
|
|
71
75
|
drawnDeletions,
|
|
72
76
|
lift,
|
|
73
77
|
facets,
|
|
@@ -225,6 +229,7 @@ function figureData(graph, layout, o = {}) {
|
|
|
225
229
|
}
|
|
226
230
|
}
|
|
227
231
|
}
|
|
232
|
+
const startsOf = referenceVisitStarts(graph);
|
|
228
233
|
return {
|
|
229
234
|
meta: {
|
|
230
235
|
generator: `@jbrowse/bandage-core@${version}`,
|
|
@@ -234,7 +239,13 @@ function figureData(graph, layout, o = {}) {
|
|
|
234
239
|
pixelRows,
|
|
235
240
|
referenceAxis: layout.referenceAxis ?? false,
|
|
236
241
|
colorScheme,
|
|
237
|
-
referenceName: referenceName ?? null
|
|
242
|
+
referenceName: referenceName ?? null,
|
|
243
|
+
// the reference bp the position hues run between, hue 0 to 300
|
|
244
|
+
referenceRamp: referenceRamp ? {
|
|
245
|
+
start: referenceRamp.start,
|
|
246
|
+
end: referenceRamp.start + referenceRamp.span
|
|
247
|
+
} : null,
|
|
248
|
+
deletions: drawnDeletions.shown.length
|
|
238
249
|
},
|
|
239
250
|
panels: {
|
|
240
251
|
panel: panels.map((p) => p.name),
|
|
@@ -253,7 +264,10 @@ function figureData(graph, layout, o = {}) {
|
|
|
253
264
|
name: graph.nodes.map((n) => n.name),
|
|
254
265
|
length: graph.nodes.map((n) => n.length),
|
|
255
266
|
depth: graph.nodes.map((n) => n.depth),
|
|
256
|
-
backbone: graph.nodes.map((n) => isBackbone(n))
|
|
267
|
+
backbone: graph.nodes.map((n) => isBackbone(n)),
|
|
268
|
+
referenceVisits: graph.nodes.map(
|
|
269
|
+
(n) => isBackbone(n) ? startsOf(n).length : 0
|
|
270
|
+
)
|
|
257
271
|
},
|
|
258
272
|
rowLabels: {
|
|
259
273
|
label: (layout.rowLabels ?? []).map((r) => r.label),
|
|
@@ -186,7 +186,10 @@ function walkRowBlocks(rows, join = ribbonJoin(rows)) {
|
|
|
186
186
|
if (setKey.has(id)) {
|
|
187
187
|
const root = find(id);
|
|
188
188
|
total.set(root, (total.get(root) ?? 0) + bp);
|
|
189
|
-
|
|
189
|
+
const lowest = least.get(root);
|
|
190
|
+
if (lowest === void 0 || id < lowest) {
|
|
191
|
+
least.set(root, id);
|
|
192
|
+
}
|
|
190
193
|
}
|
|
191
194
|
}
|
|
192
195
|
}
|
|
@@ -37,13 +37,20 @@ function nodeWidthPx(node, contigThickness, nodeWidth, mean) {
|
|
|
37
37
|
function maxNodeWidthPx(contigThickness, nodeWidth) {
|
|
38
38
|
return contigThickness * (nodeWidth === "depth" ? MAX_FACTOR : 1);
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
var MIN_WALK_LANE_PX = 4;
|
|
41
|
+
function walkLaneWidthPx(width, lanes) {
|
|
42
|
+
return Math.max(width / lanes, MIN_WALK_LANE_PX);
|
|
43
|
+
}
|
|
44
|
+
function nodeInk(graph, nodeById, contigThickness, nodeWidth, lanes = 0) {
|
|
41
45
|
const mean = graph ? meanDepth(graph) : 0;
|
|
46
|
+
const reach = (width) => lanes > 0 ? walkLaneWidthPx(width, lanes) * lanes / 2 : width / 2;
|
|
42
47
|
return {
|
|
43
|
-
maxHalfWidthPx: maxNodeWidthPx(contigThickness, nodeWidth)
|
|
48
|
+
maxHalfWidthPx: reach(maxNodeWidthPx(contigThickness, nodeWidth)),
|
|
44
49
|
halfWidthPx: (id) => {
|
|
45
50
|
const node = nodeById?.get(id);
|
|
46
|
-
return
|
|
51
|
+
return reach(
|
|
52
|
+
node ? nodeWidthPx(node, contigThickness, nodeWidth, mean) : contigThickness
|
|
53
|
+
);
|
|
47
54
|
}
|
|
48
55
|
};
|
|
49
56
|
}
|
|
@@ -53,5 +60,6 @@ export {
|
|
|
53
60
|
meanDepth,
|
|
54
61
|
nodeWidthPx,
|
|
55
62
|
maxNodeWidthPx,
|
|
63
|
+
walkLaneWidthPx,
|
|
56
64
|
nodeInk
|
|
57
65
|
};
|