SEQanswers (
-   Bioinformatics (
-   -   Aligned position within a read from Samtools mpileup (

BertieWooster 09-24-2012 07:51 AM

Aligned position within a read from Samtools mpileup

Is it possible to infer the aligned position within a read (1-101) of every read in the alignment from a mpileup file?

Thanks for your input!


r-waples 09-24-2012 08:38 AM

Try pysam
I dealt with a similar issue, and the solution I came to was to use pysam (python module) to parse SAM/BAM files directly, rather than trying to make sense of mpileup files after the fact. Pysam will allow you to call samtools pileup and return the results in small chunks that you can do what you want with.

Take a look at this topic, and perhaps pysam in general. If python isn't your cup of tea, this is a general approach that other languages have implemented.

good luck.

All times are GMT -8. The time now is 12:24 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2019, vBulletin Solutions, Inc.