Skip to content

add functionality to write to GFF file #564

@hafiz-ismail

Description

@hafiz-ismail

currently: writeToGTF
add functionality to write to GFF3 format.
define function "writeAnnotations" that uses either write to GTF or write to GFF3

Bambu typically only writes transcript & exon.

  1. Load a bambu-results.rds file (reuse from previous minimal SG-NEx Bambu run on chr22)
  2. Call writeBambuOutput and see how it calls writeToGTF
  3. Define writeToGFF3 helper function based on the above
  4. Define writeAnnotations
  5. adjust writeBambuOutput to take writeAnnotations

Readings
GTF (Ensembl)
GTF (UCSC)

GFF3 (Ensembl)

A comprehensive comparison (AGAT)

On converting GTF to GFF3:

General observations
GTF is equivalent to GFF2.
GFF3 can have file extension gff or gff3
Both are 9-column tab-delimited tabular files

GTF differs from GFF3 mainly in the 9th column (attribute) and the syntax of the key:value pairs.

GTF:

gene_id "GENE1"; transcript_id "TX1", gene_name "BRCA1";
gene_id "GENE1"; transcript_id "TX1", exon_number "1";

GFF3:

ID=TX1;Parent=GENE1;Name=BRCA1;
ID=exon1;Parent=TX1;exon_number=1;

Documentation on what these mean can be found here

Also, GTF attributes have a trailing ; whereas GFF3 does not.

Other differences include

  • GFF3 header
  • GTF column 3 (feature) is constrained to lesser terms than GFF3

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions