Pangenome (fly)
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.21. Desktop beta builds for Linux and
macOS are on the releases page;
the Windows build waits on code signing.
The fly pangenome aligns 29 NCBI assemblies of Drosophila melanogaster onto
the dm6 reference with minigraph: the 14 strains of Chakraborty et al. (2019),
the founders of the Drosophila Synthetic Population Resource (DSPR) and
Oregon-R; 11 Bloomington stocks carrying classical visible mutations, which
Samano et al. (2026) assembled to find the structural variants behind them; and
three single-fly PacBio HiFi strains and a Canton S. dm6 is ISO1, itself a
laboratory strain, so where it carries a transposon the strains without one
appear as a deletion. No graph had been published for these assemblies, so we
built one. We:
- at Cyp28d1, read six duplication alleles of one gene in a single bubble
- at Strn-Mlck, find the transposon behind the Curved wing mutant in one Bloomington stock
- at CHKov1, read a resistance allele that the reference carries
- load the graph and its bubbles as tracks on dm6 in your own JBrowse
- build a minigraph graph from the assemblies
The first three start from the fly graph 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 minigraph, to build a graph like this one
# conda
conda install -c bioconda -c conda-forge minigraphThe data
The reference is UCSC's dm6, and the 29 assemblies are NCBI GenBank records, listed with their accessions in the README beside the files.
Nothing to download: the track configs below read the index files by URL. Building the graph builds the files for assemblies of your own.
The files
| What it is | File |
|---|---|
| dm6 (BDGP Release 6) | dm6.fa.gz |
| The graph, as rGFA | fly-dm6-minigraph.rgfa.gz |
| Segments and links, the graph's nodes and edges at their reference coordinates | fly-dm6-minigraph.graph.bed.gz |
| Bubbles, where the assemblies' paths split and rejoin | fly-dm6-minigraph.bubbles.bed.gz |
| The whole-chromosome overview, with variants under 10 kb folded into the reference | fly-dm6-minigraph.fold10000.graph.bed.gz |
The graph holds no path per assembly, so the portal page reads which assemblies
carry each bubble's allele from a separate file, made by mapping each assembly
back onto the graph with minigraph --call.
Cyp28d1: six duplication alleles in one bubble
A nicotine resistance QTL mapped in the DSPR holds two cytochrome P450 genes, Cyp28d1 and Cyp28d2. Chakraborty et al. (2019) found that the founders carry different duplications there: A2 has two copies of a 15 kb segment holding both genes, B1 three, and B4 a 6 kb duplication. A1 has B4's duplication with a transposon inside the second Cyp28d1 copy. The A2 and B4 alleles resist nicotine best and express Cyp28d1 most. dm6 has the single-copy allele.
- Type
chr2L:5,200,000-5,220,000into the portal page's box and press Show, or pick Cyp28d1 from its examples. - Read the map: one bubble over both genes, with a form per allele. BOG1_A2 is 15 kb longer than dm6, BER1_B1 38 kb, RVC3_B4 6.1 kb and Canton-S_A1 11 kb.
- Press Graph to open the bubble in the graph view.
The map also draws alleles the paper did not describe: KSA2 and A4_HiFi 5.3 kb longer, SAM_HiFi 3.3 kb. Two Bloomington stocks share Canton-S_A1's 11 kb form, and CantonS_Yunnan shares BOG1_A2's 15 kb.
Strn-Mlck: the Curved wing mutant
The Curved (c¹) wing mutation was described a century ago and never placed in the genome. Samano et al. (2026) traced it to a 7.5 kb DM412 retrotransposon inside an exon of the muscle gene Strn-Mlck, which truncates its transcript.
- Type
chr2R:15,940,000-15,966,000into the portal page's box and press Show, or pick Strn-Mlck from its examples. - Find the 7.5 kb insertion at
chr2R:15,953,909, carried by BDSC_156 alone.
The window stops short of the gene's PEVK repeats, where almost every assembly
differs from dm6 in copy number, by up to 2.7 kb. Type
chr2R:15,940,000-15,995,000 to see them. The same stock, BDSC_156, carries the
plexus (px¹) wing-vein allele, a 1.5 kb duplication split by a second DM412,
which the portal's plexus example opens.
CHKov1: an allele the reference carries
Aminetzach et al. (2005) found a Doc transposon in the coding sequence of CHKov1 that truncates the protein and raises resistance to an organophosphate insecticide. Magwire et al. (2011) found that the same insertion protects against the sigma virus, and that it is now the commonest form of the gene. dm6 carries the Doc, so the assemblies without it appear as a 4.5 kb deletion.
- Type
chr3R:25,320,000-25,335,000into the portal page's box and press Show, or pick CHKov1 from its examples. - Read the deletion's carriers: Oregon-R, BOG1_A2, three Bloomington stocks and two of the HiFi strains lack the Doc; the other 22 assemblies have it.
The portal's Jheh example reads the same way: dm6 carries Bari-Jheh, a 1.7 kb Bari1 transposon that adds antioxidant response elements upstream of Jheh1 and Jheh2 (Guio et al. 2014), and six assemblies lack it.
Loading the graph in your own JBrowse
The portal's launches load these tracks for you. In your own JBrowse, we'll load
the reference, then the graph and its bubbles. The graph track names the file
prefix gfa-to-tabix build writes, and the uris below are our hosted copy, so
swap the prefix for your own build.
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "dm6",
"uri": "https://hgdownload.soe.ucsc.edu/goldenPath/dm6/bigZips/dm6.2bit",
"refNameAliases": {
"uri": "https://jbrowse.org/ucsc/dm6/dm6.chromAlias.txt"
}
}Edits config.json in the current folder, creating it if there is none. See JBrowse CLI with Desktop.
jbrowse add-assembly https://hgdownload.soe.ucsc.edu/goldenPath/dm6/bigZips/dm6.2bit \
--name dm6 \
--refNameAliases https://jbrowse.org/ucsc/dm6/dm6.chromAlias.txtdm6 is one of the genomes JBrowse Desktop hosts, with gene tracks already set up: on the start screen click Browse hosted genomes and pick it. To load the files of this config instead:
In JBrowse Desktop, Open your own genome on the start screen (or File → Open genome... in a session), then Open from a URL and paste:
https://hgdownload.soe.ucsc.edu/goldenPath/dm6/bigZips/dm6.2bitJBrowse reads the format off the file name. Then fill in:
- Genome name:
dm6 - refName aliases (under More options):
https://jbrowse.org/ucsc/dm6/dm6.chromAlias.txt
Goes in the tracks array of config.json. See Tracks.
{
"type": "GraphTrack",
"trackId": "fly_minigraph_segments",
"name": "Fly pangenome (rGFA segments)",
"assemblyNames": ["dm6"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph",
"format": 2,
"coarse": {
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.fold10000",
"format": 2,
"aboveBpPerPx": 1000
}
},
"displays": [
{ "type": "LinearGraphDisplay" },
{ "type": "LinearBasicDisplay" }
]
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "GraphTrack",
"trackId": "fly_minigraph_segments",
"name": "Fly pangenome (rGFA segments)",
"assemblyNames": ["dm6"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph",
"format": 2,
"coarse": {
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.fold10000",
"format": 2,
"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": "fly_minigraph_segments",
"name": "Fly pangenome (rGFA segments)",
"assemblyNames": ["dm6"],
"adapter": {
"type": "RgfaTabixAdapter",
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph",
"format": 2,
"coarse": {
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.fold10000",
"format": 2,
"aboveBpPerPx": 1000
}
},
"displays": [
{ "type": "LinearGraphDisplay" },
{ "type": "LinearBasicDisplay" }
]
}The bubbles track reads the same build's bubble index:
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "fly_minigraph_bubbles",
"name": "Fly pangenome bubbles",
"assemblyNames": ["dm6"],
"adapter": {
"type": "MinigraphBubbleAdapter",
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.bubbles.bed.gz",
"csi": true
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "fly_minigraph_bubbles",
"name": "Fly pangenome bubbles",
"assemblyNames": ["dm6"],
"adapter": {
"type": "MinigraphBubbleAdapter",
"uri": "https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.bubbles.bed.gz",
"csi": true
}
}'In JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track..., choose Add pangenome graph track, and fill in:
- File type:
Minigraph bubbles (tabix BED) - Path:
https://jbrowse.org/demos/fly_pangenome/fly-dm6-minigraph.bubbles.bed.gz - Track name:
Fly pangenome bubbles - Assembly:
dm6
Building the fly graph
The fly genome is small enough for one minigraph run over every chromosome at
once, reference first so that its segments take rank 0, the earliest build
order:
# -xggs: incremental graph construction, adding each genome in turn
# -c: base-level alignment, which minigraph recommends for graph generation
minigraph -cxggs -t 8 dm6.fa KSA2.fa QI2.fa ... CantonS_Yunnan.fa > fly.gfaPangenome (hosting your own graph) then turns the graph into the files
above with one command, gfa-to-tabix build.
build_fly_pangenome.sh
runs the whole build on Linux, since it needs GNU tools. It downloads the 30
assemblies from NCBI with the datasets CLI and took 19 hours of minigraph
time on 8 threads. It:
- downloads each assembly with its sequence report
- keeps each assembly's chromosomes, renamed to PanSN
(
sample#haplotype#contig) from the report, and drops unplaced scaffolds - runs
minigraphover all of them - writes the index files
Three assemblies hold chromosome 3 as one sequence where dm6 has the arms 3L and
3R; the script keeps it whole, and minigraph aligns it to both arms. The
script stops if:
- a segment has an
SNtag that names no kept chromosome - a segment id repeats
- the rank-0 segments are not dm6's eight chromosomes at their full length
A graph that fails any of these has wrong coordinates that every later check accepts, so copy these audits into your own build.
See also
- Tutorial: Pangenome (mouse)
- Tutorial: Pangenome (rice)
- Tutorial: Pangenome (hosting your own graph)
Citations
- Li et al. (2020). The design and construction of reference pangenome graphs with minigraph
- Chakraborty et al. (2019). Structural variants exhibit widespread allelic heterogeneity and shape variation in complex traits
- Samano et al. (2026). Structural variants are enriched in deleterious visible phenotypes in Drosophila
- Aminetzach et al. (2005). Pesticide resistance via transposition-mediated adaptive gene truncation in Drosophila
- Magwire et al. (2011). Successive increases in the resistance of Drosophila to viral infection through a transposon insertion followed by a Duplication
- Guio et al. (2014). The transposable element Bari-Jheh mediates oxidative stress response in Drosophila
Feedback on this tutorial is welcome: contact us.