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?
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
4 answers
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
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.
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
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
Log in to answer this question.
try this : Converting Gff To Bed With Bedtools?