Question: sort-bed issue urgent
0
gravatar for tanni93
20 months ago by
tanni9310
United States
tanni9310 wrote:

 

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 • 524 views
ADD COMMENTlink modified 20 months ago by Alex Reynolds19k • written 20 months ago by tanni9310

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 REPLYlink modified 20 months ago • written 20 months ago by apelin20460

This is my output:

cat: illegal option -- A

usage: cat [-benstuv] [file ...] 

 

ADD REPLYlink written 20 months ago by tanni9310

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 REPLYlink written 20 months ago by tanni9310

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 REPLYlink written 20 months ago by Alex Reynolds19k
0
gravatar for tanni93
20 months ago by
tanni9310
United States
tanni9310 wrote:

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 COMMENTlink written 20 months ago by tanni9310
0
gravatar for Alex Reynolds
20 months ago by
Alex Reynolds19k
Seattle, WA USA
Alex Reynolds19k wrote:

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 COMMENTlink modified 20 months ago • written 20 months ago by Alex Reynolds19k

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

ADD REPLYlink written 20 months ago by tanni9310
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1163 users visited in the last hour