Hi all,
I just want to know how to create a fixed step wig file from a bam file. I read a lot but couldnt find the answer. I want to create several wigs with the same row and position with the signal values.
What is the easiest way?
Thanks a lot. L
Hi all,
I just want to know how to create a fixed step wig file from a bam file. I read a lot but couldnt find the answer. I want to create several wigs with the same row and position with the signal values.
What is the easiest way?
Thanks a lot. L
This is a quick answer that I may be able to fill in later.
You can convert the BAM file into a bedGraph coverage file using 'bedtools genomecov' using the '-ibam' flag to input the BAM file and the '-bg' flag to output as a bedGraph. You will also need the length of the chromosomes/contigs of your reference sequence.
For the next step you can use a script that I have previously used to convert bedGraph to fixed WIG (http://davetang.org/wiki/tiki-index.php?page=wig). Be aware that this creates a nucleotide resolution WIG file so it will be huge. You can either take every 10th line or alter the code somehow.
I hope this helps.
Thank you, Ian. I'll give it a try. I used igvtools count to create X windowed wigs, but it differs between expreiments in rows.
L
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
cross posted : http://seqanswers.com/forums/showthread.php?t=36241