The HPRC pangenome on genomes.jbrowse.org
TL;DR: genomes.jbrowse.org's HPRC page launches the Minigraph-Cactus graph as a graph, on any GRCh38 region you type, beside a linear view of the same window. A row of chromosome buttons draws each whole chromosome off a bubble tier. Nothing is built by hand; the HPRC pangenome tutorial is where the files come from.
The graph view is a beta plugin, and the page is on staging.genomes.jbrowse.org until JBrowse 5 ships, because the plugin needs a build newer than the released hosts. We welcome your feedback.
Prerequisites
- nothing to install: this is a click-path through a hosted page and the sessions it launches
- to build the graph indexes yourself, or to add the same tracks to your own JBrowse, take the HPRC pangenome tutorial instead; every launch below opens a config it describes
Where the data comes from
The page launches one hosted config,
https://jbrowse.org/pangenome/hprc-grch38/config.json, whose tracks are tabix
projections of the release 2 sv.gfa and the release's own variant callset:
- the SV-resolution graph the projections are cut from: https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/hprc-v2.0-mc-grch38.sv.gfa.gz
- the segment and link indexes, the bubble file, the allele inventory and the bubble tier, all under https://jbrowse.org/demos/hprc/ with a README stating how each was built
- the 464-haplotype callset, read straight off S3: https://s3-us-west-2.amazonaws.com/human-pangenomics/pangenomes/freeze/release2/minigraph-cactus/hprc-v2.0-mc-grch38.wave.vcf.gz
Two ways in
The HPRC page is the one to take when a region is what you have. Its Draw the graph form takes a GRCh38 locstring and opens the graph cut to that window, and its chromosome row opens a whole chromosome at bubble resolution. The rest of this page walks that route.
The variable loci explorer is the one to take when a gene is what you have. It is a catalog of GRCh38 loci where structure varies between haplotypes, and each locus card carries the same graph launch, sized to the window the graph draws well, beside the variant summaries and the genotype matrix for that locus.
Drawing a window
Open the HPRC page and scroll to
Draw the graph. The box arrives holding chr6:32,510,001-32,600,000, the
MHC class II window, and the presets beneath it are the catalog's loci that
minigraph draws well; the ones it collapses onto a single path (SMN1/2,
RHD/RHCE, CYP2D6) are left out on purpose, because the graph there is a bare
thread and reads as an empty result.
Type any region, with or without commas, and press Draw as a graph. The note under the box says what the launch will cut. Past 150 kb it warns instead: the layout scales the graph to fit, so a megabase-wide window draws as one unreadable thread rather than as loops. The cut is refused outright past 5 Mb, which is the view's own limit.
The session that opens is two panels. Above, a linear view of the window with the RefSeq genes, the bubbles lane, the rGFA segments colored by rank (reference blue, everything else orange) and the allele inventory, which draws each insertion at its real magnitude. Below, the graph, colored along the reference from red at the window's start to magenta at its end, with a segment that has no reference coordinate in charcoal. Hovering a node highlights its segment in the lane above, and hovering the lane highlights the node.
The form is only the first cut. Inside the session, the segments track's menu carries Launch → Graph genome view (this region), and rubberbanding a span offers Graph genome view (this selection), so a zoomed-in window reopens as a graph without going back to the page.
Drawing a whole chromosome
The chromosome row draws the tier the HPRC tutorial builds with
build_bubble_tier.sh: one node per top-level bubble, so chr1's 249 Mb is a few
hundred nodes and lays out in milliseconds. The linear view above it swaps the
segment-level lanes for the tier's own lane and a curve of segments per bubble,
which is where the graph varies and by how much.
The chromosome launch opens in the Anchored layout, where every x is a reference coordinate, rather than the force-directed default: a few hundred nodes in a chain bend into an arc under a force layout, and anchored keeps them under the linear view they came from. The Layout dropdown switches between the two.
The one setting the launch changes is the view's maxRegionBp, raised to the
chromosome's length: the 5 Mb default is a proxy for node count that a tier
breaks. The real ceiling, maxGraphNodes, is unchanged.
Beyond 5 Mb at segment resolution
The graph view cuts a window and lays it out in the browser, which is what makes
it self-hosting and what caps it. For the same region at every scale in between,
the form's Open in PangyPlot link opens
PangyPlot, which precomputes an odgi
layout and level-of-detail tiers server-side and navigates by the same
chrom:start-end. Its instance serves the release 1.1 graph, so a locus can
differ in detail from the release 2 launch beside it; the coordinates line up
because both are on GRCh38.
Adding the same tracks to your own instance
Every launch above opens https://jbrowse.org/pangenome/hprc-grch38/config.json,
which is a plain JBrowse config you can read. The
HPRC pangenome tutorial walks each of its
tracks, from the plugin declaration through the rGFA indexes to the tier, and
the same session-spec URLs the page builds can be written by hand: a
LinearGenomeView with an id, and a GraphGenomeView carrying
loadedTrackId, loadedRegion and connectedViewId naming that id.
Feedback on this tutorial is welcome: contact us.