sort-bed issue urgent
1
0
Entering edit mode
9.0 years ago
tanni93 ▴ 50

Hi all, I have a bed file named input.bed (excel file with three columns: chr#+start+end --> saved as tab-demilitied --> saved as .bed). When I type "sort-bed input.bed > final.bed" I get this error:

BED row length exceeds capacity at line 1 in final.txt.
Check that you have unix newlines (cat -A) or increase TOKENS_MAX_LENGTH in BEDOPS.Constants.hpp and recompile BEDOPS.

I tried trouble-shooting, this is what I got:

$ wc -l input.bed
       0 input.bed
$ head -n input.bed | cat -A
head: illegal line count -- input.bed
cat: illegal option -- A
usage: cat [-benstuv] [file ...]

Any help would be greatly appreciated! I am very close but I need the bigbed formatted files in an hour! Thank you Biostar community!

RNA-Seq • 2.4k views
ADD COMMENT
0
Entering edit mode

since this is so urgent let me drop everything and get right to it. try:

cat -A input.bed | head

PS. Why did you have to post this in different places?

A: bed to bigBed conversion

ADD REPLY
0
Entering edit mode

This is my output:

cat: illegal option -- A
usage: cat [-benstuv] [file ...]
ADD REPLY
0
Entering edit mode

Hi Apelin20, I have gotten to the last step --> when I use bedToBigBed I am getting this error:

cannot execute binary file

what does this mean? And what can I do now to run this?

ADD REPLY
0
Entering edit mode

Hi Apelin20, I have gotten to the last step --> when I use bedToBigBed I am getting this error:

cannot execute binary file

what does this mean? And what can I do now to run this?

ADD REPLY
0
Entering edit mode

Did you export from Excel on Windows, or export from Excel on Mac? Either way, you have to fix Microsoft-formatted text files to work in UNIX, but please indicate which and I can tell you what to run to fix the problem.

ADD REPLY
1
Entering edit mode
9.0 years ago

You can do the following in the case of exporting from Excel on Mac:

$ tr '\r' '\n' < input.bed > input.fixedLineEndings.txt

If you exported your data from Excel on Windows:

$ tr -d '\r' < input.bed > input.fixedLineEndings.txt

Then you can sort normally:

$ sort-bed input.fixedLineEndings.txt > final.bed

Then, assuming you have downloaded the correct bedToBigBed binary for your platform, you can convert the resulting BED file to bigBed.

ADD COMMENT
0
Entering edit mode

Hi Alex, This works now! Thank you very much!

ADD REPLY

Login before adding your answer.

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