Samtools Read Coverage At Bp And Call % At Each Base
1
0
Entering edit mode
11.8 years ago
diltsjeri ▴ 470

Hi,

I've spent the last two days reading material on samstools, but I can't seem to figure out a way to get the calls (% of each base) at each base position. When I use mpileup I am able to get the position, reference base, and the number of times a read covers that position, but not %base calls at each position. The only way I can figure to do this would be to write a perl script for the sam file, which has all the read sequences and their positions and use this information to figure the percentage on my own. Before I get started doing this, I wanted to be sure I wasn't missing a method/option in samstools that would make my live easier.

Thanks!

samtools read coverage • 2.5k views
ADD COMMENT
0
Entering edit mode
11.8 years ago

In the VCF generated with SAMTOOLS there is an INFO tag named 'DP4'

DP4 Number of 1) forward ref alleles; 2) reverse ref; 3) forward non-ref; 4) reverse non-ref alleles, used in variant calling. Sum can be smaller than DP because low-quality bases are not counted.

see http://samtools.sourceforge.net/mpileup.shtml

Furtheremore the pileup format ( http://samtools.sourceforge.net/pileup.shtml ) contains a column named 'read bases'.

ADD COMMENT
0
Entering edit mode

The pileup format would help me, but I which option would give me that output?

Here http://samtools.sourceforge.net/samtools.shtml it says "In the pileup format (without -uor-g)". I'm not using -u or -g option. I'm only using -f.

Command.

samtools mpileup -f $reference $sorted_bam > $mpileup
ADD REPLY

Login before adding your answer.

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