JBrowse Linear Genome View
A genome browser as a React component. For your own UI around the same engine, see Build your own.
Getting started
Tracks
- Jexl feature colors and labelsColor and re-label each feature from its own attributes.
- Track sizing: grow & fitheightMode, with the same crowded locus opened twice.
- Highlight a feature, and sort it to the topfeatureHighlights boxes one feature and pins its row.
- Group alignments by tagfacet splits the pileup into labeled lanes.
- Haplotagged reads, declared as marksA formula, a facet and a span mark over haplotagged reads.
- Quantitative (BigWig) trackA wiggle display, configured through displayDefaults.
- GTF gene model trackGenes and transcripts built from per-feature lines.
- Variant sample rowsOne row per sample, colored by a samples TSV column.
Navigation and search
- Navigate from your own buttonsnavToLocString for a locstring, navToLocations for coordinates.
- Stub out zoom and scrollA plugin turns zoomTo and scrollTo into no-ops; the inert header is hidden.
- Show a track programmaticallyShow and hide a track from your own button.
- Highlight regionsview.highlight shades regions, with a color and label each.
- Flipped regionsSeveral regions, some reversed, and a horizontallyFlip() button.
- Searching by nameA trix index finds a gene by name.
Sessions
- Open on a default sessionA session carries what view cannot: a track of its own.
- Persist & restore the sessiononSnapshot out, session back in.
- Put the session in the URLencodeSession / decodeSession, for a sharable link.
- Observe the sessionMirror the visible region and the selection into your own UI.
- Two linear genome viewsTwo independent views on one page.
Theming
Integration
- Disable the add-track UIHide the "add track" UI for a locked-down embed.
- A fixed height, with a side drawerThe height prop bounds the view and the drawer beside it.
- Package as a custom elementA <jbrowse-linear-view> tag, shadow-isolated.
- Export the view (SVG/PNG)The exportSvg action, through a ref.
- A picture first, then the viewA screenshot paints with the page; the engine loads near the viewport.
- External pluginloadPlugins fetches a bundle at runtime.
- Inline pluginPass a Plugin subclass from your own source.
- Internet accounts (authentication)A per-track fetch override, usually a bearer token.
- Web workerFetch and parse data off the main thread with makeWorkerInstance.
- Files from your host processOpen a track on bytes your host process holds, with no web server.
- Without ReactcreateLinearGenomeView mounts into an element and hands back a controller.
Real-world demos
- Methylation by haplotypeNanopore reads at SNRPN: one haplotype methylated, the other not.
- Nextstrain pathogensGenes, diversity and genotypes for five viral genomes.
- LocusZoom-style LDGWAS statistics colored by LD to the lead SNP, over an LD triangle.
- Single-cell UMAPSelect clusters to filter coverage rows; click a gene to color cells.
- Pan-UKB GWASPan-UK Biobank GWAS summary statistics across phenotypes.