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!
1 answer
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.
Log in to answer this question.
are you trying to sort a WIG file with a sort-BED tool ??
yeah, Im trying to use sort-bed in BEDOPS, it is said the input could be wig file.
No, It does not say that.
It says that
http://bedops.readthedocs.org/en/latest/content/overview.html#bedops-tools-are-flexible
It's misleading
First, convert your wig file into bed. I would suggest to use
wig2bedfrom bedops.Then run
sort-bedcommand on your converted fileyeah! i got it. tHANK YOU