@jbrowse/bandage-core
v8.0.1
Published
Pangenome graph layout and drawing with no host: GFA in, the Bandage force-directed engine and reference-anchored layouts, a Canvas2D renderer, hit testing and labels out
Readme
@jbrowse/bandage-core
Pangenome graph layout and drawing with no host, the engine behind jbrowse-plugin-graphgenomeviewer and BandageJS.
npm install @jbrowse/bandage-coreGFA and rGFA text in (
loadGraph)Layouts: Bandage's FMMM engine as WASM (
loadBandage,forceLayout), ordered, anchored, sample rows, walk rows, tube mapA Canvas2D renderer (
buildGeometry,Canvas2DRenderer), hit testing and label placementBubbles, deletion edges, path colors, gbz-base windows cut to GFA
Walks lifted out of the drawing (
walkLift), one facet panel per walk (facetLifts,facetGrid) and each walk's key in words (walkKey)Which assembly a backbone lies on (
graphBackbone,backboneAssembly,assemblyWalk), and the genes on it:featuresOnBackbonerenames an assembly's genes onto the backbone's refNames, andgenePinspins only thoseFigures:
figureSvgdraws a graph and its lifted walks to a standalone SVG, and thebandage-figureCLI makes one from a JSON spec with no browser:npx -p @jbrowse/bandage-core bandage-figure spec.json -o figure.svg. See docs/figures.md
Nothing here imports React, MobX or a JBrowse host. BandageJS's
src/main.ts is
the worked example.
Developing
pnpm install
pnpm test # unit tests
pnpm build # dist/ with declarations
pnpm test:wasm # the committed layout engine still loadsThe Bandage layout engine is OGDF's FMMM compiled to WASM and committed at
src/bandage/bandage-layout.js; src/bandage/README.md
says how to rebuild it from src/bandage/native and the vendored vendor/ogdf.
A weekly workflow proves the committed artifact still reproduces.
CI also packs the core and runs
BandageJS and
jbrowse-plugin-graphgenomeviewer
against it. An API change lands with the consumer's side on a core-next branch
in that repo, which CI tests in place of main until the release.
Release with pnpm version patch: it lints, tests, stamps src/version.ts,
writes the changelog with git-cliff and pushes the v* tag, and publish.yml
publishes to npm with trusted publishing.
License
Both Bandage and OGDF are GPL, which is why this package is GPL-3.0-or-later.
