Hi,
Wondering how to convert FIMO output GFF to standard BED. Using one converter it still looks partially like the FIMO GFF output. Giving an example. Want to split the chr name start and stop obviously. Thanks.
Hi,
Wondering how to convert FIMO output GFF to standard BED. Using one converter it still looks partially like the FIMO GFF output. Giving an example. Want to split the chr name start and stop obviously. Thanks.
BEDOPS gff2bed might be of use: http://bedops.readthedocs.io/en/latest/content/reference/file-management/conversion/gff2bed.html
$ gff2bed < in.gff > out.bed
Edit: Hmm. Well, whatever you have, it looks like you could use awk
to parse and sort-bed
to make it a sorted BED6 file:
$ awk 'BEGIN { OFS="\t"; } { n = split($1, a, /[:-]/); print a[1],a[2],a[3],$4,$2,$6; }' in.gff | sort-bed - > out.bed
You could rearrange or renumber columns if you wanted something else in the score field.
Bonus note: If FIMO-flavored GFF coordinates are 1-based, you may want to subtract one from the stop field (a[3]
) to make the coordinates in the BED file zero-indexed.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
That still unfortunately gives a BED file where the first column has the combined Chr-Start-Stop. I basically need to be able to separate those as in a regular BED file. Not sure why FIMO has such a weird output!
The
gff2bed
script I include in BEDOPS exports a BED file per UCSC specifications. The format you are describing does not follow UCSC specifications, so I'm not sure what other converter you are running instead, or if what you are providing as input is not GFF. Do you have some other kind of file format in hand, perhaps?Its what FIMO outputs and calls GFF. I guess its non standard.
That doesn't look like GFF to me, but I could be wrong. Still, I edited my answer to include a different approach that might help.