Pangenome (cattle)
The tutorials target the JBrowse v5 beta, and the v4.3.0 release
on the download page lacks some of what they show. To install the
beta of JBrowse Web, run npm install -g @jbrowse/cli@next, then
jbrowse create jbrowse2 --branch v5.0.0-beta.17. Desktop beta builds are coming soon.
The bovine super-pangenome builds a set of assemblies into one graph on the
ARS-UCD1.2 cattle reference, a Hereford that is itself one of them: taurine and
indicine breeds, yak, bison and gaur. Each assembly is a named path through the
graph, and vg deconstruct turns those paths into a VCF, so one locus reads
both as a graph of where sequence is present and absent and as a callset listing
which assemblies have it. We:
- read a whole chromosome with one node per variant region
- at HSPA1A, compare the graph's list of alleles with the callset
- find three published breed and species variants in the callset
Every step starts from the graph's page on genomes.jbrowse.org, which launches the JBrowse 5 development build until JBrowse 5 ships.
The graph view is a beta plugin. We welcome your feedback.
Prerequisites
- the GraphGenomeView plugin, for the
GraphTrackbelow. In your own JBrowse, install it from the plugin store; the portal page already loads it python3and htslib (bgzip,tabix), to build the OMIA trackvg, to deconstruct the graph into a callset
# Debian/Ubuntu
sudo apt install tabix
# or conda, which has every tool above
conda install -c bioconda -c conda-forge htslib vgThe data
The OMIA build script fetches OMIA's dump, and the
track configs below read the hosted files by URL. For a graph of your own, swap
the prefix in uri for your gfa-to-tabix build, as Load the genome and the
graph shows.
| What it is | File |
|---|---|
| OMIA's database dump, the source of the curated variant track | omia.sql.gz |
Read by URL (no download needed)
| What it is | File |
|---|---|
| The segment and link index | bovine-arsucd12-minigraph.segs.bed.gz bovine-arsucd12-minigraph.links.bed.gz |
| The bubble index, where assemblies' paths split and rejoin | bovine-arsucd12-minigraph.bubbles.bed.gz |
| The allele inventory, one row per alternative sequence at a bubble | bovine-arsucd12-minigraph.alleles.bed.gz |
| The overview used for whole chromosomes, with variants under 10 kb folded into the reference | bovine-arsucd12-minigraph.fold10000.segs.bed.gz bovine-arsucd12-minigraph.fold10000.links.bed.gz |
Load the genome and the graph
We'll load the reference the graph is anchored to, then the graph track. Swap
the prefix in uri for your own gfa-to-tabix build, which writes the
tabix-indexed segments and links and the overview.
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "bosTau9",
"aliases": ["ARS-UCD1.2"],
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/bosTau9/bigZips/bosTau9.2bit",
"refNameAliases": {
"uri": "https://jbrowse.org/ucsc/bosTau9/bosTau9.chromAlias.txt"
}
}jbrowse add-assembly https://hgdownload.soe.ucsc.edu/goldenPath/bosTau9/bigZips/bosTau9.2bit \
--name bosTau9 \
--alias ARS-UCD1.2 \
--refNameAliases https://jbrowse.org/ucsc/bosTau9/bosTau9.chromAlias.txtGoes in the tracks array of config.json. See Tracks.
{
"type": "GraphTrack",
"trackId": "bovine_minigraph_segments",
"name": "Bovine super-pangenome (rGFA segments)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph",
"coarse": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.fold10000",
"aboveBpPerPx": 1000
}
},
"displays": [
{ "type": "LinearGraphDisplay" },
{ "type": "LinearBasicDisplay" }
]
}jbrowse add-track-json '{
"type": "GraphTrack",
"trackId": "bovine_minigraph_segments",
"name": "Bovine super-pangenome (rGFA segments)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph",
"coarse": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.fold10000",
"aboveBpPerPx": 1000
}
},
"displays": [
{ "type": "LinearGraphDisplay" },
{ "type": "LinearBasicDisplay" }
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "GraphTrack",
"trackId": "bovine_minigraph_segments",
"name": "Bovine super-pangenome (rGFA segments)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph",
"coarse": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.fold10000",
"aboveBpPerPx": 1000
}
},
"displays": [
{ "type": "LinearGraphDisplay" },
{ "type": "LinearBasicDisplay" }
]
}Overview of chr23 with small variants folded
Open chr23 on the portal page and press Open in JBrowse. The whole chromosome opens with the graph's coarse tier, which folds every variant under 10 kb into the reference.
BoLA, the cattle major histocompatibility complex (immune genes that vary a lot between breeds), contains the heat shock gene HSPA1A, the subject of the next section.
HSPA1A in the graph and the callset
ARS-UCD1.2 lacks an 11 kb segment beside the heat shock gene HSPA1A, which
contains HSPA1B, its near-identical copy. Leonard et al. (2022) recovered it
in every assembly they built. The graph lists that segment in the allele
inventory. These graphs record no build order, so its firstSeenIn column names
the first assembly in a fixed list, which need not contain the segment.
The callset gives a genotype per assembly. We ran vg deconstruct once per
chromosome over the same graph:
# -p: vg's PackedGraph format, which deconstruct reads
vg convert -g chr1.gfa -p > chr1.vg
# -p: the reference path to decompose against
# -a: nested snarls too, so a bubble inside a bubble gets a record
vg deconstruct -p chr1 -a -t 8 chr1.vg > chr1.vcfThe VCF's CHROM column is the -p path name, which has to equal the assembly's
refName. Its sample names are the three-letter codes on each assembly's path,
and the sample table's first column has to match them. A mismatch leaves the row
unlabelled and raises no error:
name breed lineage
ANG Angus taurine
BIS Bison bisonIn grammar-of-graphics terms, rowColor in
the track config is a color scale on each row's label bar, mapping the sample
table's lineage column through domain to range. The config also sets:
rows.sortlists the cattle breeds above the wild species, androws.labelswrites each breed beside its rowunit: "haplotype"draws one row per assembly, each being one haplotype, with a second alternate allele in a separate colorvariantsdraws each call once in a band above the rows, across the reference span it replaces, labelled with its VCF ID (the graph nodes that bound it) and the allele change
Goes in the tracks array of config.json. See Tracks.
{
"type": "VariantTrack",
"trackId": "bovine_pangenome_vcf",
"name": "Bovine super-pangenome variants (12 assemblies)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "VcfTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.vcf.gz",
"samplesTsvLocation": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.samples.tsv"
}
},
"displays": [
{
"type": "LinearMultiSampleVariantDisplay",
"unit": "haplotype",
"variants": { "show": true },
"rows": {
"sort": [
"ANG",
"BSW",
"HIG",
"OBV",
"PIE",
"SIM",
"BRA",
"NEL",
"GAU",
"BIS",
"YAK"
],
"labels": {
"ANG": "Angus",
"BSW": "Brown Swiss",
"HIG": "Highland",
"OBV": "Original Braunvieh",
"PIE": "Piedmontese",
"SIM": "Simmental",
"BRA": "Brahman",
"NEL": "Nellore",
"GAU": "Gaur",
"BIS": "Bison",
"YAK": "Yak"
}
},
"rowColor": {
"field": "lineage",
"scale": {
"domain": ["taurine", "indicine", "gaur", "bison", "yak"],
"range": ["#0072B2", "#E69F00", "#009E73", "#CC79A7", "#D55E00"]
}
}
}
]
}jbrowse add-track-json '{
"type": "VariantTrack",
"trackId": "bovine_pangenome_vcf",
"name": "Bovine super-pangenome variants (12 assemblies)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "VcfTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.vcf.gz",
"samplesTsvLocation": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.samples.tsv"
}
},
"displays": [
{
"type": "LinearMultiSampleVariantDisplay",
"unit": "haplotype",
"variants": { "show": true },
"rows": {
"sort": [
"ANG",
"BSW",
"HIG",
"OBV",
"PIE",
"SIM",
"BRA",
"NEL",
"GAU",
"BIS",
"YAK"
],
"labels": {
"ANG": "Angus",
"BSW": "Brown Swiss",
"HIG": "Highland",
"OBV": "Original Braunvieh",
"PIE": "Piedmontese",
"SIM": "Simmental",
"BRA": "Brahman",
"NEL": "Nellore",
"GAU": "Gaur",
"BIS": "Bison",
"YAK": "Yak"
}
},
"rowColor": {
"field": "lineage",
"scale": {
"domain": ["taurine", "indicine", "gaur", "bison", "yak"],
"range": ["#0072B2", "#E69F00", "#009E73", "#CC79A7", "#D55E00"]
}
}
}
]
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"type": "VariantTrack",
"trackId": "bovine_pangenome_vcf",
"name": "Bovine super-pangenome variants (12 assemblies)",
"assemblyNames": ["bosTau9"],
"adapter": {
"type": "VcfTabixAdapter",
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.vcf.gz",
"samplesTsvLocation": {
"uri": "https://jbrowse.org/demos/bovine_pangenome/bovine-arsucd12-minigraph.samples.tsv"
}
},
"displays": [
{
"type": "LinearMultiSampleVariantDisplay",
"unit": "haplotype",
"variants": { "show": true },
"rows": {
"sort": [
"ANG",
"BSW",
"HIG",
"OBV",
"PIE",
"SIM",
"BRA",
"NEL",
"GAU",
"BIS",
"YAK"
],
"labels": {
"ANG": "Angus",
"BSW": "Brown Swiss",
"HIG": "Highland",
"OBV": "Original Braunvieh",
"PIE": "Piedmontese",
"SIM": "Simmental",
"BRA": "Brahman",
"NEL": "Nellore",
"GAU": "Gaur",
"BIS": "Bison",
"YAK": "Yak"
}
},
"rowColor": {
"field": "lineage",
"scale": {
"domain": ["taurine", "indicine", "gaur", "bison", "yak"],
"range": ["#0072B2", "#E69F00", "#009E73", "#CC79A7", "#D55E00"]
}
}
}
]
}Open this track in JBrowse Web ↗
Needs JBrowse Desktop 5.0 or newer. If nothing opens, copy the link and paste it into Desktop's Open JBrowse Web link..., on the start screen or under File → Session.
https://jbrowse.org/code/jb2/main/?config=https%3A%2F%2Fjbrowse.org%2Fucsc%2FbosTau9%2Fconfig.json&session=spec-%7B%22sessionTracks%22%3A%5B%7B%22type%22%3A%22VariantTrack%22%2C%22trackId%22%3A%22bovine_pangenome_vcf%22%2C%22name%22%3A%22Bovine+super-pangenome+variants+%2812+assemblies%29%22%2C%22assemblyNames%22%3A%5B%22bosTau9%22%5D%2C%22adapter%22%3A%7B%22type%22%3A%22VcfTabixAdapter%22%2C%22uri%22%3A%22https%3A%2F%2Fjbrowse.org%2Fdemos%2Fbovine_pangenome%2Fbovine-arsucd12-minigraph.vcf.gz%22%2C%22samplesTsvLocation%22%3A%7B%22uri%22%3A%22https%3A%2F%2Fjbrowse.org%2Fdemos%2Fbovine_pangenome%2Fbovine-arsucd12-minigraph.samples.tsv%22%7D%7D%2C%22displays%22%3A%5B%7B%22type%22%3A%22LinearMultiSampleVariantDisplay%22%2C%22unit%22%3A%22haplotype%22%2C%22variants%22%3A%7B%22show%22%3Atrue%7D%2C%22rows%22%3A%7B%22sort%22%3A%5B%22ANG%22%2C%22BSW%22%2C%22HIG%22%2C%22OBV%22%2C%22PIE%22%2C%22SIM%22%2C%22BRA%22%2C%22NEL%22%2C%22GAU%22%2C%22BIS%22%2C%22YAK%22%5D%2C%22labels%22%3A%7B%22ANG%22%3A%22Angus%22%2C%22BSW%22%3A%22Brown+Swiss%22%2C%22HIG%22%3A%22Highland%22%2C%22OBV%22%3A%22Original+Braunvieh%22%2C%22PIE%22%3A%22Piedmontese%22%2C%22SIM%22%3A%22Simmental%22%2C%22BRA%22%3A%22Brahman%22%2C%22NEL%22%3A%22Nellore%22%2C%22GAU%22%3A%22Gaur%22%2C%22BIS%22%3A%22Bison%22%2C%22YAK%22%3A%22Yak%22%7D%7D%2C%22rowColor%22%3A%7B%22field%22%3A%22lineage%22%2C%22scale%22%3A%7B%22domain%22%3A%5B%22taurine%22%2C%22indicine%22%2C%22gaur%22%2C%22bison%22%2C%22yak%22%5D%2C%22range%22%3A%5B%22%230072B2%22%2C%22%23E69F00%22%2C%22%23009E73%22%2C%22%23CC79A7%22%2C%22%23D55E00%22%5D%7D%7D%7D%5D%7D%5D%2C%22views%22%3A%5B%7B%22type%22%3A%22LinearGenomeView%22%2C%22assembly%22%3A%22bosTau9%22%2C%22loc%22%3A%22chr23%3A27%2C508%2C000-27%2C536%2C000%22%2C%22tracks%22%3A%5B%22bovine_pangenome_vcf%22%5D%7D%5D%7D&sessionName=JBrowse+docs%3A+Bovine+super-pangenome+variants+%2812+assemblies%29In the chr23 view the portal opened, type chr23:27,508,000-27,536,000 to draw
the graph around HSPA1A. Then:
- Turn on the callset and the allele inventory in the track selector.
- Open Graph settings... in the graph track's menu and set Bubble spread to Compress lengths. An insertion has no reference span to draw along, and the portal opens the graph force-directed, which draws it by its shape.
Published variants in the callset
Each locus below is a structural variant a paper reported in one of these breeds or species. The rows without it are the control.
The Celtic polled allele
Angus cattle are born without horns. Medugorac et al. (2012) traced the Celtic form of polledness to a 202 bp duplication and insertion on chromosome 1, which OMIA, the Online Mendelian Inheritance in Animals database, curates as OMIA 000483-9913.1
The portal page's POLLED example tells this story: it names the Celtic polled allele above the map, and each launch opens a Known alleles row and OMIA's records under the genes. Every launch up to 150 kb wide on the portal carries the OMIA row.
To add OMIA to your own JBrowse,
build_omia_cattle_variants.sh
writes omia_cattle_variants.gff3.gz from OMIA's nightly database dump. It
keeps the cattle records published on ARS-UCD1.2 or ARS-UCD1.3, which share
every chromosome's coordinates:
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/build_omia_cattle_variants.sh
bash build_omia_cattle_variants.shAdd the records as a track:
Goes in the tracks array of config.json. See Tracks.
{
"trackId": "omia_cattle_variants",
"name": "OMIA causal variants (cattle)",
"uri": "omia_cattle_variants.gff3.gz",
"assemblyNames": ["bosTau9"],
"displayDefaults": {
"labels": {
"description": "jexl:feature.inheritance"
}
}
}jbrowse add-track omia_cattle_variants.gff3.gz \
--trackId omia_cattle_variants \
--name "OMIA causal variants (cattle)" \
--assemblyNames bosTau9 \
--displayDefaults '{"labels":{"description":"jexl:feature.inheritance"}}' \
--load copyIn JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add track from pasted JSON, and paste:
{
"trackId": "omia_cattle_variants",
"name": "OMIA causal variants (cattle)",
"uri": "omia_cattle_variants.gff3.gz",
"assemblyNames": ["bosTau9"],
"displayDefaults": {
"labels": {
"description": "jexl:feature.inheritance"
}
}
}omia_cattle_variants.gff3.gz is relative to a config.json. Replace it with its URL or its path on this computer.
Then open chr1:2,428,800-2,429,800. The figure shades
chr1:2,429,109-2,429,320, the stretch OMIA records as duplicated by the
allele.
A repeat upstream of KIT in white-headed cattle
Simmental and Hereford cattle have white heads. Milia et al. (2025) tied the
trait to a 14.3 kb segment repeated in tandem upstream of KIT: white-headed
breeds have extra copies, color-headed breeds a deletion. The Hereford reference
holds one collapsed copy. Open chr6:70,080,000-70,180,000, and put the graph
track back on the reference's coordinates under the callset with Anchored
under the Layout row of its menu.
The larger box at the left of the Simmental row is an insertion the length of the 14.3 kb segment: Simmental has one more copy than the Hereford reference.
A deletion of TAS2R46 in gaur
TAS2R46 encodes a bitter taste receptor. Leonard et al. (2022) found a 17 kb
deletion in gaur that removes it. Open chr5:98,575,000-98,615,000.
Angus, Piedmontese, Brahman and Nellore, two taurine and two indicine breeds, share that allele, and only the gaur's deletes the span. The insertion boxed in each of the four rows, between TAS2R46 and the next gene, is most of the difference.
Building the bovine graph files
Pangenome (hosting your own graph) turns a graph into the files above
with one command, gfa-to-tabix build. The published bovine graphs need three
steps beyond it, which
build_bovine_pangenome.sh
runs:
- Join the autosomes. The archive holds one graph per autosome, each numbering its segments from 1, so the script renumbers and concatenates them.
- Recover rGFA tags. The graphs state their coordinates in P lines, and
gfa_paths_to_rgfa.pyconverts them back intoSN/SO/SRtags (each segment's contig, offset and rank). - Deconstruct the callset with the
vg deconstructcall above.
The script stops if the reference path does not reproduce bosTau9's chromosome lengths, and a README.txt beside the hosted files records the source and every modification.
Leonard et al. also built pggb and Minigraph-Cactus graphs of the same twelve
assemblies, base-level GFAs with path lines and no rGFA tags.
gfa-to-tabix build writes an SM:Z: tag per segment listing the assemblies
that pass through it.
See also
- Tutorial: Pangenome (mouse)
- Tutorial: Pangenome (HPRC) part 1: the graph's alleles and the haplotypes that have them
- Tutorial: Pangenome (hosting your own graph)
Citations
- Leonard et al. (2022). Structural variant-based pangenome construction has low sensitivity to variability of haplotype-resolved bovine assemblies
- Leonard et al. (2023). Graph construction method impacts variation representation and analyses in a bovine super-pangenome
- Li et al. (2020). The design and construction of reference pangenome graphs with minigraph
- Medugorac et al. (2012). Bovine polledness: an autosomal dominant trait with allelic heterogeneity
- Milia et al. (2025). Taurine pangenome uncovers a segmental duplication upstream of KIT associated with depigmentation in white-headed cattle
Notes
-
OMIA also records the Friesian polled allele, a larger duplication further along, which Holstein cattle have. The panel has no Holstein. ↩
Feedback on this tutorial is welcome: contact us.