Question: Errors with sort-bed
0
gravatar for catherine12243
5.0 years ago by
United States
catherine12243120 wrote:

I have bigwig file downloaded from GEO, and convert it to wig file using bigwigToWig

(ftp://hgdownload.cse.ucsc.edu/apache/htdocs-rr/goldenPath/help/bigWig.html). And when I want to used sort-bed command in BEDOPS, it gives me error like this:

Non-numeric start coordinate.  See line 1025 in GSM723005_H3K4me1-MEF.wig.

​But I checked manually and didn't find anything wrong in this file. 

If I don't use sort-bed, but just use convert it to bed file by myself, then run BEDOPS, it returns me empty output file (although I think the file is already sorted).

Any idea what went wrong to my procedure?

Thank you very much!​

chip-seq bedops • 1.3k views
ADD COMMENTlink modified 5.0 years ago by Alex Reynolds29k • written 5.0 years ago by catherine12243120
1

first convert your wig file into bed, I would suggest to use wig2bed from bedops.

then run sort-bed command on your converted file

 

ADD REPLYlink written 5.0 years ago by Manvendra Singh2.1k

yeah! i got it. tHANK YOU

ADD REPLYlink written 5.0 years ago by catherine12243120

are you trying to sort a WIG file with a sort-BED tool ??

ADD REPLYlink written 5.0 years ago by Pierre Lindenbaum124k

yeah, Im trying to use sort-bed in BEDOPS, it is said the input could be wig file.

ADD REPLYlink written 5.0 years ago by catherine12243120
2

No, It does not say that.

It says that ""The sort-bed utility requires one or more three-column BED file(s). Support for common headers (such as UCSC BED track headers) is included, although headers will be stripped from the output ""

ADD REPLYlink written 5.0 years ago by Manvendra Singh2.1k

"Sorting arbitrarily large BED files is easy with sort-bed, which easily scales beyond available system memory, as needed. We also offer portable conversion scripts that transform data in common genomic formats (SAM/BAM, GFF/GTF, PSL, WIG, and VCF) to sorted BED data that are ready to use with core BEDOPS utilities."

http://bedops.readthedocs.org/en/latest/content/overview.html#bedops-tools-are-flexible

Its misleading 

ADD REPLYlink written 5.0 years ago by catherine12243120
3
gravatar for Alex Reynolds
5.0 years ago by
Alex Reynolds29k
Seattle, WA USA
Alex Reynolds29k wrote:

Sounds like you need to do something like:

$ wig2bed < GSM723005_H3K4me1-MEF.wig > GSM723005_H3K4me1-MEF.wig.bed

Like most BEDOPS apps, the wig2bed application exports sorted data by default, so you shouldn't need to pipe to sort-bed.

You would need to sort if you explicitly set wig2bed not to sort, as in the following:

$ wig2bed --do-not-sort < GSM723005_H3K4me1-MEF.wig | sort-bed - > GSM723005_H3K4me1-MEF.wig.bed

See wig2bed --help for a description and listing of options.

ADD COMMENTlink written 5.0 years ago by Alex Reynolds29k
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: 1605 users visited in the last hour