Mean Position Of Variant Within Reads - Samtools
2
0
Entering edit mode
8.8 years ago
aswathyseb ▴ 30

Hi all,

I am very new to this forum and also new to do variant calling. I am using samtools mpileup|bcftools|vcfutils.pl commands for this.

I need to find the mean position of variant (or positions of the variant) within supporting reads. Does anyone know how to obtain this?

-AS

samtools bioinformatics variant-calling mpileup • 2.2k views
1
Entering edit mode
8.8 years ago

You can use that java program I wrote for biostars:

position of mismatches per read from a sam/bam file

and extract the positions of the mismatch:

<M read-index="13" read-base="G" ref-index="15" ref-base="A"/>


before calculating the mean value "read-index" of the positions.

0
Entering edit mode

Hi Pierre,

After reading a lot and testing , I think I better understand your answer. Thank you very much. In that case, getting the tail distance would be an approximation, right? Thanks again -AS

0
Entering edit mode
8.8 years ago
aswathyseb ▴ 30

Hi Pierre,

Thank you for the quick reply.

But taking the mismatches from the bam/sam file is not really an 'snp call', right? From, what I understood, the snp call is made later with bcftools command producing 'bcf/vcf 'files. In that case, isn't the mismatches be taken from bcf/vcf files? Please correct me if I am wrong?

Thanks -AS

0
Entering edit mode

this should be a comment. Not a new answer.