error-Unexpected file format

2,500 views
Skip to first unread message

Anna

unread,
Nov 15, 2010, 7:12:51 AM11/15/10
to bedtools-discuss
Hi,
I am just wondering that if anyone knows the reason for the error
while using windowBed/insectBed etc...
here is the format i used
windowBed -a macs.bed -b gps.bed
Unexpected file format. Please use tab-delimited BED, GFF, or VCF.
Perhaps you have non-integer starts or ends at line 1?

Also these are few sample lines from bed file.
gps.bed
chrX 136520467 136520477
chr18 50319147 50319157
chr21 9827099 9827109
chr9 42819113 42819123
chrX 108297487 108297497
macs.bed
chr1 27856 29322
chr1 442104 442496
chr1 540185 540811
chr1 564698 565448
chr1 713184 714252
chr1 761694 762974
Any suggestion would be appreciated
thanks
anna

Aaron Quinlan

unread,
Nov 15, 2010, 7:28:17 AM11/15/10
to bedtools...@googlegroups.com
Hi Anna,
I've seen this happen when fields are separated by both a TAB and an extra space prior to or after the start or end coordinates. BEDTools is, out of necessity given the different file formats it supports, very strict about whitespace. Fields in a file must be separated by TAB and only TABs. Here is an example of an entry that would cause this error, perhaps you could check your files for this?

chrX<TAB><SPACE>136520467<TAB><SPACE>136520477

or

chrX<TAB>136520467<SPACE><TAB>136520477<SPACE>


Let me know if the problem persists.
Aaron

Anna

unread,
Nov 15, 2010, 8:15:51 AM11/15/10
to bedtools-discuss
hi Aaron,
Many thanks,, yes now its works fine with me.
regards
anna
> > anna- Hide quoted text -
>
> - Show quoted text -

jwe...@cs.unc.edu

unread,
Jun 28, 2013, 12:14:51 AM6/28/13
to bedtools...@googlegroups.com
I just found that bedtools also requires Unix-style newlines. I got the same error as Anna, but when I ran dos2unix, the error went away. Hopefully this post can help save some poor soul from wasting time looking at whitespace.

apma...@vt.edu

unread,
Mar 4, 2015, 8:25:31 PM3/4/15
to bedtools...@googlegroups.com
I have this exact issue (chrx^I SPACE start^I SPACE end$) from output from R and cannot figure out how to get rid of the space. Any help on this is much appreciated.

Alex

steven...@gmail.com

unread,
Jun 25, 2015, 10:18:06 AM6/25/15
to bedtools...@googlegroups.com, apma...@vt.edu
Hi! Did you ever find a solution to this?

Aaron Quinlan

unread,
Jul 28, 2015, 11:32:06 AM7/28/15
to bedtools...@googlegroups.com, apma...@vt.edu
The cause of this type of error are typically hidden characters, extra, non-TAB whitespace in one of the files, or line endings from a different OS (e.g., \r\n from Windows being used on UNIX which expects \n).

I hope this helps,
Aaron

--
You received this message because you are subscribed to the Google Groups "bedtools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bedtools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages