This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Convert bed12 to GFF

There are several posts online about converting a GFF/GTF to BED12 but is there any way to go the other direction and convert BED12 to GFF?

bed gff bed12

Hi there, I tried out genometools "gt bed_to_gff3 file.bed > out.gff" but it is giving a funny error about "gt bed_to_gff3: error: file "file.bed": line 116470: BED feature has length 0" but the file does not have a line 116470, it is only half that many lines. I dunno where to check for debugging it

I was able to get the BED_to_GFF app that I assume the raetsch lab created at the galaxy server here to work https://galaxy.inf.ethz.ch/ but it is corrupt (the children have same ID as parents) and outputs gtf/gff2 instead of gff3

Could you paste your BED file?

3 answers

use bedToGenePred & genePredToGtf UCSC Kent tools: http://hgdownload.cse.ucsc.edu/admin/exe/macOSX.x86_64/

bedToGenePred.dms  infile.bed  outfile.gpf 

genePredToGtf.dms "file" infile.gpf  outfile.gtf

Hi! This tool: https://github.com/alejandrogzi/bed2gtf does exactly what you need! It overcomes some limitations of using C binaries.

This tool returns nothing for my file, no errors, no output.

nice work on bed2gff...managed to use it! potentially might make some feature requests but otherwise works well

There is also AGAT that has a convenient bed to gff script (can also produce GTF): https://agat.readthedocs.io/en/latest/tools/agat_convert_bed2gff.html

I tried atat_convert_bed2gff.pl and it worked well.

Log in to answer this question.