Entering edit mode
12.5 years ago
Pierre Lindenbaum
164k
I've generated a wig file for the chr22. The data is a sliding window (window-size=500, every 250pb) starting from pos0=16050276. The windows overlap over 250pb.
$ head input.wig
fixedStep chrom=chr22 start=16050276 step=250 span=500
4
3
5
5
2
3
3
2
3
there is only one header in my file:
$ grep -i -c Step input.wig
1
and there is 140777 lines (including the header)
$ wc -l input.wig
140777 input.wig
length(chr22)=51304566
$ grep chr22 sizes.tsv
chr22 51304566
but when I want to convert my wig to a bigwig file using wigToBigWig, I get the following error:
wigToBigWig input.wig sizes.tsv out.bw
There's more than one value for chr22 base 16306276 (in coordinates that start with 1).
I must be very tired, do you know where is my error ?
Check this post, similar might help you!!
@Sukhdeep so, the wig format doesn't handle the overlapping/sliding windows ?
I dont work with wiggle files (variable & fixed), I use bedgraph format, which I think is more comprehensible and easy to work with. In the end, I convert bedGraphs to bigwig, which is for sure better, in terms of sample management, load on server plus less size.
don't you need 2 columns for wig files? first column is the base position and second column is the count. *edit. nevermind its fixedstep.
Do you have more than one value on a line somewhere? Specifically, check around line 1024: (16306276−16050276)/250 = 1024
or just awk '{print $2}' input.wig | sort | uniq
Hi I am trying to run -
grep -hv 'track' *.wig | wigToBigWig -clip stdin chrom.sizes out.bigwig
Could you please let me know how you fixed the error - There's more than one value for chr2? Thank you.