The general feature format (gene-finding format, generic feature format, GFF) is a file format used for describing genes and other features of DNA, RNA and protein sequences. The filename extension associated with such files is .GFF
.
There are two versions of the GFF file format in general use:
Servers that generate this format:
Clients that use this format:
GFF Version 2 has a number of deficiencies, notably that it can only represent two-level feature hierarchies and thus cannot handle the three-level hierarchy of gene → transcript → exon. GFF3 addresses this and other deficiencies. For example, it supports arbitrarily many hierarchical levels, and gives specific meanings to certain tags in the attributes field.
The Gene transfer format (GTF) is a refinement of GFF Version 2 and is sometimes referred to as GFF2.5.
All GFF formats (GFF2, GFF3 and GTF) are tabular files with 9 fields per line, separated by tabs. They all share the same structure for the first 7 fields, while differing in the definition of the eighth field and in the content and format of the ninth field. The general structure is as follows:
In GFF2 and GTF, the 8th field indicates the frame of the feature, that is, whether the first base of the CDS segment is the first (frame 0), second (frame 1) or third (frame 2) in the codon of the ORF. The formula to derive this attribute is therefore (sum of previous features) mod 3.
Simply put, CDS means "CoDing Sequence". The exact meaning of the term is defined by Sequence Ontology (SO). In GFF3, the 8th field indicates instead the phase of the CDS feature, i.e. according to SO:
where the feature begins with reference to the reading frame. The phase is one of the integers 0, 1, or 2, indicating the number of bases that should be removed from the beginning of this feature to reach the first base of the next codon.
. [N.B.: can't find a reference to this in SO][Found this reference, but don't know how to add it: https://github.com/The-Sequence-Ontology/Specifications/blob/master/gff3.md ]
It is therefore the reverse of the frame: (3 - (sum of previous features) mod 3) mod 3 = (3 - phase) mod 3.