How To Create A Fixed Step Wig File From A Bam File?
2
0
Entering edit mode
10.4 years ago
hlsz.laszlo ▴ 50

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

• 5.6k views
ADD COMMENT
0
Entering edit mode
ADD REPLY
1
Entering edit mode
10.4 years ago
Ian 6.0k

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.

ADD COMMENT
0
Entering edit mode
10.4 years ago
hlsz.laszlo ▴ 50

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

ADD COMMENT

Login before adding your answer.

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