From Bam To Wig Format (Not Pileup - Samtools)
1
1
Entering edit mode
12.2 years ago
Bioinfguy ▴ 30

Hello,

I have bam files and I need to convert it to wig format to be like this:

variableStep chrom=chr2
300701 12.5
300702 12.5
300703 12.5
300704 12.5
300705 12.5

I know that there is an options in samtools called: pileup or mpileup, but it doesn't work well with me for the following reason:

if only some nucleotides of a read is mapped to a genome, it reports coverage equally to all nucleotides of that read. I need to report only coverage for mapped nucleotides within the read, do u know any other tool that make this?

Thanks,

samtools • 4.0k views
ADD COMMENT
1
Entering edit mode

So you want to get coverage of only matched bases in reads and skip all the mismatched bases? I don't think there is really an easy way to do that. But I don't think the resulting wig file will be very informative. Reads should be considered mapped or not mapped as an individual unit, not as series of bases. If 99% of a read matches, the 1% could be SNP, but should also be considered in your wig file as covered.

ADD REPLY
1
Entering edit mode
10.3 years ago

My program bam2wig uses the cigar string to produce a wiggle file.

ADD COMMENT

Login before adding your answer.

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