Question: convert GFF to GTF?
1
gravatar for sun.nation
2.1 years ago by
sun.nation120
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.1k views
ADD COMMENTlink modified 2.1 years ago • written 2.1 years ago by sun.nation120
2
gravatar for Juke-34
2.1 years ago by
Juke-342.0k
Sweden
Juke-342.0k 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:

ID1

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 2.1 years ago • written 2.1 years ago by Juke-342.0k

Thanks I was able to figure out.

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

Help
Access

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