Noisy and non-standard files¶
Real annotation files break the GFF3 specification routinely: gene predictors write GTF without exon rows, browsers write the same transcript id on several contigs, editors add a byte-order mark, and one of the biggest model-organism databases ships its GFF as a tar archive. gffbase reads each of these the way it was meant, in both engines, and says what it did.
Everything on this page applies to mode="compat" (the default). Where the
result differs from gffutils, the difference is declared in
tests/parity/deviations.toml and pinned by a test in
tests/test_noisy_input.py.
Where problems are reported¶
A line gffbase keeps but that breaks a rule is kept and reported: after
create_db, db.warnings lists each one with its line number, kind and
message. A line it cannot use at all – not valid UTF-8, or binary – is
skipped and reported the same way. Under mode="strict" the same problems
raise GFFFormatError instead, naming the line.
Lines and bytes¶
In the file |
What gffbase does |
|---|---|
A UTF-8 byte-order mark |
Ignored; it is not part of the first seqid ( |
Lines ending in a lone |
Every |
A line of only spaces or tabs |
A blank line ( |
A line holding a NUL byte |
Binary data: reported and skipped. A file that is all binary raises
|
A line that is not valid UTF-8 |
Reported and skipped. |
A gzip file, whatever its name ( |
Recognized by content; every member of a bgzip stream is read. |
A truncated or corrupt gzip file |
The complete lines before the damage are read, then
|
A tar archive holding one file (FlyBase’s |
Read as the file it holds. An archive of several files is refused. |
Column 9¶
In the file |
What gffbase does |
|---|---|
|
No attributes ( |
|
The spaces are separator, not data: |
|
The value list is |
Quoted GFF3 values, |
Read as |
GTF from gene predictors and browsers¶
In the file |
What gffbase does |
|---|---|
CDS rows and no exon rows (AUGUSTUS without UTRs, GeneMark) |
Transcripts and genes are inferred from the CDS rows. (gffutils infers
from exons only, so every CDS stays an orphan.) An explicit
|
A row with |
Linked directly to its gene, and reported in |
AUGUSTUS |
Read as that row’s |
An authored transcript with no |
Takes the gene its children name. |
One |
Refused by default with |
|
One inferred gene |
Identifiers¶
In the file |
What gffbase does |
|---|---|
The same |
|
Ids that already end in |
Renames and generated ids skip names the file uses literally, where gffutils fails on a uniqueness constraint. |
Tested on real files¶
Besides the five human corpora the benchmarks use, nine files from other
sources are ingested and fully validated by tests/test_corpus_extended.py:
Ensembl mouse (GFF3 and GTF), NCBI E. coli, FlyBase, WormBase (GFF3 and the
canonical GTF), UCSC knownGene and ncbiRefSeq, and a T2T Liftoff
annotation. See Datasets for where they come from.