@jbrowse/bandage-core 11.7.3 → 11.9.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 +59 -19
- package/dist/bubbles/bubbleHalos.js +6 -6
- package/dist/bubbles/classifyBubble.js +5 -5
- package/dist/bubbles/superbubbles.js +7 -7
- package/dist/chunks/{chunk-K4KVAMEF.js → chunk-2A6Z2DHF.js} +1 -1
- package/dist/chunks/{chunk-4SN7R4UF.js → chunk-2MXFG3W7.js} +1 -1
- package/dist/chunks/chunk-3BDQQTXY.js +568 -0
- package/dist/chunks/{chunk-QXBQDHKL.js → chunk-3BOREHCJ.js} +80 -38
- package/dist/chunks/{chunk-F4CDC72I.js → chunk-3DHGSHC3.js} +1 -1
- package/dist/chunks/{chunk-P276TWPM.js → chunk-3GORESBG.js} +1 -1
- package/dist/chunks/{chunk-4KOYS5WR.js → chunk-4BYGFDQB.js} +1 -1
- package/dist/chunks/{chunk-LH436HS2.js → chunk-4JDO7ZLN.js} +2 -2
- package/dist/chunks/{chunk-2US43KNG.js → chunk-7YSIP3O2.js} +2 -2
- package/dist/chunks/{chunk-VNF236GG.js → chunk-ARXDNQLF.js} +2 -2
- package/dist/chunks/{chunk-N73RA4DR.js → chunk-AURNOR27.js} +3 -3
- package/dist/chunks/{chunk-63XWYNID.js → chunk-BDS5VZYZ.js} +4 -4
- package/dist/chunks/{chunk-BXE3SBBN.js → chunk-C3KAPREU.js} +1 -1
- package/dist/chunks/{chunk-VXKL2ZLR.js → chunk-GDZQFELP.js} +259 -60
- package/dist/chunks/{chunk-2T3V6Z3M.js → chunk-GYJMPVOU.js} +1 -1
- package/dist/chunks/{chunk-BFUS3ENH.js → chunk-HEYIAMTC.js} +2 -2
- package/dist/chunks/{chunk-HMEAGAGC.js → chunk-HIN56TLA.js} +2 -2
- package/dist/chunks/{chunk-2VMKQKVO.js → chunk-HNNP5QUN.js} +1 -1
- package/dist/chunks/{chunk-W5YRBEWQ.js → chunk-I53QYITQ.js} +1 -1
- package/dist/chunks/{chunk-UTDMFVC7.js → chunk-I5CHAYDZ.js} +8 -8
- package/dist/chunks/{chunk-EPOPGV5G.js → chunk-IXLT3JJX.js} +1 -1
- package/dist/chunks/{chunk-SG7VQB4F.js → chunk-IZKM4NY7.js} +1 -1
- package/dist/chunks/{chunk-KMLATBNT.js → chunk-J7RNXBXA.js} +3 -3
- package/dist/chunks/{chunk-VACK24HF.js → chunk-JJV2GT2Z.js} +43 -9
- package/dist/chunks/{chunk-PKGPSTRW.js → chunk-JO2T77NW.js} +2 -2
- package/dist/chunks/{chunk-XKPXOIWD.js → chunk-JVT3XTKN.js} +3 -3
- package/dist/chunks/{chunk-SDI6BVG7.js → chunk-KKHXMJEE.js} +1 -1
- package/dist/chunks/{chunk-G7SG4XMK.js → chunk-LODKC7PJ.js} +7 -0
- package/dist/chunks/{chunk-AJQRKN3X.js → chunk-N3DCLT7M.js} +1 -1
- package/dist/chunks/{chunk-ZZZ6NVLW.js → chunk-NAYS472K.js} +1 -1
- package/dist/chunks/{chunk-AWJJSA7D.js → chunk-NWEVR2OQ.js} +1 -1
- package/dist/chunks/{chunk-33KUO34R.js → chunk-P2GJBFNA.js} +1 -1
- package/dist/chunks/{chunk-IHM43Y7B.js → chunk-RT4U3DH3.js} +1 -1
- package/dist/chunks/{chunk-XTCIKBWM.js → chunk-S6E3PMH7.js} +1 -1
- package/dist/chunks/{chunk-BLDUBB7X.js → chunk-SZYFZNCO.js} +2 -2
- package/dist/chunks/{chunk-T3MEG5D3.js → chunk-T2UNTWU5.js} +90 -21
- package/dist/chunks/{chunk-QJC63NFR.js → chunk-TQ26XEFL.js} +2 -2
- package/dist/chunks/{chunk-6RB5ZQ34.js → chunk-UEWIGD52.js} +51 -14
- package/dist/chunks/{chunk-SENPGW4O.js → chunk-VCUOYVLC.js} +1 -1
- package/dist/chunks/{chunk-CL6ELLVF.js → chunk-VNCHWWLG.js} +1 -1
- package/dist/chunks/{chunk-GD6RUZU5.js → chunk-VQ353UDK.js} +14 -8
- package/dist/chunks/{chunk-QLLKALSH.js → chunk-VTGQCLGI.js} +1 -1
- package/dist/chunks/{chunk-Z4HXW6ZH.js → chunk-ZWBQ4RRK.js} +24 -10
- package/dist/cli/figure.js +31 -30
- package/dist/cli/fold.js +6 -6
- package/dist/deletionEdges.js +2 -2
- package/dist/figure.js +27 -26
- package/dist/figureData.js +25 -24
- package/dist/figureScene.js +18 -17
- package/dist/figureSettings.js +6 -6
- package/dist/foldVariants.js +2 -2
- package/dist/genes/genePins.js +3 -3
- package/dist/graphLabels.js +4 -4
- package/dist/index.js +45 -44
- package/dist/labelLayout.js +8 -8
- package/dist/layout/forceCache.js +6 -6
- package/dist/layout/mergeRuns.js +2 -2
- package/dist/layout/orientToReference.js +2 -2
- package/dist/layout/tubeMapLayout.js +9 -9
- package/dist/layout/walkRowDraw.js +9 -8
- package/dist/layout/walkRowLayout.js +3 -3
- package/dist/layout/walkRowRuns.js +1 -1
- package/dist/layout/walkRows.js +2 -2
- package/dist/layout/walkStrip.js +13 -12
- package/dist/layoutModes.js +11 -11
- package/dist/pathColors.js +5 -5
- package/dist/pipeline.js +5 -5
- package/dist/referenceStrip.js +9 -8
- package/dist/renderer/GeometryBuilder.js +8 -7
- package/dist/renderer/walkLanes.js +46 -0
- package/dist/tubeMap/axis.js +5 -5
- package/dist/tubeMap/bundle.js +10 -10
- package/dist/tubeMap/coarsen.js +10 -10
- package/dist/tubeMap/deviations.js +11 -11
- package/dist/tubeMap/draw.js +5 -5
- package/dist/tubeMap/genes.js +6 -6
- package/dist/tubeMap/nodeColors.js +9 -8
- package/dist/tubeMap/reads.js +2 -2
- package/dist/types/figureData.d.ts +22 -0
- package/dist/types/renderer/types.d.ts +20 -0
- package/dist/types/renderer/walkLanes.d.ts +76 -0
- package/dist/types/util/geometry.d.ts +13 -1
- package/dist/types/version.d.ts +1 -1
- package/dist/types/walkEncoding.d.ts +9 -5
- package/dist/types/walkHighlight.d.ts +3 -0
- package/dist/util/SpatialIndex.js +4 -4
- package/dist/util/edgeCurves.js +3 -3
- package/dist/util/geometry.js +7 -1
- package/dist/util/hitDetection.js +5 -5
- package/dist/version.js +1 -1
- package/dist/viewport.js +6 -6
- package/dist/walkEncoding.js +13 -10
- package/dist/walkHighlight.js +10 -9
- package/dist/walkKey.js +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -43,7 +43,7 @@ npm install @jbrowse/bandage-core
|
|
|
43
43
|
backbone lies on. `featuresOnBackbone` renames that assembly's genes onto the
|
|
44
44
|
backbone's refNames, and `genePins` pins only those
|
|
45
45
|
|
|
46
|
-
## Figures
|
|
46
|
+
## Figures
|
|
47
47
|
|
|
48
48
|
- `figureSvg` draws a graph and its lifted walks to a standalone SVG. The
|
|
49
49
|
`bandage-figure` CLI makes one from a JSON spec with no browser:
|
|
@@ -52,9 +52,43 @@ npm install @jbrowse/bandage-core
|
|
|
52
52
|
- `figureData` returns what `figureSvg` would draw as columnar tables, for
|
|
53
53
|
another graphics system to draw;
|
|
54
54
|
[ggbandage](https://github.com/GMOD/ggbandage) draws them in ggplot2
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
55
|
+
|
|
56
|
+
## Coarse tier: `bandage-fold`
|
|
57
|
+
|
|
58
|
+
`bandage-fold` writes an rGFA with every variant under `--below` bp folded into
|
|
59
|
+
the reference. Indexed by gfa-to-tabix, the output is the coarse tier a graph
|
|
60
|
+
track draws once zoomed out past the fine index, so a whole chromosome fits.
|
|
61
|
+
[`gfa-to-tabix fold`](https://github.com/GMOD/gfa-to-tabix/blob/main/docs/subcommands.md#fold)
|
|
62
|
+
documents the fold and the handover from the fine index.
|
|
63
|
+
|
|
64
|
+
```console
|
|
65
|
+
npx -p @jbrowse/bandage-core bandage-fold graph.rgfa.gz --below 10000 \
|
|
66
|
+
| gfa-to-tabix - -o graph.fold10000
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- The input is a GFA or rGFA, plain or gzipped, or `-` for stdin. `-o out.gfa`
|
|
70
|
+
writes a file in place of stdout
|
|
71
|
+
- `--reference PATH` names a plain GFA's backbone path. In an rGFA, the segments
|
|
72
|
+
tagged `SR:i:0` form the backbone
|
|
73
|
+
- The fold keeps the backbone, every allele whose own length or the reference it
|
|
74
|
+
replaces reaches `--below`, and the shortest way from each one's ends back to
|
|
75
|
+
the backbone. It joins the reference between kept alleles into one segment
|
|
76
|
+
- `bandage-fold` drops paths and walks from the output. It writes forward a
|
|
77
|
+
segment that a plain GFA's path reads reversed, and flips its links to match,
|
|
78
|
+
so the output re-reads as the graph that was folded
|
|
79
|
+
- gfa-to-tabix's `--layout anchored|contig` should match the fine index's. An
|
|
80
|
+
anchored window inside a large bubble then returns the whole bubble in both
|
|
81
|
+
tiers, and a contig one only what links reach from it
|
|
82
|
+
- The graph track folds each cut it draws at ten pixels (`FOLD_PX` in
|
|
83
|
+
jbrowse-plugin-graphgenomeviewer), and folding a fold again at a larger size
|
|
84
|
+
closely matches folding the original at that size. A tier folded at N and
|
|
85
|
+
handed over at N / 10 bp per pixel, such as
|
|
86
|
+
`coarse: { uri: "graph.fold10000", aboveBpPerPx: 1000 }`, therefore draws
|
|
87
|
+
nearly what the fine cut drew
|
|
88
|
+
- Node caps a string at 512 MB, and `bandage-fold` reads the whole graph into
|
|
89
|
+
one, so it cannot fold a whole human pangenome. `gfa-to-tabix fold`, a port of
|
|
90
|
+
the same fold, writes the index in one pass:
|
|
91
|
+
`gfa-to-tabix fold graph.rgfa.gz --below 10000 -o graph.fold10000`
|
|
58
92
|
|
|
59
93
|
## Developing
|
|
60
94
|
|
|
@@ -64,21 +98,27 @@ pnpm test # unit tests
|
|
|
64
98
|
pnpm build # dist/ with declarations
|
|
65
99
|
```
|
|
66
100
|
|
|
67
|
-
The FMMM engine and its wasm build are in
|
|
68
|
-
[graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
[
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
101
|
+
- The FMMM engine and its wasm build are in
|
|
102
|
+
[graph-fmmm-layout](https://github.com/GMOD/graph-fmmm-layout)
|
|
103
|
+
- CI also packs the core and runs the typecheck and tests of
|
|
104
|
+
[BandageJS](https://github.com/cmdcolin/BandageJS) and
|
|
105
|
+
[jbrowse-plugin-graphgenomeviewer](https://github.com/GMOD/jbrowse-plugin-graphgenomeviewer)
|
|
106
|
+
against it. For an API change, push the consumer's matching change to a
|
|
107
|
+
`core-next` branch in that consumer's repo, which CI tests in place of `main`
|
|
108
|
+
until the release
|
|
109
|
+
- `src/foldParity.test.ts` folds a few hundred random rGFA graphs with
|
|
110
|
+
`foldVariants` and with the gfa-to-tabix release that
|
|
111
|
+
`.github/actions/gfa-to-tabix` pins, and fails when they fold differently.
|
|
112
|
+
Locally the test runs the `gfa-to-tabix` on PATH or named by `GFA_TO_TABIX`,
|
|
113
|
+
and skips without one. In the other direction, gfa-to-tabix's
|
|
114
|
+
`scripts/parity-fold.sh` checks that `gfa-to-tabix fold` writes the same bytes
|
|
115
|
+
as `bandage-fold | gfa-to-tabix -`, and its CI tests the port against a pinned
|
|
116
|
+
bandage-core
|
|
117
|
+
- Release with `pnpm version patch`: it lints, tests, stamps `src/version.ts`,
|
|
118
|
+
writes the changelog with git-cliff and pushes the `v*` tag. `publish.yml`
|
|
119
|
+
then runs CI, consumers included, and publishes to npm with trusted publishing
|
|
120
|
+
only if it passes. When a consumer fails, push its side to `core-next` and
|
|
121
|
+
rerun the failed jobs
|
|
82
122
|
|
|
83
123
|
## See also
|
|
84
124
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
bubbleHalos,
|
|
3
3
|
coversGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-SZYFZNCO.js";
|
|
5
|
+
import "../chunks/chunk-NWEVR2OQ.js";
|
|
6
6
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-AURNOR27.js";
|
|
8
8
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
9
9
|
import "../chunks/chunk-AB35TJST.js";
|
|
10
|
-
import "../chunks/chunk-
|
|
11
|
-
import "../chunks/chunk-
|
|
10
|
+
import "../chunks/chunk-HNNP5QUN.js";
|
|
11
|
+
import "../chunks/chunk-3GORESBG.js";
|
|
12
12
|
import "../chunks/chunk-TLWXLNLY.js";
|
|
13
13
|
import "../chunks/chunk-3YBP46PB.js";
|
|
14
|
-
import "../chunks/chunk-
|
|
14
|
+
import "../chunks/chunk-JJV2GT2Z.js";
|
|
15
15
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
16
16
|
import "../chunks/chunk-ZPZ7GNBT.js";
|
|
17
17
|
import "../chunks/chunk-BSOZW3FC.js";
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
BUBBLE_KIND_NAMES,
|
|
4
4
|
bubbleSegmentIds,
|
|
5
5
|
classifyBubble
|
|
6
|
-
} from "../chunks/chunk-
|
|
6
|
+
} from "../chunks/chunk-NWEVR2OQ.js";
|
|
7
7
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
8
|
-
import "../chunks/chunk-
|
|
8
|
+
import "../chunks/chunk-AURNOR27.js";
|
|
9
9
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
10
10
|
import "../chunks/chunk-AB35TJST.js";
|
|
11
|
-
import "../chunks/chunk-
|
|
12
|
-
import "../chunks/chunk-
|
|
11
|
+
import "../chunks/chunk-HNNP5QUN.js";
|
|
12
|
+
import "../chunks/chunk-3GORESBG.js";
|
|
13
13
|
import "../chunks/chunk-TLWXLNLY.js";
|
|
14
14
|
import "../chunks/chunk-3YBP46PB.js";
|
|
15
|
-
import "../chunks/chunk-
|
|
15
|
+
import "../chunks/chunk-JJV2GT2Z.js";
|
|
16
16
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
17
17
|
import "../chunks/chunk-ZPZ7GNBT.js";
|
|
18
18
|
import "../chunks/chunk-BSOZW3FC.js";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
graphBubbles,
|
|
3
3
|
superbubblesFromGraph
|
|
4
|
-
} from "../chunks/chunk-
|
|
5
|
-
import "../chunks/chunk-
|
|
4
|
+
} from "../chunks/chunk-J7RNXBXA.js";
|
|
5
|
+
import "../chunks/chunk-SZYFZNCO.js";
|
|
6
6
|
import "../chunks/chunk-RFG42VIO.js";
|
|
7
|
-
import "../chunks/chunk-
|
|
7
|
+
import "../chunks/chunk-NWEVR2OQ.js";
|
|
8
8
|
import "../chunks/chunk-FX4RDMDN.js";
|
|
9
9
|
import "../chunks/chunk-MHZTTLBU.js";
|
|
10
10
|
import "../chunks/chunk-UAFATXYA.js";
|
|
11
11
|
import "../chunks/chunk-VX656OAZ.js";
|
|
12
|
-
import "../chunks/chunk-
|
|
12
|
+
import "../chunks/chunk-AURNOR27.js";
|
|
13
13
|
import "../chunks/chunk-HMXCN6PG.js";
|
|
14
14
|
import "../chunks/chunk-AB35TJST.js";
|
|
15
|
-
import "../chunks/chunk-
|
|
16
|
-
import "../chunks/chunk-
|
|
15
|
+
import "../chunks/chunk-HNNP5QUN.js";
|
|
16
|
+
import "../chunks/chunk-3GORESBG.js";
|
|
17
17
|
import "../chunks/chunk-TLWXLNLY.js";
|
|
18
18
|
import "../chunks/chunk-3YBP46PB.js";
|
|
19
|
-
import "../chunks/chunk-
|
|
19
|
+
import "../chunks/chunk-JJV2GT2Z.js";
|
|
20
20
|
import "../chunks/chunk-CPMHA4W5.js";
|
|
21
21
|
import "../chunks/chunk-ZPZ7GNBT.js";
|
|
22
22
|
import "../chunks/chunk-BSOZW3FC.js";
|