Gene fusion calls and the DNA behind them
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.22. Desktop beta builds for Linux and
macOS are on the releases page;
the Windows build waits on code signing.
A fusion caller writes a table of gene pairs, each with the coordinate of the transcript junction where the RNA joins the two genes. The chromosome itself broke somewhere in the introns around that junction, so the RNA call and the DNA break sit at different coordinates. In the K562 leukemia cell line we take the calls through long RNA reads to the DNA at BCR-ABL1 and NUP214-XKR3. We:
- load long RNA reads as an alignments track, and triage STAR-Fusion's calls in the SV inspector
- open the split RNA reads at BCR-ABL1 across three regions of one view, with read connections drawn between the pieces
- load the DNA breakpoints, lifted to hg38, and the copy number, and draw them with Display types → Marks beside the fusion calls
Prerequisites
- a JBrowse to open them in: Desktop takes a local file by path, Web through Add track
- Command line tools (JBrowse CLI)
- samtools, to sort and merge the four Iso-Seq runs
bedGraphToBigWigandliftOver, both from the UCSC utilitiespython3, fordepmap_to_jbrowse.pyandlift_bnd_vcf.py
Each python helper is a single file:
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/depmap_to_jbrowse.py
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/lift_bnd_vcf.py# Debian/Ubuntu
sudo apt install samtools tabix nodejs
# or conda, which has every tool above
conda install -c bioconda -c conda-forge samtools htslib \
ucsc-bedgraphtobigwig ucsc-liftover nodejs
# 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 \
https://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/liftOver
chmod +x ~/.local/bin/bedGraphToBigWig ~/.local/bin/liftOver
# any platform
npm install -g @jbrowse/cli@nextThe data
Four PacBio Iso-Seq runs from ENCODE, two tables out of DepMap's 24Q4 release, and the DNA breakpoints on hg19.
The tracks below read local files that the
build script writes from these, fetching each
itself, so run it first, or swap in your own long RNA reads, as Loading hg38
and the merged Iso-Seq reads shows; depmap_to_jbrowse.py takes any DepMap
cell-line ID.
| What it is | File |
|---|---|
K562 PacBio Iso-Seq, ENCODE ENCFF433YKW |
ENCFF433YKW.bam |
K562 PacBio Iso-Seq, ENCODE ENCFF092NLB |
ENCFF092NLB.bam |
K562 PacBio Iso-Seq, ENCODE ENCFF515YRZ |
ENCFF515YRZ.bam |
K562 PacBio Iso-Seq, ENCODE ENCFF475XQX |
ENCFF475XQX.bam |
K562 STAR-Fusion calls (DepMap 24Q4, OmicsFusionFiltered.csv) |
51065693 |
K562 copy-number segments (DepMap 24Q4 WGS, OmicsCNSegmentsProfile.csv) |
51065333 |
| K562 DNA breakpoints (ENCODE 10X linked-read large-SV calls, hg19, lifted to hg38 by the build script) | ENCFF863MPP.vcf.gz |
| The hg19-to-hg38 chain the lift uses | hg19ToHg38.over.chain.gz |
Cutting K562 out of DepMap and lifting its breakpoints to hg38
K562 is a chronic myeloid leukemia line with the Philadelphia chromosome, the t(9;22) translocation between chr9 and chr22 that fuses BCR to ABL1.
The fusion and copy-number tables both cover every line in the release.
depmap_to_jbrowse.py filters to one line and writes a STAR-Fusion TSV from the
fusion table and a bedGraph from the copy-number segments. K562 is model
ACH-000551, and its WGS copy-number profile is PR-aheaZL:
curl -O https://hgdownload.soe.ucsc.edu/goldenPath/hg38/bigZips/hg38.chrom.sizes
python3 depmap_to_jbrowse.py fusions OmicsFusionFiltered.csv ACH-000551 K562.star-fusion.tsv
python3 depmap_to_jbrowse.py segments OmicsCNSegmentsProfile.csv PR-aheaZL K562_cn.bedGraph
sort -k1,1 -k2,2n K562_cn.bedGraph |
awk 'NR==FNR{ok[$1];next} ($1 in ok)' hg38.chrom.sizes - > K562_cn.sorted.bedGraph
bedGraphToBigWig K562_cn.sorted.bedGraph hg38.chrom.sizes K562_cn.bwThe DNA breakpoints are on hg19, and a breakend record has a second coordinate
inside its ALT string, so a plain liftOver of the POS column leaves the
partner coordinates on hg19.
lift_bnd_vcf.py
moves both:
python3 lift_bnd_vcf.py calls.hg19.vcf.gz hg19ToHg38.over.chain.gz \
liftOver calls.hg38.vcf liftwork
bgzip calls.hg38.vcf && tabix -f -C -p vcf calls.hg38.vcf.gzLoading hg38 and the merged Iso-Seq reads
The lifted DNA breakpoints and the Iso-Seq molecules are on hg38, so we load that assembly first.
Goes in the assemblies array of config.json. See Assemblies.
{
"name": "hg38",
"uri": "https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz",
"refNameAliases": {
"uri": "https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt"
},
"cytobands": "https://jbrowse.org/genomes/GRCh38/cytoBand.txt"
}Edits config.json in the current folder, creating it if there is none. See JBrowse CLI with Desktop.
jbrowse add-assembly https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz \
--name hg38 \
--refNameAliases https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt \
--config '{"cytobands":"https://jbrowse.org/genomes/GRCh38/cytoBand.txt"}'hg38 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, one per line:
https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz
https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.fai
https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz.gziJBrowse reads the format off the file name. Then fill in:
- Genome name:
hg38 - refName aliases (under More options):
https://s3.amazonaws.com/jbrowse.org/genomes/GRCh38/hg38_aliases.txt - cytobands (under More options):
https://jbrowse.org/genomes/GRCh38/cytoBand.txt
The figures also show NCBI's RefSeq genes as a track:
Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "ncbi_refseq_hg38",
"name": "NCBI RefSeq genes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"gffGzLocation": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz"
},
"index": {
"indexType": "CSI",
"location": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz.csi"
}
}
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "FeatureTrack",
"trackId": "ncbi_refseq_hg38",
"name": "NCBI RefSeq genes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"gffGzLocation": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz"
},
"index": {
"indexType": "CSI",
"location": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz.csi"
}
}
}
}'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": "ncbi_refseq_hg38",
"name": "NCBI RefSeq genes",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"gffGzLocation": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz"
},
"index": {
"indexType": "CSI",
"location": {
"uri": "https://jbrowse.org/ucsc/hg38/ncbiRefSeq.gff.gz.csi"
}
}
}
}ENCODE releases each Iso-Seq alignment unsorted. Sort each run, merge them into one BAM and index it:
samtools sort -o s_run1.bam run1.bam
samtools sort -o s_run2.bam run2.bam
samtools sort -o s_run3.bam run3.bam
samtools sort -o s_run4.bam run4.bam
samtools merge -f K562_isoseq.bam s_run1.bam s_run2.bam s_run3.bam s_run4.bam
samtools index K562_isoseq.bamThe merged BAM loads as one read track. For your own long RNA reads, swap uri
for a BAM aligned to the same assembly, with its .bai beside it:
Goes in the tracks array of config.json. See Tracks.
{
"trackId": "K562_isoseq",
"name": "K562 PacBio Iso-Seq (ENCODE)",
"uri": "K562_isoseq.bam",
"assemblyNames": ["hg38"]
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track K562_isoseq.bam \
--trackId K562_isoseq \
--name "K562 PacBio Iso-Seq (ENCODE)" \
--assemblyNames hg38 \
--load copyIn JBrowse Desktop, or in any running JBrowse Web session, open a view on this track’s assembly, then File → Open track... and, in Add a track from file or URL, enter:
- Main file:
K562_isoseq.bam
JBrowse reads the adapter and track type off the file name. Then fill in:
- Track name:
K562 PacBio Iso-Seq (ENCODE) - Assembly:
hg38
Click Add.
K562_isoseq.bam is relative to a config.json. Replace it with its URL or its path on this computer.
Triaging the STAR-Fusion calls in the SV inspector
Add → SV inspector, then the file, opens the STAR-Fusion table beside a circular view of it, one chord per row. The import form reads the File Type from the filename or the table's header line, and its menu sets the type by hand.
Searching the SV inspector's table filters the table and the circular view together:
chrMkeeps the rows that pair a gene with a mitochondrial transcript, the usual chimeric-read artefacts.Mitelmankeeps the two rows listed in the fusion databases.chr9keeps the same two,BCR--ABL1andNUP214--XKR3: junctions between chr9 and chr22 whose chr22 partners lie megabases apart.
Each table row's caret menu has Open in linear genome view, which puts the row's two breakpoints side by side as two regions of one view:
- Each region is oriented so the fusion transcript reads left to right across
the join. XKR3 is on the minus strand, so its region opens reversed
(
[rev]). - Read connections → View as pairs/link supplementary alignments merges each molecule's two alignments onto one row.
- The figure's track keeps the split reads with alignments on both chr9 and
chr22, with
"filter": [{ "field": "split", "equal": true }, { "field": "alignedRefNames", "equal": "chr9" }, { "field": "alignedRefNames", "equal": "chr22" }]in itsdisplayDefaults.
The build script adds the STAR-Fusion calls as a track:
Goes in the tracks array of config.json. See Tracks.
{
"type": "VariantTrack",
"trackId": "K562_star_fusion",
"name": "K562 STAR-Fusion calls (DepMap 24Q4)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "StarFusionAdapter",
"starFusionLocation": { "uri": "K562.star-fusion.tsv" }
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "VariantTrack",
"trackId": "K562_star_fusion",
"name": "K562 STAR-Fusion calls (DepMap 24Q4)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "StarFusionAdapter",
"starFusionLocation": { "uri": "K562.star-fusion.tsv" }
}
}'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": "VariantTrack",
"trackId": "K562_star_fusion",
"name": "K562 STAR-Fusion calls (DepMap 24Q4)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "StarFusionAdapter",
"starFusionLocation": { "uri": "K562.star-fusion.tsv" }
}
}K562.star-fusion.tsv is relative to a config.json. Replace it with its URL or its path on this computer.
Split RNA reads at BCR-ABL1 across three regions
The transcript reaches ABL1 at more than one place, so the view uses three
regions: the BCR donor, where the transcript starts, and two ABL1 acceptor
windows. Right-click a read that crosses the junction and choose Split current
view to show split alignments, or type the three locations into the location
box separated by spaces:
chr22:23,286,000-23,293,000 chr9:130,778,000-130,785,000 chr9:130,851,000-130,858,000.
A read crossing the junction is one alignment on chr22 and a supplementary alignment (the second piece of the split read) on chr9. In the track menu:
- Read connections → View as pairs/link supplementary alignments puts the two on one row and joins them across the region divider.
- Filter by → Split reads → Only split reads draws only the reads that leave the chromosome. The coverage still counts every read; Group by → Split reads, with the "Not split" band hidden, gives the split reads' coverage, as the figure shows.
- Read connections → Read arcs adds a band under the coverage with one arc per junction, thicker where more reads support it. An arc needs both ends in view: the right-hand window gets one arc and the intron 1 window two, one at each place the reads enter it.
A vertical line at the BCR donor marks molecules whose ABL1 alignment falls in neither window.
Where the DNA broke under BCR-ABL1 and NUP214-XKR3
A fusion caller reports transcribed junctions, which sit on exon edges. Two DNA assays on the same cells give where the chromosome broke and how much of it is amplified:
- 10X Chromium linked reads from ENCODE (ENCSR053AXS, Zhou et al. 2019) give the breakends, the two ends of each junction.
- DepMap WGS segmentation gives the copy number.
The build script lifts the breakends to hg38 and adds both as tracks:
Goes in the tracks array of config.json. See Tracks.
{
"type": "VariantTrack",
"trackId": "K562_10x_sv",
"name": "K562 DNA breakpoints (10X linked reads, lifted to hg38)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "VcfTabixAdapter",
"vcfGzLocation": { "uri": "K562.10x-large-sv.vcf.gz" },
"index": {
"location": { "uri": "K562.10x-large-sv.vcf.gz.csi" },
"indexType": "CSI"
}
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track-json '{
"type": "VariantTrack",
"trackId": "K562_10x_sv",
"name": "K562 DNA breakpoints (10X linked reads, lifted to hg38)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "VcfTabixAdapter",
"vcfGzLocation": { "uri": "K562.10x-large-sv.vcf.gz" },
"index": {
"location": { "uri": "K562.10x-large-sv.vcf.gz.csi" },
"indexType": "CSI"
}
}
}'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": "VariantTrack",
"trackId": "K562_10x_sv",
"name": "K562 DNA breakpoints (10X linked reads, lifted to hg38)",
"assemblyNames": ["hg38"],
"adapter": {
"type": "VcfTabixAdapter",
"vcfGzLocation": { "uri": "K562.10x-large-sv.vcf.gz" },
"index": {
"location": { "uri": "K562.10x-large-sv.vcf.gz.csi" },
"indexType": "CSI"
}
}
}K562.10x-large-sv.vcf.gz, K562.10x-large-sv.vcf.gz.csi are relative to a config.json. Replace each with its URL or its path on this computer.
Goes in the tracks array of config.json. See Tracks.
{
"trackId": "K562_cn",
"name": "K562 copy-number segments (DepMap WGS)",
"uri": "K562_cn.bw",
"assemblyNames": ["hg38"],
"displayDefaults": {
"encoding": {
"y": {
"scale": { "domainMin": 0, "domainMax": 8 },
"axis": { "title": "copy ratio (DepMap)" }
}
}
}
}Edits config.json in the current folder. See JBrowse CLI with Desktop.
jbrowse add-track K562_cn.bw \
--trackId K562_cn \
--name "K562 copy-number segments (DepMap WGS)" \
--assemblyNames hg38 \
--displayDefaults '{"encoding":{"y":{"scale":{"domainMin":0,"domainMax":8},"axis":{"title":"copy ratio (DepMap)"}}}}' \
--load copyIn 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:
{
"trackId": "K562_cn",
"name": "K562 copy-number segments (DepMap WGS)",
"uri": "K562_cn.bw",
"assemblyNames": ["hg38"],
"displayDefaults": {
"encoding": {
"y": {
"scale": { "domainMin": 0, "domainMax": 8 },
"axis": { "title": "copy ratio (DepMap)" }
}
}
}
}K562_cn.bw is relative to a config.json. Replace it with its URL or its path on this computer.
Open chr9 from ABL1 to past NUP214 with the copy-number track under both
call tracks, and pick Display types → Marks from each call track's menu. In
grammar-of-graphics terms, a mark is the
shape drawn per record. A record that names its partner breakend is drawn as a
link with nothing configured
(mark display), and a call whose
partner is on another chromosome is drawn as a stem at its breakpoint.
| Junction | RNA junction (STAR-Fusion) | DNA break (10X) | Apart |
|---|---|---|---|
| BCR donor | chr22:23,290,413, end of exon 14 | chr22:23,290,556 | 143 bp into intron 14 |
| ABL1 acceptor | chr9:130,854,064, start of exon 2 | chr9:130,731,760 | 122 kb, in intron 1 |
| NUP214 donor | chr9:131,199,015, end of exon 29 | chr9:131,199,198 | 183 bp into intron 29 |
| XKR3 acceptor | chr22:16,808,083, start of exon 3 | chr22:16,819,350 | 11 kb, in intron 2 |
| none | no call | chr9:131,280,138 to chr13 | no gene at either end |
The amplified block on chr9 ends where the DNA breaks do, and DepMap's segmentation has no interval over BCR, so the donor window shows an arc and no copy-number step.1 A Hi-C scan of the same cell line pairs the ABL1 intron 1 break with BCR from contact counts alone.
Reproduce it end to end
scripts/build_cancer_sv_demo.sh
builds everything above from public sources. For K562 it:
- sorts the four ENCODE Iso-Seq runs, which ENCODE releases unsorted, and merges them into the one read track the junction counts come from
- cuts K562's rows out of DepMap's fusion and copy-number tables, with the fusion calls ordered by FFPM (fusion fragments per million RNA-seq fragments), best-supported first
- lifts the 10X breakends to hg38 as above, and drops a junction whole when either end fails to lift or maps reversed in hg38, where its orientation would come out wrong
The script also builds the COLO829 half of the demo, which Complex rearrangements and derivative alleles walks through.
curl -fO https://raw.githubusercontent.com/GMOD/jbrowse-components/main/scripts/build_cancer_sv_demo.sh
bash build_cancer_sv_demo.sh # builds ./cancer_sv_build/jbrowse2
npx --yes serve cancer_sv_build/jbrowse2See also
- Tutorial: Complex rearrangements and derivative alleles
- Tutorial: Structural variants from Hi-C
- Tutorial: Structural variants (Cancer GIAB) part 1: breakpoints
- User guide: SV inspector view
- User guide: SV visualization
Citations
- Nattestad et al. (2018). Complex rearrangements and oncogene amplifications revealed by long-read DNA and RNA sequencing of a breast cancer cell line
- Zhou et al. (2019). Comprehensive, integrated, and phased whole-genome analysis of the primary ENCODE cell line K562
Notes
-
SplitThreader matched copy-number steps to breakpoints the same way in the SK-BR-3 ERBB2 amplicon (Nattestad et al. 2018). ↩
Feedback on this tutorial is welcome: contact us.