# Reconstructing a derivative allele

**TL;DR:** A split read is an ordered, oriented list of reference intervals,
which is what a derivative allele is. **Launch → Reconstruct derivative
allele...** in the alignments track menu groups the reads in the window by the
route their split alignments describe, lists each route with the number of reads
that independently take it, and draws the chosen one as a synteny or breakpoint
split view. It works from `SA` tags, so it needs long reads and an event large
enough that the aligner wrote it as a split alignment.

Each route is written as a lettered string of reference pieces with a prime on
an inverted one, and each row draws its segments to scale under its read count.
**Save segment map (SVG)** writes that map for the picked route as a figure.
**Draw as** picks the view it opens in: a
[linear synteny view](https://jbrowse.org/jb2/docs/user_guides/linear_synteny_view) puts the allele
along the bottom and the loci it visits along the top, and a
[breakpoint split view](https://jbrowse.org/jb2/docs/user_guides/sv_visualization#breakpoint-split-view)
stacks those loci in the order the reads cross them. Either goes into the
launching view's place or into a new view below it.

<Figure caption="Top: the reconstruction dialog over the COLO829 tumor pileup it was computed from, each route's segments drawn to scale under its read count. Bottom: the linear synteny view the top route opens, hg38 above and the reconstructed allele below, one ribbon per segment." src="/img/cancer_sv/derivative_autogenerated.png" />

[](https://jbrowse.org/jb2/docs/tutorials/cancer_sv) works through both shapes it produces, a
two-segment fold-back and a four-segment allele across three chromosomes.
[](https://jbrowse.org/jb2/docs/tutorials/sv_visualization_cgiab) runs it over a tumor/normal HiFi pair
and checks the route it ranks first against a published benchmark.

## What the reconstruction needs

- **Long reads, from an aligner that emits SA tags.** minimap2 and ngmlr both
  do. A short-read library ranks each junction on its own and produces no
  multi-junction route, because no read reaches from one junction to the next.
  The picker measures the reads on screen and prints the median aligned length
  it found.
- **An event above about 10 kb, or interchromosomal.** Below that an aligner
  usually writes the event inside one read's CIGAR rather than as a split
  alignment, which nothing reading SA tags can reach. The pileup's own deletion
  marks are where those show. Where the cliff falls is as much the aligner's
  doing as the browser's.
- **Two reads that agree.** A route reaches the list once at least two reads
  cross the same junctions in the same order and orientation. The floor keeps a
  repetitive window from filling the list. It is not a judgement that a single
  split read is mismapped.
- **The reads actually loaded.** A window over the track's byte budget renders
  as `force load` with nothing behind it, and the dialog says so. Narrow the
  window.
- **Every locus you want ranked on screen.** A read anchored in the window
  brings its whole SA chain, so the far side of a junction needs no panel of its
  own, but reads sitting only at that far locus contribute nothing until it is
  shown.

The same entry on a synteny track reads contigs rather than reads, since a de
novo assembly aligned to the reference is the same object at a larger scale.
There one contig is enough to list a route, and every locus has to be on screen,
because an alignment block names nothing the view has not fetched.

## Judging what it lists

A read count ranks the routes. It does not vouch for them: reads mismapped into
a repeat produce a confident-looking route, so the output is a proposal to check
against the reads.

- **The matched normal is the strongest check.** A route on its own says a locus
  has split reads, not that it has an event, and normals do propose routes at
  windows with nothing somatic in them.
- **Look at the top two rows.** Where a published junction is recovered it is
  the first or second row in both validation callsets below. A route further
  down the list is unlikely to be the one you came for.
- **Read the segment sizes.** A route whose segments are each about one read
  long is an aligner splitting a short read across the genome. The segment strip
  drawn to scale beside each row is what separates that from an allele.
- **A row marked "part of a longer route in this list"** crosses a run of
  another row's junctions and stops, so it is consistent with the longer route.
- **Dozens of routes means a repetitive window.** The picker says how many it
  left off the list.

## Recall by event size

Recall follows event size, because the reconstruction reads split alignments and
an aligner represents a short deletion inside one read's CIGAR instead. Below,
COLO829 against its ONT calls
([Valle-Inclán et al. 2022](https://doi.org/10.1016/j.xgen.2022.100139)) and
HG008-T against the C-GIAB draft benchmark
([Wagner et al. 2026](https://doi.org/10.64898/2026.05.01.722316)), scored at
every junction:

| Event size       | COLO829, ONT | HG008-T, PacBio HiFi |
| ---------------- | ------------ | -------------------- |
| < 1 kb           | 1 / 9        | 4 / 40               |
| 1 - 10 kb        | 6 / 10       | 17 / 26              |
| 10 - 100 kb      | 16 / 16      | 17 / 18              |
| > 100 kb         | 17 / 17      | 54 / 54              |
| interchromosomal | 11 / 11      | 14 / 14              |

Where a junction is recovered, its two ends land within a base or two of the
called breakend, and neither matched normal recovers a somatic junction at the
same windows.

Reading a split alignment as an ordered list of reference intervals is what
long-read SV callers extract before they cluster anything
([Sedlazeck et al. 2018](https://doi.org/10.1038/s41592-018-0001-7)), and
ordering those intervals into a derivative chromosome is what long-read
rearrangement pipelines do with them
([Cretu Stancu et al. 2017](https://doi.org/10.1038/s41467-017-01343-4),
[Mitsuhashi et al. 2020](https://doi.org/10.1186/s13073-020-00762-1)). This is
the visualization half of that lineage, in the manner of Ribbon
([Nattestad et al. 2021](https://doi.org/10.1093/bioinformatics/btaa1080)): it
groups those chains and counts them, and where two routes disagree it lists both
with their counts.

## See also

- [](https://jbrowse.org/jb2/docs/user_guides/sv_visualization)
- [](https://jbrowse.org/jb2/docs/user_guides/alignments_track)
- [](https://jbrowse.org/jb2/docs/user_guides/linear_synteny_view)
- [](https://jbrowse.org/jb2/docs/tutorials/cancer_sv)

## References

- Cretu Stancu et al. (2017).
  [Mapping and phasing of structural variation in patient genomes using nanopore sequencing](https://doi.org/10.1038/s41467-017-01343-4)
- Mitsuhashi et al. (2020).
  [A pipeline for complete characterization of complex germline rearrangements from long DNA reads](https://doi.org/10.1186/s13073-020-00762-1)
- Nattestad et al. (2021).
  [Ribbon: intuitive visualization for complex genomic variation](https://doi.org/10.1093/bioinformatics/btaa1080)
- Sedlazeck et al. (2018).
  [Accurate detection of complex structural variations using single-molecule sequencing](https://doi.org/10.1038/s41592-018-0001-7)
- Valle-Inclán et al. (2022).
  [A multi-platform reference for somatic structural variation detection](https://doi.org/10.1016/j.xgen.2022.100139)
- Wagner et al. (2026).
  [A complete human pancreatic cancer genome](https://doi.org/10.64898/2026.05.01.722316)

