Wigtobigwig: What'S Wrong With My Wig File ?
0
1
Entering edit mode
12.3 years ago

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 ?

wiggle bigwig • 6.9k views
ADD COMMENT
1
Entering edit mode

Check this post, similar might help you!!

ADD REPLY
0
Entering edit mode

@Sukhdeep so, the wig format doesn't handle the overlapping/sliding windows ?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

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

ADD REPLY
0
Entering edit mode

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.

ADD REPLY

Login before adding your answer.

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