FIMO GFF output to standard BED
1
0
Entering edit mode
7.8 years ago
rbronste ▴ 420

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.

enter image description here

ChIP-Seq FIMO motif sequencing • 3.1k views
ADD COMMENT
3
Entering edit mode
7.8 years ago

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.

ADD COMMENT
0
Entering edit mode

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!

ADD REPLY
0
Entering edit mode

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?

ADD REPLY
0
Entering edit mode

Its what FIMO outputs and calls GFF. I guess its non standard.

ADD REPLY
1
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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