Question: convert GFF to GTF?
gravatar for sun.nation
3.1 years ago by
United States
sun.nation120 wrote:

I am trying to convert gff to gtf. I got this from JGI.

scaffold_1      JGI     exon    6764    7298    .       -       .       name "estExt_Genewise1.C_1_t10003"; transcriptId 510443
scaffold_1      JGI     CDS     6997    7298    .       -       2       name "estExt_Genewise1.C_1_t10003"; proteinId 510305; exonNumber 3
scaffold_1      JGI     stop_codon      6997    6999    .       -       0       name "estExt_Genewise1.C_1_t10003"

I used:

gffread genes.gff -T -o genes.gtf

genes.gtf file is like this:

scaffold_1      JGI     exon    1131    1262    .       +       .       transcript_id "name";
scaffold_1      JGI     exon    2725    3036    .       +       .       transcript_id "name";
scaffold_1      JGI     exon    5439    5651    .       +       .       transcript_id "name";
scaffold_1      JGI     exon    19128   19223   .       +       .       transcript_id "name";
scaffold_1      JGI     exon    23365   23825   .       +       .       transcript_id "name";

Why there is "name" instead of actual ID?

gff gtf • 2.6k views
ADD COMMENTlink modified 3.1 years ago • written 3.1 years ago by sun.nation120
gravatar for Juke-34
3.1 years ago by
Juke-343.6k wrote:

I guess gffread doesn't like the gff flavour you are giving as input. The problem comes from the attributes of the 9th column:

in gff3 :

name="e_gw1.5.2.1"; transcript_id=335995

in gff2.5 :

name="e_gw1.5.2.1" transcript_id=335995

in gff2/gtf/gtf2.2 :

name "e_gw1.5.2.1"; transcript_id 335995

in gff? from another source i have seen:

name "e_gw1.5.2.1" transcript_id 335995

in gff1:


So you have to first modify your file to have a gff3 or gff2.5 flavor.

But it will not be needed, what you have at the beginning seems already be the format you want !! You juste have to keep the exon lines and modify transcriptId per transcript_id.

ADD COMMENTlink modified 3.1 years ago • written 3.1 years ago by Juke-343.6k

Thanks I was able to figure out.

ADD REPLYlink written 3.1 years ago by sun.nation120
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1642 users visited in the last hour