Reviewing a gene prediction (Tiberius)
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.11. Desktop beta builds are coming soon.
We compare gene predictions from Tiberius, a deep-learning gene finder, on human chr22 with the GENCODE annotation, sort the models that disagree into four classes, and build a static review page with one card per model, each linking back into JBrowse. The pipeline is cmdcolin/gene-review-portal, and its README documents every option.
The comparison needs an existing annotation, so it suits re-annotating a species that has one, or comparing a new predictor against it. For the first annotation of a new assembly, RNA-seq support across each predicted junction can order the models instead.
Prerequisites
- to build a portal over your own genome: Node 23+, pnpm, htslib for
tabix, and the JBrowse CLI
Where the data comes from
Tiberius predictions over GRCh38 (Gabriel et al. 2024), read against GENCODE 47 and the hg38 reference.
- Tiberius gene predictions: jbrowse.org/…/tiberius_grch38.gff.gzhttps://jbrowse.org/genomes/GRCh38/tiberius_grch38.gff.gz
- GENCODE 47 comprehensive annotation: jbrowse.org/…/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gzhttps://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz
- hg38 reference sequence: jbrowse.org/…/hg38.prefix.fa.gzhttps://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz
A Tiberius model that merges IL17REL and TTLL8
We'll load the GRCh38 sequence the predictions were made on, then the two
annotations. Each annotation is a GFF3 that is bgzipped, sorted and
tabix-indexed with its .tbi beside it (prep), and uses
the assembly's refNames.
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"
}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"}'Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "tiberius",
"name": "Tiberius predictions",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"uri": "https://jbrowse.org/genomes/GRCh38/tiberius_grch38.gff.gz"
}
}jbrowse add-track https://jbrowse.org/genomes/GRCh38/tiberius_grch38.gff.gz \
--trackId tiberius \
--name "Tiberius predictions" \
--assemblyNames hg38In 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": "tiberius",
"name": "Tiberius predictions",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"uri": "https://jbrowse.org/genomes/GRCh38/tiberius_grch38.gff.gz"
}
}Goes in the tracks array of config.json. See Tracks.
{
"type": "FeatureTrack",
"trackId": "gencode_v47",
"name": "GENCODE 47",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"uri": "https://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz"
}
}jbrowse add-track https://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz \
--trackId gencode_v47 \
--name "GENCODE 47" \
--assemblyNames hg38In 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": "gencode_v47",
"name": "GENCODE 47",
"assemblyNames": ["hg38"],
"adapter": {
"type": "Gff3TabixAdapter",
"uri": "https://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz"
}
}Open the two annotations together at chr22:49,987,402-50,067,759. Tiberius
draws one model, g14001.t1, across most of the window, where GENCODE has two
genes, IL17REL and TTLL8, with a gap between them. The GENCODE gene features
have gene_name and no Name, so the track labels them by accession: IL17REL
is ENSG00000188263 and TTLL8 is ENSG00000138892.
MLC1, the next gene on the right, gets a separate Tiberius model, so the merge is specific to the two genes on the left.
Sorting Tiberius models into five classes against GENCODE
The portal compares each Tiberius model on chr22 with GENCODE and puts it in one of five classes, and every class except Agrees gets a card.
| Class | What it means | On chr22 | What an annotator does |
|---|---|---|---|
| Agrees | shares splice junctions with a reference gene | 424 | nothing |
| Merged model | one prediction covers two separate reference genes | 1 | split into two models |
| Structure conflict | covers one gene but shares none of its splice junctions | 3 | check the exon structure |
| Novel locus | predicted where the reference annotates nothing | 12 | assess, then create |
| Novel coding | predicted coding where the reference has only non-coding features | 119 | assess coding potential |
A junction counts as shared when it is an intron of one of the gene's
transcripts. The portal compares exons with genes on the same strand, and counts
a merge only when the genes it joins do not overlap each other. PI4KA is the
control: it spans 152 kb on the minus strand, and SERPIND1 sits inside one of
its introns on the plus strand. Tiberius predicts PI4KA correctly, and the
portal leaves it off the list. GENCODE readthrough genes (one transcript
spanning two neighbours) such as CHKB-CPT1B overlap the genes they join, so
the portal skips them too.
Building the review portal with make-portal.mjs
Clone the pipeline and install it:
git clone https://github.com/cmdcolin/gene-review-portal
cd gene-review-portal
pnpm installmake-portal.mjs reads the two annotations, classifies every model, captures a
JBrowse view at each candidate and writes the page:
# --region: scan one chromosome, fetching the annotations with tabix
# --max: candidates kept per class
# --with-app: bundle JBrowse, so the output needs no network
node bin/make-portal.mjs \
--prediction https://jbrowse.org/genomes/GRCh38/tiberius_grch38.gff.gz \
--reference https://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz \
--fasta https://jbrowse.org/genomes/GRCh38/fasta/hg38.prefix.fa.gz \
--assembly hg38 --region chr22 --max 3 \
--with-app --out ./portalThe output directory holds the page, a JBrowse config, one PNG per candidate
and, with --with-app, a copy of JBrowse. Copy it to any web server to publish.
--rnaseq reads.bam adds an alignment track under every model, in the captures
and in the links; repeat it for more BAMs, and label each with --rnaseq-name.
Reads across the exons of a novel locus support it as a gene.
The example portal has two samples
from the
Griffith lab's RNA-seq course data:
Human Brain Reference and Universal Human Reference, a pool of ten cell lines.
The merged IL17REL/TTLL8 model has more reads in brain, and g13664.t1,
predicted coding over the lncRNA FAM230I, has more in the cell-line pool.
Tiberius has an evidence mode, a Nextflow pipeline that folds proteins, RNA-Seq and Iso-Seq into the prediction. The released human annotation read here comes from a run with default weights, so the RNA-seq tracks are evidence a reviewer judges each model against.
Using the review page: cards, filters and verdicts
The example portal covers chr22. Each card shows the class, the reference genes, the locus and a capture of the two annotations. The filter chips narrow the list to one class, and the verdict buttons record what you decide. Open in JBrowse opens the same view live.
Verdicts stay in your browser, and Export decisions writes them out as TSV.
Building with --apollo <url> adds a second link to every card that opens the
same window in Apollo, the annotation editor,
and an apollo_url column to the exported TSV.
The Disagreements track: junctions that differ from GENCODE
Every capture and live link has a Disagreements track under the prediction, with one box per junction that differs from the reference, labelled with what moved:
g13605.t1:donor-1048g13605.t1 covers CCDC116 with two exons. Its acceptor matches GENCODE, and
its donor is 1,048 bp from any CCDC116 donor.
The track reads data/conflicts.bed, plain BED6 that bedtools also reads. The
file also lists junction edits in models filed as Agrees (a model sharing four
of its five junctions, say), which get no card.
chr22 21636314 21636431 g13605.t1:donor-1048 0 +
chr22 23977067 23977386 g13682.t1:acceptor+3025 0 -
chr22 50012765 50018574 g14001.t1:split 0 -Checking the IL17REL and TTLL8 merge against GENCODE
Query GENCODE for the two genes the Tiberius model merges:
tabix https://jbrowse.org/genomes/GRCh38/gencode/gencode.v47.chr_patch_hapl_scaff.annotation.sorted.gff3.gz \
chr22:49,987,402-50,067,759 |
awk -F'\t' '$3=="gene"' |
grep -E 'IL17REL|TTLL8' |
cut -f1,4,5,7IL17REL ends at 50,012,765 and TTLL8 starts at 50,018,575, both on the minus
strand, and the Tiberius model runs through the gap between them. The same query
at PI4KA returns two genes on opposite strands.
See also
Citations
- Gabriel L, Becker F, Hoff KJ, Stanke M. Tiberius: end-to-end deep learning with an HMM for gene prediction. Bioinformatics 40(12) (2024). https://doi.org/10.1093/bioinformatics/btae685
- Frankish A, et al. GENCODE: reference annotation for the human and mouse genomes at single nucleotide resolution. Nucleic Acids Research (2023). https://doi.org/10.1093/nar/gkac1071
Feedback on this tutorial is welcome: contact us.