Rearrangements between genomes by type (SyRI)
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.9. Desktop beta builds are coming soon.
The Columbia and Landsberg accessions of Arabidopsis thaliana differ by an inversion of more than a megabase on the short arm of chromosome 4, first seen under the microscope and later confirmed by assembling Landsberg. We find it again by aligning six assembled accessions and running SyRI, which sorts what an alignment contains into syntenic, inverted, translocated and duplicated regions. Each accession is compared with Columbia and with the accession above it, and every comparison goes into one file whose ribbons take their color from SyRI's type: the stack plotsr draws, and the same accessions as lanes under Columbia's own coordinates, with every region open to zooming and clicking.
Prerequisites
minimap2andsamtools- SyRI (
syri), from bioconda, or Docker, which runs its biocontainers image - The NCBI
datasetsCLI, to fetch the assemblies python3,bgzipandtabix- A running JBrowse instance (the web quickstart or the desktop quickstart)
Where the data comes from
TAIR10 for Columbia, and the chromosome-level assemblies of five more accessions from Jiao and Schneeberger 2020, the first three the ones plotsr's own figure stacks.
- Col-0, GCF_000001735.4: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/000/001/735/GCF_000001735.4_TAIR10.1/
- Ler, GCA_902460285.1: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/902/460/285/GCA_902460285.1_Arabidopsis_thaliana_Ler/
- Cvi-0, GCA_902460275.1: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/902/460/275/GCA_902460275.1_Arabidopsis_thaliana_Cvi-0/
- Eri-1, GCA_902460315.1: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/902/460/315/GCA_902460315.1_Arabidopsis_thaliana_Eri-1/
- Kyo, GCA_902460305.1: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/902/460/305/GCA_902460305.1_Arabidopsis_thaliana_Kyo/
- Sha, GCA_902460295.1: https://ftp.ncbi.nlm.nih.gov/genomes/all/GCA/902/460/295/GCA_902460295.1_Arabidopsis_thaliana_Sha/
Aligning a pair and running SyRI
SyRI reads a whole-genome alignment of two chromosome-level assemblies whose
homologous chromosomes share a name. The script
keeps each assembly's five nuclear chromosomes and names them Chr1 to Chr5.
Each accession is aligned to Col-0, and to the accession above it in the stack:
# asm5 is the preset for genomes of one species
# --eqx writes = and X in the CIGAR, which SyRI reads the mismatches from
minimap2 -cx asm5 --eqx Col-0.fa Ler.fa >Col-0_Ler.aln.paf
# -F P says the alignment is PAF
# --nc runs that many chromosomes at once
syri -c Col-0_Ler.aln.paf -r Col-0.fa -q Ler.fa -F P --prefix Col-0_Ler. --nc 5Col-0_Ler.syri.out holds one row per annotation. The structural regions are
the rows with no parent: SYN, INV, TRANS, INVTR, DUP and INVDP, each
with its interval on both genomes.
SyRI's regions as one PAF
A SyRI region is an interval on each of two genomes, the same shape as a PAF
alignment record.
syri_to_paf.py
writes each region as one, naming sequences <genome>#1#<chrom> so records from
many pairs can share a file, with the inverted types on the minus strand and two
tags: syri, the type, and color, that type's color in plotsr's palette. It
reads each sequence's length from a .chrom.sizes file beside syri.out, the
first two columns of the FASTA's index. Concatenating every pair's records gives
one file for every view below:
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/syri_to_paf.py
for name in Col-0 Ler; do
samtools faidx $name.fa
cut -f1,2 $name.fa.fai >$name.chrom.sizes
done
python3 syri_to_paf.py Col-0_Ler.syri.out --reference Col-0 --query Ler
cat Col-0_*.paf Ler_Cvi.paf Cvi_Eri.paf Eri_Kyo.paf Kyo_Sha.paf >syri_pangenome.pafThe ribbons need no sequence, so each accession is an assembly of those
chromosome lengths alone, a ChromSizesAdapter over its .chrom.sizes. On the
track:
attributeColumnsnames the tags the palette button offers:syribecomes a color-by mode, andcoloris the color the file puts beside each type- The
MultiWaySyntenyDisplayentry sets up the lanes view:domainnames the lanes andribbonColorcolors the bands bysyri
Goes in the tracks array of config.json. See Tracks.
{
"type": "SyntenyTrack",
"trackId": "syri_pangenome",
"name": "SyRI regions",
"assemblyNames": ["Col-0", "Ler", "Cvi", "Eri", "Kyo", "Sha"],
"adapter": {
"type": "MultiGenomePAFAdapter",
"uri": "syri_pangenome.paf",
"attributeColumns": ["syri", "color"]
},
"displays": [
{
"type": "MultiWaySyntenyDisplay",
"displayId": "syri_pangenome-MultiWaySyntenyDisplay",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"],
"ribbonColor": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
}
}
]
}jbrowse add-track-json '{
"type": "SyntenyTrack",
"trackId": "syri_pangenome",
"name": "SyRI regions",
"assemblyNames": ["Col-0", "Ler", "Cvi", "Eri", "Kyo", "Sha"],
"adapter": {
"type": "MultiGenomePAFAdapter",
"uri": "syri_pangenome.paf",
"attributeColumns": ["syri", "color"]
},
"displays": [
{
"type": "MultiWaySyntenyDisplay",
"displayId": "syri_pangenome-MultiWaySyntenyDisplay",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"],
"ribbonColor": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
}
}
]
}'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": "SyntenyTrack",
"trackId": "syri_pangenome",
"name": "SyRI regions",
"assemblyNames": ["Col-0", "Ler", "Cvi", "Eri", "Kyo", "Sha"],
"adapter": {
"type": "MultiGenomePAFAdapter",
"uri": "syri_pangenome.paf",
"attributeColumns": ["syri", "color"]
},
"displays": [
{
"type": "MultiWaySyntenyDisplay",
"displayId": "syri_pangenome-MultiWaySyntenyDisplay",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"],
"ribbonColor": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
}
}
]
}syri_pangenome.paf is relative to a config.json. Replace it with its URL or its path on this computer.
That shows it in the linear view. For the synteny view, open Add → Linear synteny view, pick the track under Quick start, and click Launch.
Columbia against Landsberg on chromosome 4
Open the first 6 Mb of chromosome 4 in both accessions and pick syri under Color by value on the palette button in the view header:
Goes at the top level of config.json, replacing any defaultSession there. See Default session.
{
"defaultSession": {
"name": "Col-0 vs Ler, chromosome 4",
"views": [
{
"type": "LinearSyntenyView",
"views": [
{ "assembly": "Col-0", "loc": "Chr4:1-6,000,000" },
{ "assembly": "Ler", "loc": "Chr4:1-6,000,000" }
],
"tracks": [["syri_pangenome"]],
"color": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
},
"drawCurves": true,
"alpha": 0.9,
"fadeThinAlignmentsMode": "off",
"collapseEmptyRows": true,
"levelHeights": [260]
}
]
}
}jbrowse set-default-session --session - << 'EOF'
{
"name": "Col-0 vs Ler, chromosome 4",
"views": [
{
"type": "LinearSyntenyView",
"views": [
{ "assembly": "Col-0", "loc": "Chr4:1-6,000,000" },
{ "assembly": "Ler", "loc": "Chr4:1-6,000,000" }
],
"tracks": [["syri_pangenome"]],
"color": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
},
"drawCurves": true,
"alpha": 0.9,
"fadeThinAlignmentsMode": "off",
"collapseEmptyRows": true,
"levelHeights": [260]
}
]
}
EOFThe syntenic regions run straight down in grey, and one inverted region crosses
over between them. The thin ribbons leaving the frame are duplications and
translocations whose other end sits on another chromosome, which the label at
the frame's edge names. The domain lists the types in plotsr's order, and the
key has one row per color: plotsr paints an inverted translocation as a
translocation and an inverted duplication as a duplication, so INVTR shares a
row with TRANS and INVDP with DUP.
Six accessions
The same track stacks all six, each band drawing the SyRI run between the two genomes it joins:
Goes at the top level of config.json, replacing any defaultSession there. See Default session.
{
"defaultSession": {
"name": "Six Arabidopsis accessions, SyRI regions",
"views": [
{
"type": "LinearSyntenyView",
"views": [
{ "assembly": "Col-0" },
{ "assembly": "Ler" },
{ "assembly": "Cvi" },
{ "assembly": "Eri" },
{ "assembly": "Kyo" },
{ "assembly": "Sha" }
],
"tracks": [
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"]
],
"color": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
},
"drawCurves": true,
"alpha": 0.9,
"fadeThinAlignmentsMode": "off",
"collapseEmptyRows": true,
"levelHeights": [150, 150, 150, 150, 150]
}
]
}
}jbrowse set-default-session --session - << 'EOF'
{
"name": "Six Arabidopsis accessions, SyRI regions",
"views": [
{
"type": "LinearSyntenyView",
"views": [
{ "assembly": "Col-0" },
{ "assembly": "Ler" },
{ "assembly": "Cvi" },
{ "assembly": "Eri" },
{ "assembly": "Kyo" },
{ "assembly": "Sha" }
],
"tracks": [
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"],
["syri_pangenome"]
],
"color": {
"field": "syri",
"domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"]
},
"drawCurves": true,
"alpha": 0.9,
"fadeThinAlignmentsMode": "off",
"collapseEmptyRows": true,
"levelHeights": [150, 150, 150, 150, 150]
}
]
}
EOFEvery accession in Columbia's coordinates
The stack answers how each accession differs from its neighbour. A reader
annotating Col-0 wants each accession's difference from Col-0, in Col-0's
coordinates. syri_to_paf.py also writes each pair's regions on the reference
alone, one BED row per region, named by its type, colored by itemRgb and
carrying the accession's name in a query column. The rows against Col-0
concatenate into one track:
{
head -n1 Col-0_Ler.regions.bed
for name in Ler Cvi Eri Kyo Sha; do
tail -n +2 Col-0_$name.regions.bed
done | sort -k1,1 -k2,2n
} | bgzip >syri_regions.bed.gz
tabix -p bed syri_regions.bed.gzrows.field gives the track one row per accession:
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "syri_regions_on_Col-0",
"name": "SyRI regions on Col-0, by accession",
"assemblyNames": ["Col-0"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "syri_regions.bed.gz",
"disableGeneHeuristic": true
},
"displays": [
{
"type": "LinearMultiRowFeatureDisplay",
"displayId": "syri_regions_on_Col-0-LinearMultiRowFeatureDisplay",
"rows": {
"field": "query",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"]
},
"color": { "domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"] }
}
]
}jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "syri_regions_on_Col-0",
"name": "SyRI regions on Col-0, by accession",
"assemblyNames": ["Col-0"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "syri_regions.bed.gz",
"disableGeneHeuristic": true
},
"displays": [
{
"type": "LinearMultiRowFeatureDisplay",
"displayId": "syri_regions_on_Col-0-LinearMultiRowFeatureDisplay",
"rows": {
"field": "query",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"]
},
"color": { "domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"] }
}
]
}'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": "FeatureTrack",
"trackId": "syri_regions_on_Col-0",
"name": "SyRI regions on Col-0, by accession",
"assemblyNames": ["Col-0"],
"adapter": {
"type": "BedTabixAdapter",
"uri": "syri_regions.bed.gz",
"disableGeneHeuristic": true
},
"displays": [
{
"type": "LinearMultiRowFeatureDisplay",
"displayId": "syri_regions_on_Col-0-LinearMultiRowFeatureDisplay",
"rows": {
"field": "query",
"domain": ["Ler", "Cvi", "Eri", "Kyo", "Sha"]
},
"color": { "domain": ["SYN", "INV", "TRANS", "INVTR", "DUP", "INVDP"] }
}
]
}syri_regions.bed.gz is relative to a config.json. Replace it with its URL or its path on this computer.
Open a linear genome view on Col-0 at Chr4:1-6,000,000 and turn the track on.
Turn on SyRI regions under it and switch it to Display types → Multi-way
synteny display, which takes its lanes and colors from the track's display
entry above:
- Each accession is a lane drawn in its own coordinates, placed by its SyRI run against Col-0
- The band between two lanes comes from the run between those two accessions, so it carries the type SyRI gave that pair
Goes at the top level of config.json, replacing any defaultSession there. See Default session.
{
"defaultSession": {
"name": "Six accessions in Col-0's coordinates",
"views": [
{
"type": "LinearGenomeView",
"assembly": "Col-0",
"loc": "Chr4:1-6,000,000",
"tracks": [
{
"trackId": "syri_regions_on_Col-0",
"type": "LinearMultiRowFeatureDisplay",
"height": 110
},
{
"trackId": "syri_pangenome",
"type": "MultiWaySyntenyDisplay",
"height": 640
}
]
}
]
}
}jbrowse set-default-session --session - << 'EOF'
{
"name": "Six accessions in Col-0's coordinates",
"views": [
{
"type": "LinearGenomeView",
"assembly": "Col-0",
"loc": "Chr4:1-6,000,000",
"tracks": [
{
"trackId": "syri_regions_on_Col-0",
"type": "LinearMultiRowFeatureDisplay",
"height": 110
},
{
"trackId": "syri_pangenome",
"type": "MultiWaySyntenyDisplay",
"height": 640
}
]
}
]
}
EOFTwenty-six accessions against TAIR10
Every one of the five accessions is inverted against Col-0 over the same stretch, which raises the question of which arrangement is the common one. The 1001 Genomes Plus project assembled accessions from across the species' range (Igolkina et al. 2025), and the same pipeline runs on 26 of them against TAIR10. The result is hosted with each accession's genes, transposons and methylation from the 1001 Genomes data centre. Open it over the chromosome 4 inversion with the SyRI rows, ordered by admixture group:
Goes at the top level of config.json, replacing any defaultSession there. See Default session.
{
"defaultSession": {
"name": "26 accessions against TAIR10, chromosome 4",
"views": [
{
"type": "LinearGenomeView",
"assembly": "TAIR10",
"loc": "Chr4:1-4,000,000",
"tracks": [
{
"trackId": "syri_regions_on_TAIR10",
"type": "LinearMultiRowFeatureDisplay",
"height": 644
}
]
}
]
}
}jbrowse set-default-session --session - << 'EOF'
{
"name": "26 accessions against TAIR10, chromosome 4",
"views": [
{
"type": "LinearGenomeView",
"assembly": "TAIR10",
"loc": "Chr4:1-4,000,000",
"tracks": [
{
"trackId": "syri_regions_on_TAIR10",
"type": "LinearMultiRowFeatureDisplay",
"height": 644
}
]
}
]
}
EOFThe hosted demo also carries the 1135-accession Fst scan, the 1001 Genomes SNPs
and a minigraph pangenome of the same genomes, all built by
build_arabidopsis_pangenome.sh.
Pangenome (hosting your own graph) turns a graph of your own into the
files the pangenome's tracks read.
Check it against syri.out
The largest inverted region of the Col-0 and Ler run, straight from SyRI's table:
awk -F'\t' '$11=="INV" {print $3-$2+1, $1, $2, $3}' Col-0_Ler.syri.out | sort -nr | head -1It is 1,170,016 bp on Chr4, from 1,612,606 to 2,782,621, the interval the
crossed ribbon spans and the orange block on the Ler row.
Reproduce it end to end
The script fetches the six assemblies, runs SyRI on each accession against Col-0 and against the one above it, converts each table and writes the config; see Prerequisites.
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/build_syri_synteny.sh
bash build_syri_synteny.shFor genomes of your own, pass a rows file after the output directory:
- One
<name> [accession]line per genome, in stack order, the reference first - A chromosome-level
<name>.fain the output directory is used as it is, so a row that has one needs no accession - Homologous chromosomes are spelled alike in every FASTA, since SyRI pairs them by name
bash build_syri_synteny.sh my_syri rows.txtSee also
- Synteny visualization (pairwise minimap2)
- Synteny visualization (all-vs-all minimap2)
- Synteny from an ortholog table (grape, peach, cacao)
- Synteny by ancestral linkage group (sponge, comb jelly, jellyfish)
- Comparing one genome's two haplotypes (T2T-HG002)
- A grammar of graphics over a BED (RepeatMasker Alu age)
References
- Goel M, Sun H, Jiao WB, Schneeberger K. SyRI: finding genomic rearrangements and local sequence differences from whole-genome assemblies. Genome Biol (2019). https://doi.org/10.1186/s13059-019-1911-0
- Goel M, Schneeberger K. plotsr: visualizing structural similarities and rearrangements between multiple genomes. Bioinformatics (2022). https://doi.org/10.1093/bioinformatics/btac196
- Jiao WB, Schneeberger K. Chromosome-level assemblies of multiple Arabidopsis genomes reveal hotspots of rearrangements with altered evolutionary dynamics. Nat Commun (2020). https://doi.org/10.1038/s41467-020-14779-y
- Igolkina AA, et al. A comparison of 27 Arabidopsis thaliana genomes and the path toward an unbiased characterization of genetic polymorphism. Nat Genet (2025). https://doi.org/10.1038/s41588-025-02293-0
- Zapata L, et al. Chromosome-level assembly of Arabidopsis thaliana Ler reveals the extent of translocation and inversion polymorphisms. PNAS (2016). https://doi.org/10.1073/pnas.1607532113
- Fransz PF, et al. Integrated cytogenetic map of chromosome arm 4S of A. thaliana: structural organization of heterochromatic knob and centromere region. Cell (2000). https://doi.org/10.1016/S0092-8674(00)80670-5
Feedback on this tutorial is welcome: contact us.