Entering edit mode
9.5 years ago
a_biologist
•
0
Hi guys,
Quick question please. I have a snp with a chromosome number and location and would like to access the bam file for that particular snp in search for read numbers of reference and variance forward and reverse. How would I do that using python module pysam?
Thanks a lot in advance,
best.
Why the pysam restriction, if I may ask?
Hi Ram,
Could you please explain to me what do you mean ?
Thanks
Why does the problem need to be solved only using pysam? There has to be some reason to exclude possibly easier solutions that would involve just plain samtools, right?
I want to access the original read count numbers of a particular snp within the bam and to be able to compare the read count numbers with the read numbers in the Variant Calling File for that snp.
You might look at compartmentalizing the problem a bit differently: a tool/pipeline-section (I'll call it a segment) to get read counts for a variant, a segment to fetch the read counts from a VCF file given a variant, and a segment to compare these values. That way, you might use the best tool for each task and get your task done with the least programming required.
Disclaimer: This is my reductionist approach, you are free to experiment with others, of course.
I am working with python and my project is all based on programming that is why I asked for some illustration of using pysam to get the read numbers.
I see. I was just curious :)