# Synteny by ancestral linkage group (sponge, comb jelly, jellyfish)

:::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.

:::

Certain sets of genes have stayed on the same chromosome together since before
animals existed; they are called ancestral linkage groups.
[odp](https://github.com/conchoecia/odp) writes, for every pair of genomes it
compares, a table of their orthologs with the set each one belongs to and a
color for it. A sponge keeps each set on one chromosome; a comb jelly spreads
each over several. We:

- load the jellyfish-sponge table as a synteny track, each ortholog colored by
  its set
- open it as a dotplot, with one genome's chromosomes sorted by where their
  orthologs sit on the other
- narrow the dotplot to three chromosomes of each genome, around RES10 and EMU23
- stack the genomes in a linear synteny view, with ribbons colored by set

## Prerequisites

- A web browser, to fetch two files from Dryad by hand
- `python3`
- `samtools`
- `curl` and `tar`
- `node`, for the [JBrowse CLI](https://jbrowse.org/jb2/docs/cli)
- [odp](https://github.com/conchoecia/odp), with
  [conda](https://conda-forge.org/download/) for its environment, for
  [your own genomes](#running-odp-on-your-own-genomes) only
- A running JBrowse instance (the [web quickstart](https://jbrowse.org/jb2/docs/quickstart_web) or the
  [desktop quickstart](https://jbrowse.org/jb2/docs/quickstart_desktop))

<!-- BEGIN GENERATED TUTORIAL_INSTALL samtools,node,jbrowse-cli -->

```bash
# Debian/Ubuntu
sudo apt install samtools nodejs
# or conda, which has every tool above
conda install -c bioconda -c conda-forge samtools nodejs
# any platform
npm install -g @jbrowse/cli@next
```

<!-- END GENERATED TUTORIAL_INSTALL samtools,node,jbrowse-cli -->

## Download the data

The genomes and the ortholog tables are the Dryad deposit behind Schultz et al.
2023, released CC0.

Dryad has no direct download URL, so download the two tarballs by hand, 2.6 GB
and 5.7 GB. The [build script](#reproduce-it-end-to-end) extracts only the
genomes and tables the page uses, and fetches the _Ephydatia_ assembly.

| What it is                                                                             | File                                                                                                       |
| -------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
| Both tarballs, `genomes.tar.gz` and `supplementary_information.tar.gz`                 | [dryad.dncjsxm47](https://datadryad.org/dataset/doi:10.5061/dryad.dncjsxm47)                               |
| The _Ephydatia_ assembly, which a script in the deposit fetches from the original host | [Emu_genome_v1.fa.gz](https://bitbucket.org/EphydatiaGenome/ephydatiagenome/downloads/Emu_genome_v1.fa.gz) |

## The linkage-group label in the ortholog table

Simakov et al. 2022 named a set of gene families the BCnS linkage groups. A gene
belongs to one group or to none. odp searches every proteome it is given against
a database of the groups' protein models and writes the group each ortholog was
assigned as a column beside it, which a synteny track can read.

The dotplot uses two genomes and the stack at the end adds more:

| Code   | Species                                | Used in           |
| ------ | -------------------------------------- | ----------------- |
| `RES`  | jellyfish _Rhopilema esculentum_       | dotplot and stack |
| `EMU`  | freshwater sponge _Ephydatia muelleri_ | dotplot and stack |
| `HCA`  | comb jelly _Hormiphora californensis_  | stack only        |
| `BIN`  | comb jelly _Bolinopsis microptera_     | stack only        |
| `BFL`  | amphioxus _Branchiostoma floridae_     | stack only        |
| `CLAa` | cladorhizid sponge                     | stack only        |

odp's group database was built from a set of genomes, some of them on this page:
the jellyfish, _Ephydatia_ and amphioxus. The database was built without the
comb jellies and the cladorhizid. odp compares genomes two at a time, so the
deposit holds one table per pair, each listing every reciprocal best protein hit
between its two genomes.

A table's row is the gene pair, the group, where each gene sits, and the color:

```text
rbh                    EMU_gene      RES_gene       gene_group  EMU_scaf  EMU_pos  RES_scaf  RES_pos   ...  color
rbh2way_EMU_RES_964    Em0019g38a    mRNA.RE04286   A1a         EMU19     180964   RES2      13815510  ...  #C23D51
rbh2way_EMU_RES_4123   Em0019g57a    mRNA.RE14076   None        EMU19     290216   RES8      13037026  ...  #000000
```

### Running odp on your own genomes

The deposit holds odp's output for the page's genomes. For your own, odp takes a
protein FASTA, a genome FASTA and a `.chrom` file per genome. A `.chrom` line is
a protein id, the scaffold it sits on, the strand, and the least and greatest
CDS coordinates, tab-separated. Name each genome by a short code, which becomes
its assembly name in JBrowse.

odp runs under snakemake 7 or 8 and pandas 2, which a fresh environment does not
pick by default:

```bash
# odp breaks under pandas 3 and snakemake 9; diamond, blast and hmmer are the
# searches it runs
conda create -n odp -c conda-forge -c bioconda python=3.11 \
  'snakemake-minimal>=7,<9' 'pandas<3' numpy matplotlib networkx scipy \
  seaborn biopython pyyaml diamond blast hmmer
```

odp runs from a directory beside its clone, the one holding `config.yaml`:

```bash
conda activate odp
git clone https://github.com/conchoecia/odp.git
```

For an NCBI annotation, a script in odp writes the `.chrom` from the GFF:

```bash
python3 odp/scripts/NCBIgff2chrom.py genomic.gff > SP.chrom
```

The colored tables come only from a linkage-group database unpacked in the
clone. Building the BCnS one takes about a minute on 16 cores:

```bash
# odp refuses an LG_db directory whose name has '_', and a bare make also
# unpacks BCnS_LGs, so build this database alone; seqtk and fainfo compile
# from source, which needs a C compiler and the zlib headers
make -C odp BCnSSimakov2022 seqtk fainfo
```

```yaml
# config.yaml; plot_LGs adds the gene_group and color columns from each
# installed linkage-group database, and diamond searches faster than blastp,
# odp's default
plot_LGs: True
diamond_or_blastp: diamond
species:
  EMU:
    proteins: EMU.pep
    chrom: EMU.chrom
    genome: EMU.fa
  RES:
    proteins: RES.pep
    chrom: RES.chrom
    genome: RES.fa
```

```bash
odp/bin/odp run --config config.yaml
```

Two RefSeq genomes, _Nematostella_ and amphioxus, took about 20 minutes on 16
cores. odp writes the colored tables under
`odp/step2-figures/synteny_coloredby_BCnSSimakov2022/`, one per pair. An older
odp made the deposit, with a database named `BCnS_LGs` and the tables under
`synteny_analysis/`. The conversion below reads both layouts. The group names
are the same, and the palette in `color` differs.

### Converting a table to a `.blocks` file

Gene intervals come from odp's `.chrom` files, since the table's position column
holds one coordinate per gene and would make every feature one base long:

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

```bash
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/rbh_to_blocks.py
# --species sets the column order, anchor first, which the track then follows
# --chrom gives each species' genes their real start and stop
# --attributes names the columns that pass through after the gene ids
python3 rbh_to_blocks.py EMU_RES_xy_reciprocal_best_hits.coloredby_BCnS_LGs.plotted.rbh \
  -o RES_EMU.blocks --bed-dir RES_EMU \
  --species RES EMU --chrom RES=RES.chrom EMU=EMU.chrom \
  --attributes gene_group color break_FET
```

`rbh_to_blocks.py` prints how many of each genome's gene ids it found in the
`.chrom` file. An ortholog from outside the BCnS families gets `.` in the group
column, which the browser draws in grey.

A `.blocks` row is the gene ids across the two genomes, then the attribute
columns:

```text
mRNA.RE04286  Em0019g38a  A1a  #C23D51  4.1411820197020265e-230
mRNA.RE14076  Em0019g57a  .    #000000  524.9999053847149
```

## Loading the jellyfish and sponge assemblies

<!-- No genomes.jbrowse.org hubs: EMU and BFL match portal assemblies, but the
Dryad copies rename every sequence, so hub tracks would not line up, and RES
and BIN are different assemblies from the portal's. -->

We'll load the two genomes of the dotplot. The genome FASTA needs a `.fai`
beside it (`samtools faidx`), and its sequence names must match the table's
scaffold columns. The stack adds four more assemblies the same way, one block
each.

```json
{
  "name": "RES",
  "displayName": "Rhopilema (jellyfish)",
  "uri": "RES.fa"
}
```

CLI:

```bash
jbrowse add-assembly RES.fa \
  --name RES \
  --displayName "Rhopilema (jellyfish)" \
  --load copy
```

```json
{
  "name": "EMU",
  "displayName": "Ephydatia (sponge)",
  "uri": "EMU.fa"
}
```

CLI:

```bash
jbrowse add-assembly EMU.fa \
  --name EMU \
  --displayName "Ephydatia (sponge)" \
  --load copy
```

## Loading the jellyfish-sponge table as a synteny track

`attributeColumns` exposes the last three columns of the `.blocks` file:

- `gene_group` becomes a color-by mode named after it.
- `color` holds the color odp chose for each group, which that mode paints the
  group with, so it is not a mode of its own.
- `break_FET` is odp's test of the row's chromosome pair, which sets opacity in
  the stack below.

```json
{
  "type": "SyntenyTrack",
  "trackId": "RES_EMU",
  "name": "RES vs EMU orthologs, colored by BCnS linkage group",
  "assemblyNames": ["RES", "EMU"],
  "adapter": {
    "type": "MCScanBlocksAdapter",
    "uri": "RES_EMU.blocks",
    "blockAssemblies": ["RES", "EMU"],
    "bedLocations": ["RES_EMU/RES.bed", "RES_EMU/EMU.bed"],
    "attributeColumns": ["gene_group", "color", "break_FET"]
  }
}
```

CLI:

```bash
jbrowse add-track-json '{
  "type": "SyntenyTrack",
  "trackId": "RES_EMU",
  "name": "RES vs EMU orthologs, colored by BCnS linkage group",
  "assemblyNames": ["RES", "EMU"],
  "adapter": {
    "type": "MCScanBlocksAdapter",
    "uri": "RES_EMU.blocks",
    "blockAssemblies": ["RES", "EMU"],
    "bedLocations": ["RES_EMU/RES.bed", "RES_EMU/EMU.bed"],
    "attributeColumns": ["gene_group", "color", "break_FET"]
  }
}'
```

The build script adds one such track per pair.

## Dotplot of jellyfish against sponge, colored by linkage group

We'll open the jellyfish-against-sponge table as a dotplot, then:

- Pick **gene_group** under **Color by value** on the palette button in the view
  header, which also opens the legend.
- Choose **Re-order chromosomes** on the view menu to sort the vertical genome's
  chromosomes by where their orthologs land along the horizontal one, which
  turns one block per group into a diagonal.

As a session, the same dotplot with the sponge's unplaced scaffolds left off its
axis. In [grammar-of-graphics](https://jbrowse.org/jb2/docs/config_guides/mark_display) terms,
`encoding.color` maps the `gene_group` field to colors:

```json
{
  "defaultSession": {
    "name": "Ancestral linkage groups",
    "views": [
      {
        "type": "DotplotView",
        "displayName": "Rhopilema (jellyfish) vs Ephydatia (sponge)",
        "views": [
          { "assembly": "RES" },
          { "assembly": "EMU", "displayedRegionNames": ["EMU*"] }
        ],
        "tracks": ["RES_EMU"],
        "encoding": { "color": "gene_group" },
        "autoDiagonalize": true,
        "lineWidth": 4,
        "height": 860
      }
    ]
  }
}
```

CLI:

```bash
jbrowse set-default-session --session - << 'EOF'
{
  "name": "Ancestral linkage groups",
  "views": [
    {
      "type": "DotplotView",
      "displayName": "Rhopilema (jellyfish) vs Ephydatia (sponge)",
      "views": [
        { "assembly": "RES" },
        { "assembly": "EMU", "displayedRegionNames": ["EMU*"] }
      ],
      "tracks": ["RES_EMU"],
      "encoding": { "color": "gene_group" },
      "autoDiagonalize": true,
      "lineWidth": 4,
      "height": 860
    }
  ]
}
EOF
```

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

<Figure caption="Jellyfish against sponge as a dotplot, each ortholog colored by its linkage group." src="/img/linkage_groups/alg_dotplot_res_emu.png" />

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

```json
{
  "views": [
    {
      "type": "DotplotView",
      "displayName": "Rhopilema (jellyfish) vs Ephydatia (sponge)",
      "views": [
        {
          "assembly": "RES"
        },
        {
          "assembly": "EMU",
          "displayedRegionNames": [
            "EMU*"
          ]
        }
      ],
      "tracks": [
        "RES_EMU"
      ],
      "encoding": {
        "color": "gene_group"
      },
      "autoDiagonalize": true,
      "lineWidth": 4,
      "height": 860
    }
  ]
}
```

Inside a block the points fill the square, because gene order along each
chromosome has shuffled while each gene has stayed on its chromosome.

## Two fusions, mixed and unmixed

The jellyfish's RES10 has both J1 and Qa, and the sponge's EMU23 has both J2 and
K. Every other genome on this page has each pair on separate chromosomes, so
each is a fusion in one lineage. A fusion starts with the two groups end to end,
and rearrangement inside the chromosome then interleaves their genes.[^mixing]
We'll draw those two chromosomes and the four they pair with.

`displayedRegionNames` lists the chromosomes on each axis, in the order drawn,
and the session leaves `autoDiagonalize` off so that order holds. `filter` keeps
the orthologs that have a group, so the legend names only the four drawn:

```json
{
  "defaultSession": {
    "name": "Two fusions",
    "views": [
      {
        "type": "DotplotView",
        "displayName": "Two fusions, one in each genome",
        "views": [
          {
            "assembly": "RES",
            "displayedRegionNames": ["RES10", "RES11", "RES15"]
          },
          {
            "assembly": "EMU",
            "displayedRegionNames": ["EMU5", "EMU2", "EMU23"]
          }
        ],
        "tracks": ["RES_EMU"],
        "encoding": { "color": "gene_group" },
        "filter": [{ "field": "gene_group", "valid": true }],
        "lineWidth": 6,
        "height": 700
      }
    ]
  }
}
```

CLI:

```bash
jbrowse set-default-session --session - << 'EOF'
{
  "name": "Two fusions",
  "views": [
    {
      "type": "DotplotView",
      "displayName": "Two fusions, one in each genome",
      "views": [
        {
          "assembly": "RES",
          "displayedRegionNames": ["RES10", "RES11", "RES15"]
        },
        {
          "assembly": "EMU",
          "displayedRegionNames": ["EMU5", "EMU2", "EMU23"]
        }
      ],
      "tracks": ["RES_EMU"],
      "encoding": { "color": "gene_group" },
      "filter": [{ "field": "gene_group", "valid": true }],
      "lineWidth": 6,
      "height": 700
    }
  ]
}
EOF
```

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

<Figure caption="Three jellyfish chromosomes against three sponge chromosomes, orthologs colored by linkage group." src="/img/linkage_groups/alg_fusions.png" />

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

```json
{
  "views": [
    {
      "type": "DotplotView",
      "displayName": "Two fusions, one in each genome",
      "views": [
        {
          "assembly": "RES",
          "displayedRegionNames": [
            "RES10",
            "RES11",
            "RES15"
          ]
        },
        {
          "assembly": "EMU",
          "displayedRegionNames": [
            "EMU5",
            "EMU2",
            "EMU23"
          ]
        }
      ],
      "tracks": [
        "RES_EMU"
      ],
      "encoding": {
        "color": "gene_group"
      },
      "filter": [
        {
          "field": "gene_group",
          "valid": true
        }
      ],
      "lineWidth": 6,
      "height": 700
    }
  ]
}
```

Along RES10, the J1 and Qa orthologs each run the chromosome's full length. On
EMU23, J2 holds one end and K the rest.

[^mixing]:
    The fusion-with-mixing model is from Simakov et al. 2022. Schultz et al.
    2023 find fusions that sponges, cnidarians and bilaterians share, four of
    them mixed, which comb jellies and three unicellular outgroups lack, and so
    place the comb jellies as sister to all other animals.

## Stacking the genomes, ribbons colored by linkage group

Figure 1d of Schultz et al. 2023 stacks the same tables, one row per genome,
with ribbons between neighbours colored by group. A linear synteny view does
that with one pair's track per band. The build script loads the pairs in the
paper's order, two comb jellies over the jellyfish, amphioxus and two sponges,
and the session below sets what the figure needs.

odp tests each pair of chromosomes for more shared orthologs than chance
(Fisher's exact test in the `break_FET` column, multiplied by the number of
chromosome pairs, so a value can pass 1). Like the paper's figure, the stack
draws orthologs on a chromosome pair under 0.05 at opacity 0.8 and the rest at
0.15. That is an `encoding.opacity` scale, which maps the `break_FET` field, cut
at 0.05, to a `scale.range` of two opacities.

Each setting in the session has a menu route except `render` and the
`encoding.opacity` mapping:

- `autoDiagonalize` sorts each row against its neighbour, working outward from
  `diagonalizeAnchorRow`. Rows count from 0, so 2 is the jellyfish, where each
  group sits on one chromosome. **Rows → Re-order chromosomes** on the view menu
  runs the same sort and asks for that row.
- `filter` drops the alignments with no `gene_group`, which **Hide unlabelled
  rows** on the palette menu writes.
- `mark` is **Curved lines** on the sliders button.
- `render.antialias` turns off the fade a whole-genome view applies to sub-pixel
  ribbons, since the figure shows the ribbons' colors. It has no menu item.
- `encoding.opacity` is the scale above. **Opacity** on the sliders button
  scales both opacities together; the mapping itself has no menu item.
- `levelHeights` is each band's height, which dragging the bar under a band sets
  for every band.
- `collapseEmptyRows` draws each genome row that has no track as a bare scale
  bar. **Rows → Compact all views** on the view menu does the same.

```json
{
  "defaultSession": {
    "name": "Ancestral linkage groups, six genomes",
    "views": [
      {
        "type": "LinearSyntenyView",
        "displayName": "Comb jellies, jellyfish, amphioxus, sponges",
        "views": [
          { "assembly": "BIN", "displayedRegionNames": ["BIN*"] },
          { "assembly": "HCA", "displayedRegionNames": ["HCA*"] },
          { "assembly": "RES", "displayedRegionNames": ["RES*"] },
          { "assembly": "BFL", "displayedRegionNames": ["BFL*"] },
          { "assembly": "EMU", "displayedRegionNames": ["EMU*"] },
          { "assembly": "CLAa", "displayedRegionNames": ["CLA*_hapA"] }
        ],
        "tracks": [
          ["BIN_HCA"],
          ["RES_HCA"],
          ["RES_BFL"],
          ["BFL_EMU"],
          ["EMU_CLAa"]
        ],
        "encoding": {
          "color": "gene_group",
          "opacity": {
            "field": "break_FET",
            "scale": {
              "type": "threshold",
              "domain": [0.05],
              "range": [0.8, 0.15]
            }
          }
        },
        "filter": [{ "field": "gene_group", "valid": true }],
        "autoDiagonalize": true,
        "diagonalizeAnchorRow": 2,
        "mark": { "interpolate": "bump" },
        "render": { "antialias": false },
        "levelHeights": [130, 130, 130, 130, 130],
        "collapseEmptyRows": true
      }
    ]
  }
}
```

CLI:

```bash
jbrowse set-default-session --session - << 'EOF'
{
  "name": "Ancestral linkage groups, six genomes",
  "views": [
    {
      "type": "LinearSyntenyView",
      "displayName": "Comb jellies, jellyfish, amphioxus, sponges",
      "views": [
        { "assembly": "BIN", "displayedRegionNames": ["BIN*"] },
        { "assembly": "HCA", "displayedRegionNames": ["HCA*"] },
        { "assembly": "RES", "displayedRegionNames": ["RES*"] },
        { "assembly": "BFL", "displayedRegionNames": ["BFL*"] },
        { "assembly": "EMU", "displayedRegionNames": ["EMU*"] },
        { "assembly": "CLAa", "displayedRegionNames": ["CLA*_hapA"] }
      ],
      "tracks": [
        ["BIN_HCA"],
        ["RES_HCA"],
        ["RES_BFL"],
        ["BFL_EMU"],
        ["EMU_CLAa"]
      ],
      "encoding": {
        "color": "gene_group",
        "opacity": {
          "field": "break_FET",
          "scale": {
            "type": "threshold",
            "domain": [0.05],
            "range": [0.8, 0.15]
          }
        }
      },
      "filter": [{ "field": "gene_group", "valid": true }],
      "autoDiagonalize": true,
      "diagonalizeAnchorRow": 2,
      "mark": { "interpolate": "bump" },
      "render": { "antialias": false },
      "levelHeights": [130, 130, 130, 130, 130],
      "collapseEmptyRows": true
    }
  ]
}
EOF
```

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

<Figure caption="The genomes in the paper's order, ribbons colored by linkage group, solid on significantly paired chromosomes and faint elsewhere." src="/img/linkage_groups/alg_stack.png" />

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

```json
{
  "views": [
    {
      "type": "LinearSyntenyView",
      "displayName": "Comb jellies, jellyfish, amphioxus, sponges",
      "views": [
        {
          "assembly": "BIN",
          "displayedRegionNames": [
            "BIN*"
          ]
        },
        {
          "assembly": "HCA",
          "displayedRegionNames": [
            "HCA*"
          ]
        },
        {
          "assembly": "RES",
          "displayedRegionNames": [
            "RES*"
          ]
        },
        {
          "assembly": "BFL",
          "displayedRegionNames": [
            "BFL*"
          ]
        },
        {
          "assembly": "EMU",
          "displayedRegionNames": [
            "EMU*"
          ]
        },
        {
          "assembly": "CLAa",
          "displayedRegionNames": [
            "CLA*_hapA"
          ]
        }
      ],
      "tracks": [
        [
          "BIN_HCA"
        ],
        [
          "RES_HCA"
        ],
        [
          "RES_BFL"
        ],
        [
          "BFL_EMU"
        ],
        [
          "EMU_CLAa"
        ]
      ],
      "encoding": {
        "color": "gene_group",
        "opacity": {
          "field": "break_FET",
          "scale": {
            "type": "threshold",
            "domain": [
              0.05
            ],
            "range": [
              0.8,
              0.15
            ]
          }
        }
      },
      "filter": [
        {
          "field": "gene_group",
          "valid": true
        }
      ],
      "autoDiagonalize": true,
      "diagonalizeAnchorRow": 2,
      "mark": {
        "interpolate": "bump"
      },
      "render": {
        "antialias": false
      },
      "levelHeights": [
        130,
        130,
        130,
        130,
        130
      ],
      "collapseEmptyRows": true
    }
  ]
}
```

The comb jellies spread most groups over several chromosomes, where the
jellyfish keeps each on one, so the second band is the faintest. Both comb
jellies spread them the same way, so the band between the two stays solid.

## Reproduce it end to end

Download `genomes.tar.gz` and `supplementary_information.tar.gz` from
[the Dryad page](https://datadryad.org/dataset/doi:10.5061/dryad.dncjsxm47) into
`~/Downloads` first, since Dryad has no direct download URL. The script needs
the tools under [Prerequisites](#prerequisites) and works in three steps:

1. Unpack the genomes and pair tables the page uses from the two tarballs, and
   fetch the _Ephydatia_ assembly, which the deposit does not redistribute, from
   its original host.
2. Convert each pair's odp table into a `.blocks` table and two BEDs, taking
   each gene's extent from the `.chrom` files and keeping the group, color and
   `break_FET` columns.
3. Write the assemblies, one track per pair, and a session holding the dotplot
   and the stack.

```bash
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/build_odp_linkage_groups_synteny.sh
DRYAD_DIR=~/Downloads bash build_odp_linkage_groups_synteny.sh
```

## See also

- **Tutorial:** [Synteny from an ortholog table (grape, peach, cacao)](https://jbrowse.org/jb2/docs/tutorials/multiway_synteny_grape_peach_cacao)
- **Tutorial:** [Synteny visualization (OrthoFinder orthogroups)](https://jbrowse.org/jb2/docs/tutorials/orthofinder_synteny)
- **Tutorial:** [Pangenome (HPRC) part 2: haplotypes against each other](https://jbrowse.org/jb2/docs/tutorials/pangenome_hprc_haplotypes)
- **User guide:** [Linear synteny view](https://jbrowse.org/jb2/docs/user_guides/linear_synteny_view)

## External links

- odp, the oxford dot plot toolkit: https://github.com/conchoecia/odp

## Citations

- Schultz et al. (2023).
  [Ancient gene linkages support ctenophores as sister to other animals](https://doi.org/10.1038/s41586-023-05936-6)
- Simakov et al. (2022).
  [Deeply conserved synteny and the evolution of metazoan chromosomes](https://doi.org/10.1126/sciadv.abi5884)

