conversion of GFF3 formate to BED format
4
1
Entering edit mode
6.4 years ago

for finding gene body coverage and other features with RSeQC I need gene annotation file in BED format but my gene annotation file is in GFF3 formate. Can anyone kindly help me how to convert GFF3 format to BED??

many thanks

RNA-Seq • 17k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
5
Entering edit mode
6.4 years ago

Hello,

you could use gff2bed from BEDOPS

$ gff2bed < foo.gff3 > foo.bed

fin swimmer

ADD COMMENT
0
Entering edit mode

Dear finswimmer thank you so much. this suggestion has solved the question and sorry for delayed response. thanks again. but i could not see any sign for accepted/upvote along with you comment to mark it. how to mark?

ADD REPLY
0
Entering edit mode

Hello,

do you use biostars on a mobil device? Than this is sadly at the time not possible. See: Cannot vote in mobil version

fin swimmer

ADD REPLY
0
Entering edit mode

nope. im using on laptop. it was appearing in my very first few posts that i did marked but now i dont see any sign with comments with any of the post. i could only see upvote signs with replies and nothing else.

ADD REPLY
0
Entering edit mode

Have you changed the Zoom? Which browser are you using?

Try Ctrl+0 to reset the text zoom or Ctrl+-.

fin swimmer

ADD REPLY
0
Entering edit mode

ohh... thats realy funny. my mistake sorry.. i found it....

ADD REPLY
6
Entering edit mode
4.7 years ago
Juke34 8.9k

Here a test of the different solutions made on this gff sample:

##gff-version 3
scaffold625 maker   gene    337818  343277  .   +   .   ID=CLUHARG00000005458;Name=TUBB3_2
scaffold625 maker   mRNA    337818  343277  .   +   .   ID=CLUHART00000008717;Parent=CLUHARG00000005458
scaffold625 maker   CDS 337915  337971  .   +   0   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 maker   CDS 340733  340841  .   +   0   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 maker   CDS 341518  341628  .   +   2   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 maker   CDS 341964  343033  .   +   2   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 maker   exon    337818  337971  .   +   0   ID=CLUHART00000008717:exon1;Parent=CLUHART00000008717
scaffold625 maker   exon    340733  340841  .   +   0   ID=CLUHART00000008717:exon2;Parent=CLUHART00000008717
scaffold625 maker   exon    341518  341628  .   +   2   ID=CLUHART00000008717:exon3;Parent=CLUHART00000008717
scaffold625 maker   exon    341964  343277  .   +   2   ID=CLUHART00000008717:exon4;Parent=CLUHART00000008717
scaffold625 maker   five_prime_UTR  337818  337914  .   +   .   ID=CLUHART00000008717:five_prime_utr;Parent=CLUHART00000008717
scaffold625 maker   three_prime_UTR 343034  343277  .   +   .   ID=CLUHART00000008717:three_prime_utr;Parent=CLUHART00000008717
  • transdecoder (install from conda):

gff3_file_to_bed.pl 1_test.gff 2> 1_test_transdecoder.bed

track name='1_test.gff'
scaffold625 337817  343277  ID=CLUHART00000008717;CLUHARG00000005458;TUBB3_2    0   +   337914  343033  0   4   154,109,111,1314    0,2915,3700,4146
  • agat (install from conda):

agat_convert_sp_gff2bed.pl --gff 1_test.gff -o 1_test_agat.bed

scaffold625 337817  343277  CLUHART00000008717  0   +   337914  343033  255,0,0 4   154,109,111,1314    0,2915,3700,4146
  • UCSC (donwloaded from their website):

./gff3ToGenePred.dms 1_test.gff temp.genePred ./genePredToBed.dms temp.genePred 1_test_genePred.bed

scaffold625 337817  343277  CLUHART00000008717  0   +   337914  343033  0   4   154,109,111,1314,   0,2915,3700,4146,
  • bedops (install from conda):

gff2bed < 1_test.gff > 1_test_bedops.bed

scaffold625 337817  337914  CLUHART00000008717:five_prime_utr   .   +   maker   five_prime_UTR  .   ID=CLUHART00000008717:five_prime_utr;Parent=CLUHART00000008717
scaffold625 337817  337971  CLUHART00000008717:exon1    .   +   maker   exon    0   ID=CLUHART00000008717:exon1;Parent=CLUHART00000008717
scaffold625 337817  343277  CLUHARG00000005458  .   +   maker   gene    .   ID=CLUHARG00000005458;Name=TUBB3_2
scaffold625 337817  343277  CLUHART00000008717  .   +   maker   mRNA    .   ID=CLUHART00000008717;Parent=CLUHARG00000005458
scaffold625 337914  337971  CLUHART00000008717:cds  .   +   maker   CDS 0   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 340732  340841  CLUHART00000008717:cds  .   +   maker   CDS 0   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 340732  340841  CLUHART00000008717:exon2    .   +   maker   exon    0   ID=CLUHART00000008717:exon2;Parent=CLUHART00000008717
scaffold625 341517  341628  CLUHART00000008717:cds  .   +   maker   CDS 2   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 341517  341628  CLUHART00000008717:exon3    .   +   maker   exon    2   ID=CLUHART00000008717:exon3;Parent=CLUHART00000008717
scaffold625 341963  343033  CLUHART00000008717:cds  .   +   maker   CDS 2   ID=CLUHART00000008717:cds;Parent=CLUHART00000008717
scaffold625 341963  343277  CLUHART00000008717:exon4    .   +   maker   exon    2   ID=CLUHART00000008717:exon4;Parent=CLUHART00000008717
scaffold625 343033  343277  CLUHART00000008717:three_prime_utr  .   +   maker   three_prime_UTR .   ID=CLUHART00000008717:three_prime_utr;Parent=CLUHART00000008717
ADD COMMENT
0
Entering edit mode
5.6 years ago

TransDecoder (v5.5.0) has an utility script to convert GFF3 to BEDdetails (12 column) format.

perl TransDecoder-v5.5.0/util/gff3_file_to_bed.pl GFF3 > BED12
ADD COMMENT
0
Entering edit mode
9 months ago
alejandrogzi ▴ 140

There is this new tool called gxf2bed that outperforms most of the current tools. See the tool post here

ADD COMMENT

Login before adding your answer.

Traffic: 2431 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