# Synteny on a circle (human and mouse)

:::caution JBrowse v5 beta

The tutorials target the JBrowse v5 beta, and the v4.3.0 release
on the [download page](https://jbrowse.org/jb2/download/) 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](https://github.com/GMOD/jbrowse-components/releases);
the Windows build waits on code signing.

:::

We lay the human and mouse chromosomes around one circle and draw UCSC's
hg38-to-mm39 liftOver chain as ribbons between them, so one picture shows where
the autosomes have been shuffled and where the X has not. We:

- declare both assemblies and load the chain as an indexed alignment track
- open both on a circular view and order the mouse arc to follow the human one
- color the ribbons by strand
- add a gene density ring over both genomes
- hover a ribbon for its span in each genome

## Prerequisites

- a JBrowse to open the files in ([Web](https://jbrowse.org/jb2/docs/quickstart_web) or
  [Desktop](https://jbrowse.org/jb2/docs/quickstart_desktop))
- to build the density ring for another pair of genomes, htslib (`bgzip`,
  `tabix`), `bedGraphToBigWig` from the
  [UCSC utilities](https://hgdownload.soe.ucsc.edu/admin/exe/), and `node` for
  the [JBrowse CLI](https://jbrowse.org/jb2/docs/cli)

<!-- BEGIN GENERATED TUTORIAL_INSTALL htslib,node,jbrowse-cli,bedGraphToBigWig -->

```bash
# Debian/Ubuntu
sudo apt install tabix nodejs
# or conda, which has every tool above
conda install -c bioconda -c conda-forge htslib nodejs ucsc-bedgraphtobigwig
# or Linux x86_64 binaries for the tools apt lacks
wget -P ~/.local/bin \
  https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/bedGraphToBigWig
chmod +x ~/.local/bin/bedGraphToBigWig
# any platform
npm install -g @jbrowse/cli@next
```

<!-- END GENERATED TUTORIAL_INSTALL htslib,node,jbrowse-cli,bedGraphToBigWig -->

## The data

UCSC's hg38-to-mm39 liftOver chain (Kent et al. 2003), the RefSeq curated gene
sets of both genomes from genomes.jbrowse.org's copies of the UCSC hubs, and the
density bigWig the build script makes of them.

You don't need these files to follow the page: the track configs below read the
hosted results. The [build script](#reproduce-it-end-to-end) fetches them to
rebuild those results. The last section, Your own pair of genomes, lists what a
pair of your own needs.

| What it is                 | File                                                                               |
| -------------------------- | ---------------------------------------------------------------------------------- |
| RefSeq curated genes, hg38 | [ncbiRefSeqCurated.gff.gz](https://jbrowse.org/ucsc/hg38/ncbiRefSeqCurated.gff.gz) |
| RefSeq curated genes, mm39 | [ncbiRefSeqCurated.gff.gz](https://jbrowse.org/ucsc/mm39/ncbiRefSeqCurated.gff.gz) |

<details>
<summary>Read by URL (no download needed)</summary>

| What it is | File                                                                                                          |
| ---------- | ------------------------------------------------------------------------------------------------------------- |
| The chain  | [hg38ToMm39.over.chain.gz](https://hgdownload.soe.ucsc.edu/goldenPath/hg38/liftOver/hg38ToMm39.over.chain.gz) |

</details>

## Declaring the human and mouse assemblies

The ribbons join chromosomes of the two genomes, so the circle needs both
genomes declared. Each alias table is the hub's with the build's genome-prefixed
names added, so `1`, `chr1` and `hg38.chr1` in a track all resolve to `chr1`:

```json
{
  "name": "hg38",
  "uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz",
  "refNameAliases": {
    "uri": "https://jbrowse.org/demos/circular_synteny/hg38.chromAlias.txt"
  },
  "cytobands": "https://jbrowse.org/genomes/GRCh38/cytoBand.txt"
}
```

CLI:

```bash
jbrowse add-assembly https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz \
  --name hg38 \
  --refNameAliases https://jbrowse.org/demos/circular_synteny/hg38.chromAlias.txt \
  --config '{"cytobands":"https://jbrowse.org/genomes/GRCh38/cytoBand.txt"}'
```

```json
{
  "name": "mm39",
  "uri": "https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.2bit",
  "refNameAliases": {
    "uri": "https://jbrowse.org/demos/circular_synteny/mm39.chromAlias.txt"
  }
}
```

CLI:

```bash
jbrowse add-assembly https://hgdownload.soe.ucsc.edu/goldenPath/mm39/bigZips/mm39.2bit \
  --name mm39 \
  --refNameAliases https://jbrowse.org/demos/circular_synteny/mm39.chromAlias.txt
```

## The chain as an indexed alignment

jbrowse.org keeps every liftOver chain UCSC publishes as an indexed PAF, one row
per chain, the same files the
[vertebrates tutorial](https://jbrowse.org/jb2/docs/tutorials/hg38_vertebrates_synteny) stacks under a
locus. The track names that file and its two assemblies, query first. A chain's
query is the genome it lifts to, so for hg38ToMm39 that is mouse:

```json
{
  "type": "SyntenyTrack",
  "trackId": "hg38ToMm39_liftover",
  "name": "hg38 to mm39 liftOver chain",
  "assemblyNames": ["mm39", "hg38"],
  "adapter": {
    "type": "PairwiseIndexedPAFAdapter",
    "uri": "https://jbrowse.org/ucsc/hg38/liftOver/hg38ToMm39.over.pif.gz",
    "csi": true,
    "assemblyNames": ["mm39", "hg38"]
  }
}
```

CLI:

```bash
jbrowse add-track-json '{
  "type": "SyntenyTrack",
  "trackId": "hg38ToMm39_liftover",
  "name": "hg38 to mm39 liftOver chain",
  "assemblyNames": ["mm39", "hg38"],
  "adapter": {
    "type": "PairwiseIndexedPAFAdapter",
    "uri": "https://jbrowse.org/ucsc/hg38/liftOver/hg38ToMm39.over.pif.gz",
    "csi": true,
    "assemblyNames": ["mm39", "hg38"]
  }
}'
```

For your own pair, convert the alignment to a PIF, JBrowse's indexed PAF. A
chain goes through [chain2paf](https://github.com/AndreaGuarracino/chain2paf),
which reads it uncompressed; a PAF from minimap2 or wfmash goes straight in.
Then add the track with `assemblyNames` as `query,target`:

```bash
gzip -dc pair.over.chain.gz > pair.over.chain
chain2paf -i pair.over.chain > pair.paf
jbrowse make-pif pair.paf
jbrowse add-track pair.pif.gz -a query,target --load copy
```

A liftOver chain set holds long chains that cover the genome and many short
ones, mostly repeats and gene copies. **Min length** in the view's menu drops
the short ones, and the sessions below set it to 100 kb with a `length`
predicate in `filter`.

## Opening both genomes on one circle

**Add → Circular view** opens the import form, whose Quick start builds the
circle once you pick the chain track. As a session, two keys on the view set it
up:

- **`assembly` takes a list**, and the view lays out each assembly's chromosomes
  in turn: hg38 on the first arc of the circle, mm39 on the next, with ribbons
  crossing between them.
- **`displayedRegionNames` matches against each assembly** separately, so one
  list of chromosome names keeps both genomes' unplaced contigs off the circle.

```json
{
  "defaultSession": {
    "name": "hg38 and mm39 on one circle",
    "views": [
      {
        "type": "CircularView",
        "assembly": ["hg38", "mm39"],
        "filter": [{ "field": "length", "gte": 100000 }],
        "displayedRegionNames": [
          "chr1",
          "chr2",
          "chr3",
          "chr4",
          "chr5",
          "chr6",
          "chr7",
          "chr8",
          "chr9",
          "chr10",
          "chr11",
          "chr12",
          "chr13",
          "chr14",
          "chr15",
          "chr16",
          "chr17",
          "chr18",
          "chr19",
          "chrX"
        ],
        "height": 780,
        "tracks": ["hg38ToMm39_liftover"]
      }
    ]
  }
}
```

CLI:

```bash
jbrowse set-default-session --session - << 'EOF'
{
  "name": "hg38 and mm39 on one circle",
  "views": [
    {
      "type": "CircularView",
      "assembly": ["hg38", "mm39"],
      "filter": [{ "field": "length", "gte": 100000 }],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "tracks": ["hg38ToMm39_liftover"]
    }
  ]
}
EOF
```

Opens on config <https://jbrowse.org/demos/circular_synteny/config.json>

The human and mouse assemblies name their chromosomes alike, so the arcs have
the same labels. To read the circle:

- Human chromosomes run clockwise from the top and mouse chromosomes follow; the
  title bar names the two in that order.
- Each ribbon has the ideogram color of the human chromosome it leaves, so a
  human chromosome's pieces can be followed to every mouse chromosome that holds
  one.
- A reverse alignment twists between its two ends.
- A row narrower than a pixel is drawn at the share of the pixel it covers, as
  in the [linear synteny view](https://jbrowse.org/jb2/docs/user_guides/linear_synteny_view), so large
  blocks dominate and short rows stay faint.

<Figure src="/img/circular_synteny/ribbons.png" caption="Human and mouse chromosomes around the circle, every liftOver row of 100 kb and over as a ribbon in the color of its human chromosome." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        "hg38ToMm39_liftover"
      ]
    }
  ]
}
```

## Ordering the mouse arc to follow human

In native contig order, a mouse chromosome sits wherever its number falls, so
ribbons cross the middle of the circle to reach their human partners. On open,
the circle reorders the mouse arc as the
[linear synteny view](https://jbrowse.org/jb2/docs/user_guides/linear_synteny_view) and the
[dotplot](https://jbrowse.org/jb2/docs/user_guides/dotplot_view) do, placing each mouse chromosome next
to the human chromosome it shares the most aligned bases with.

- The circle draws the mouse arc mirrored, so a mouse chromosome running the
  same way as its human partner faces it and their ribbons run straight across.
- A mouse chromosome running antiparallel is flipped whole, so a twist left in
  the figure is an inversion inside a chromosome.
- **Re-order chromosomes** in the view's menu reruns the reorder, and
  `"autoDiagonalize": false` on the view keeps each genome in its native contig
  order.

## Mouse ideograms painted by human chromosome

Each stretch of a mouse chromosome's ideogram is painted the color of the human
chromosome aligned to it, and grey where nothing is. A mouse chromosome that
aligns to one human chromosome is one color, and one that aligns to several is
striped with them.

Hover the mouse chr11 band on the circle opened above to dim every ribbon that
misses it. The tooltip lists each human chromosome aligned to it with the share
it covers.

<Figure src="/img/circular_synteny/band_hover.png" caption="Hovering mouse chr11 dims every ribbon that does not touch it, and the tooltip lists the human chromosomes aligned to it." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        "hg38ToMm39_liftover"
      ]
    }
  ]
}
```

## Coloring the ribbons by strand

The chromosome colors show where each piece went, and strand shows which way
round it lies. In [grammar-of-graphics](https://jbrowse.org/jb2/docs/config_guides/mark_display) terms,
the view's `encoding.color` is a color scale, a `field` mapped to colors. The
circle opens on `"field": "query"`, which colors by the first genome's
chromosomes, human here. To color by strand instead:

- **Color by → Strand** in the view's menu paints the reverse alignments a
  second color, and **Show legend** names the two.
- In a session, set `"encoding": { "color": "strand" }` on the view.

<Figure src="/img/circular_synteny/color_by_strand.png" caption="The human and mouse circle colored by strand." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        "hg38ToMm39_liftover"
      ],
      "encoding": {
        "color": "strand"
      },
      "legend": {
        "show": true
      }
    }
  ]
}
```

## Gene density as a ring

A track that draws in the linear genome view also draws on the circle, as a ring
inside the ideogram, so asking whether the conserved blocks are the gene-rich
stretches takes one more track. `jbrowse make-density` counts a GFF3's top-level
features per bin into a bigWig, so a gene is one count however many transcripts
it has.

For one genome, `make-density` takes the GFF3 and its chrom.sizes directly:

```bash
jbrowse make-density genes.gff.gz --chrom-sizes genome.chrom.sizes --bin 100000
```

A ring on a two-genome circle comes from one track naming both assemblies, so
both genomes' densities go into one bigWig.

<!-- from: scripts/build_circular_synteny.sh -->

```bash
# one chrom.sizes and one GFF3 for the pair, every contig prefixed by genome
for g in hg38 mm39; do
  awk -v g="$g" -F'\t' -v OFS='\t' '{print g "." $1, $2}' "$g.chrom.sizes" >> hg38ToMm39.chrom.sizes
  gzip -dc "$g.genes.gff.gz" | awk -v g="$g" -F'\t' -v OFS='\t' '/^#/ {next} {$1 = g "." $1; print}' >> hg38ToMm39.genes.gff
  # the hub's alias table, plus the prefixed name as one more alias per row
  awk -v g="$g" -F'\t' -v OFS='\t' '/^#/ {print; next} {print $0, g "." $1}' "$g.hub.chromAlias.txt" > "$g.chromAlias.txt"
done
bgzip -f hg38ToMm39.genes.gff
# a whole-genome ring is megabases per pixel, so the bin is 100 kb
jbrowse make-density hg38ToMm39.genes.gff.gz --chrom-sizes hg38ToMm39.chrom.sizes --bin 100000
```

The track names both assemblies. Its display defaults draw a heatmap strip whose
color is the average over each pixel's bins. `mark` is the shape drawn, and
`encoding.color` is a `linear` color scale mapping the score across a
`scale.range` from white at the fewest genes in view to orange at the most:

```json
{
  "trackId": "hg38ToMm39_gene_density",
  "name": "Genes per 100 kb",
  "uri": "https://jbrowse.org/demos/circular_synteny/hg38ToMm39.genes.gff.density.bw",
  "assemblyNames": ["hg38", "mm39"],
  "displayDefaults": {
    "mark": "rect",
    "encoding": {
      "color": {
        "scale": { "type": "linear", "range": ["#ffffff", "#d95f02"] }
      }
    },
    "height": 40
  }
}
```

CLI:

```bash
jbrowse add-track https://jbrowse.org/demos/circular_synteny/hg38ToMm39.genes.gff.density.bw \
  --trackId hg38ToMm39_gene_density \
  --name "Genes per 100 kb" \
  --assemblyNames hg38,mm39 \
  --displayDefaults '{"mark":"rect","encoding":{"color":{"scale":{"type":"linear","range":["#ffffff","#d95f02"]}}},"height":40}'
```

**Edit colors/arrangement... → Edit plot...** in the track menu changes the
ramp's colors.

Rings stack inward from the ideogram in the order the view's `tracks` lists
them, and the ribbons draw inside the innermost ring, so the density entry goes
before the synteny track:

```json
{
  "defaultSession": {
    "name": "hg38 and mm39 with a gene density ring",
    "views": [
      {
        "type": "CircularView",
        "assembly": ["hg38", "mm39"],
        "filter": [{ "field": "length", "gte": 100000 }],
        "displayedRegionNames": [
          "chr1",
          "chr2",
          "chr3",
          "chr4",
          "chr5",
          "chr6",
          "chr7",
          "chr8",
          "chr9",
          "chr10",
          "chr11",
          "chr12",
          "chr13",
          "chr14",
          "chr15",
          "chr16",
          "chr17",
          "chr18",
          "chr19",
          "chrX"
        ],
        "height": 780,
        "tracks": [
          {
            "trackId": "hg38ToMm39_gene_density",
            "type": "LinearWiggleDisplay",
            "mark": "rect",
            "encoding": {
              "color": {
                "scale": { "type": "linear", "range": ["#ffffff", "#d95f02"] }
              }
            },
            "height": 40
          },
          "hg38ToMm39_liftover"
        ]
      }
    ]
  }
}
```

CLI:

```bash
jbrowse set-default-session --session - << 'EOF'
{
  "name": "hg38 and mm39 with a gene density ring",
  "views": [
    {
      "type": "CircularView",
      "assembly": ["hg38", "mm39"],
      "filter": [{ "field": "length", "gte": 100000 }],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "tracks": [
        {
          "trackId": "hg38ToMm39_gene_density",
          "type": "LinearWiggleDisplay",
          "mark": "rect",
          "encoding": {
            "color": {
              "scale": { "type": "linear", "range": ["#ffffff", "#d95f02"] }
            }
          },
          "height": 40
        },
        "hg38ToMm39_liftover"
      ]
    }
  ]
}
EOF
```

Opens on config <https://jbrowse.org/demos/circular_synteny/config.json>

<Figure src="/img/circular_synteny/rings.png" caption="The human and mouse circle with a gene density ring inside the ideogram, dark where a stretch is gene-rich." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chr3",
        "chr4",
        "chr5",
        "chr6",
        "chr7",
        "chr8",
        "chr9",
        "chr10",
        "chr11",
        "chr12",
        "chr13",
        "chr14",
        "chr15",
        "chr16",
        "chr17",
        "chr18",
        "chr19",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        {
          "trackId": "hg38ToMm39_gene_density",
          "mark": "rect",
          "encoding": {
            "color": {
              "scale": {
                "type": "linear",
                "range": [
                  "#ffffff",
                  "#d95f02"
                ]
              }
            }
          },
          "height": 40
        },
        "hg38ToMm39_liftover"
      ],
      "legend": {
        "show": true
      }
    }
  ]
}
```

## The X chromosome as the control

The X chromosome has stayed whole across the two lineages, so at the 100 kb cut
the X ribbons should stay between human and mouse X. Open the ring session above
with `displayedRegionNames` cut to `["chr1", "chr2", "chrX"]` to read the
control.

<Figure src="/img/circular_synteny/x_control.png" caption="Human chr1, chr2 and chrX against the same three mouse chromosomes, with a gene density ring. The X ribbons stay between the two X arcs." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        {
          "trackId": "hg38ToMm39_gene_density",
          "mark": "rect",
          "encoding": {
            "color": {
              "scale": {
                "type": "linear",
                "range": [
                  "#ffffff",
                  "#d95f02"
                ]
              }
            }
          },
          "height": 40
        },
        "hg38ToMm39_liftover"
      ],
      "legend": {
        "show": true
      }
    }
  ]
}
```

Below the 100 kb **Min length** cut, the PIF holds short rows between human chrX
and mouse autosomes, mostly a few hundred bases long, and lowering **Min
length** brings them back.

## Hovering a ribbon

Hover the widest ribbon on the same three-chromosome circle, the X block that
runs reverse between the two genomes and so twists. A tooltip gives its span in
each genome and its strand.

<Figure src="/img/circular_synteny/ribbon_hover.png" caption="The widest X ribbon hovered, filled grey and crossing itself because it is on the reverse strand. The tooltip names its span in each genome." />

Session spec, on config <https://jbrowse.org/demos/circular_synteny/config.json>:

```json
{
  "views": [
    {
      "type": "CircularView",
      "assembly": [
        "hg38",
        "mm39"
      ],
      "displayedRegionNames": [
        "chr1",
        "chr2",
        "chrX"
      ],
      "height": 780,
      "filter": [
        {
          "field": "length",
          "gte": 100000
        }
      ],
      "tracks": [
        {
          "trackId": "hg38ToMm39_gene_density",
          "mark": "rect",
          "encoding": {
            "color": {
              "scale": {
                "type": "linear",
                "range": [
                  "#ffffff",
                  "#d95f02"
                ]
              }
            }
          },
          "height": 40
        },
        "hg38ToMm39_liftover"
      ],
      "legend": {
        "show": true
      }
    }
  ]
}
```

## Your own pair of genomes

The script takes any UCSC pair by name. A pair with no hosted chain goes through
the `make-pif` commands under
[The chain as an indexed alignment](#the-chain-as-an-indexed-alignment), and
each ring takes one bigWig per assembly, or one bigWig with prefixed contigs and
an alias per assembly as in [Gene density as a ring](#gene-density-as-a-ring).

## Reproduce it end to end

The script works in four steps:

1. Fetch the hg38 and mm39 hub configs, chromosome sizes and alias tables, and
   both RefSeq curated gene sets.
2. Prefix every contig with its genome and add the prefixed name to each alias
   table, so one bigWig can hold both genomes' counts.
3. Count genes per 100 kb into that bigWig with `jbrowse make-density`, one
   count per gene however many transcripts it has.
4. Write the config with the chain track pointing at jbrowse.org's indexed copy,
   which the view reads for both the ribbons and the reorder.

The script reads four settings, and the tools it runs are in
[Prerequisites](#prerequisites):

- `TARGET` and `QUERY` pick another UCSC pair.
- `PIF` points the track at a chain indexed elsewhere.
- `MIN_LENGTH` moves the cut.
- `BASE_URL` is the prefix the finished files will be served under.

```bash
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/build_circular_synteny.sh
bash build_circular_synteny.sh
```

## See also

- **Tutorial:** [Synteny from liftOver chains (hg38 and eight vertebrates)](https://jbrowse.org/jb2/docs/tutorials/hg38_vertebrates_synteny)
- **Tutorial:** [Synteny visualization (pairwise minimap2)](https://jbrowse.org/jb2/docs/tutorials/synteny_visualization)
- **Tutorial:** [Gene density and transposon density along a chromosome](https://jbrowse.org/jb2/docs/tutorials/gene_density)
- **Tutorial:** [A map of the human mitochondrial genome](https://jbrowse.org/jb2/docs/tutorials/organelle_map)
- **User guide:** [Circular genome view](https://jbrowse.org/jb2/docs/user_guides/circular_view)
- **Config guide:** [Synteny track](https://jbrowse.org/jb2/docs/config_guides/synteny_track)

## Citations

- Kent et al. (2003).
  [Evolution's cauldron: duplication, deletion, and rearrangement in the mouse and human genomes](https://doi.org/10.1073/pnas.1932072100)
- Ohno (1967).
  [Sex Chromosomes and Sex-Linked Genes](https://doi.org/10.1007/978-3-642-88178-7),
  the argument that the mammalian X chromosome's gene content is conserved
  across species.
- Krzywinski et al. (2009).
  [Circos: an information aesthetic for comparative genomics](https://doi.org/10.1101/gr.092759.109)

