convert GFF to GTF?
2
1
Entering edit mode
7.8 years ago
sun.nation ▴ 140

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 • 3.9k views
ADD COMMENT
2
Entering edit mode
7.8 years ago
Juke34 8.9k

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 COMMENT
0
Entering edit mode

Thanks I was able to figure out.

ADD REPLY

Login before adding your answer.

Traffic: 1555 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6