Inspecting phased reads (GIAB HG002)
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.17. Desktop beta builds are coming soon.
HG002 is the Genome in a Bottle (GIAB) Ashkenazi son, a human benchmark sample.
GIAB publishes reads of HG002 from every major platform, and the long reads
carry an HP tag from WhatsHap saying which parental haplotype each read came
from. We:
- open HG002 Oxford Nanopore, PacBio and Illumina reads beside the GIAB SV benchmark
- group and color the nanopore reads by
HP, so a heterozygous deletion sits in one haplotype's section - compare one insertion across the three platforms
- split coverage by strand to separate a real variant from a basecalling artifact
- color reads by 5mC and group them by
HPat an imprinted CpG island
Prerequisites
- the JBrowse demo, whose GIAB category in the track selector holds every track below, or your own instance with hg19 loaded (assemblies guide)
The data
GIAB's HG002 reads over two hg19 chr1 windows (1:55.69-55.72Mb and
1:62.99-63.02Mb), plus the GIAB Tier 1 SV benchmark. Nothing to download: the
demo tracks read slices of these files by URL.
Read by URL (no download needed)
| What it is | File |
|---|---|
| HG002 reads from every GIAB platform, the full genomes | HG002_NA24385_son/ |
| GIAB Tier 1 SV benchmark v0.6, read by the SV track | HG002_SVs_Tier1_v0.6.vcf.gz |
Loading phased reads
On your own instance, a haplotagged BAM loads like any other alignments track.
The facet setting opens the track already split by HP:
Goes in the tracks array of config.json. See Tracks.
{
"type": "AlignmentsTrack",
"trackId": "hg002_ont_hp",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg19"],
"adapter": {
"type": "BamAdapter",
"bamLocation": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam"
},
"index": {
"location": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam.bai"
}
}
},
"displayDefaults": {
"facet": { "field": "tags.HP" },
"encoding": { "color": "tags.HP" }
}
}jbrowse add-track-json '{
"type": "AlignmentsTrack",
"trackId": "hg002_ont_hp",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg19"],
"adapter": {
"type": "BamAdapter",
"bamLocation": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam"
},
"index": {
"location": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam.bai"
}
}
},
"displayDefaults": {
"facet": { "field": "tags.HP" },
"encoding": { "color": "tags.HP" }
}
}'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": "AlignmentsTrack",
"trackId": "hg002_ont_hp",
"name": "HG002 ONT, phased",
"assemblyNames": ["hg19"],
"adapter": {
"type": "BamAdapter",
"bamLocation": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam"
},
"index": {
"location": {
"uri": "https://jbrowse.org/demos/hg002/HG002.ONTrel2.HP.hs37d5.demo_slices.bam.bai"
}
}
},
"displayDefaults": {
"facet": { "field": "tags.HP" },
"encoding": { "color": "tags.HP" }
}
}A heterozygous deletion in one haplotype
Navigate to 1:63,005,000-63,008,000 and open HG002 BAM ultralong
nanopore+whatshap. From the track menu, Group by... → Tag... asks for the
tag name and lists the values it finds in view:
Grouped by HP and colored by the same tag, the pileup splits into one section
per haplotype, plus a section for untagged reads. The deletion from the GIAB SV
track shows as a gap in one section only:
The alignments guide covers grouping by any tag, collapsing sections, and the matching sort and filter options.
One insertion across three platforms
Navigate to 1:55,705,770-55,706,090 and open the nanopore, PacBio and Illumina
tracks together. JBrowse draws the insertion inside each long read as a purple
mark. The 250 bp Illumina reads stop at its edges, and Show... → Soft
clipping draws the unaligned bases they carry past them:
Strand-split coverage
Mismatch columns that come from basecalling errors often show on one strand only. Group by... → Strand on the nanopore track gives each section a coverage band built from its own reads:
Methylation by haplotype
HG002's nanopore reads also carry 5mC calls in their MM/ML tags. On hg38,
navigate to the SNRPN imprinting center at chr15:24,948,000-24,962,000 and
open HG002 ONT reads (5mC, haplotagged). Color by... → Per-base coloring →
Modifications paints each CpG from its 5mC call, and Group by... → Tag...
with HP puts the methylated parental allele in one section and the
unmethylated one in the other:
See also
- Tutorial: Methylation (long-read)
- Tutorial: Comparing one genome's two haplotypes (T2T-HG002)
- Tutorial: Structural variants (Cancer GIAB) part 1: breakpoints
- Tutorial: Phased trio analysis (1000 Genomes)
- User guide: Alignments track
- User guide: SV visualization
Feedback on this tutorial is welcome: contact us.