For a given position, in which there is a variant called by some algorithm, I want to get the pileup and analyse the reads supporting that variant. Any idea on how to do this in R? I know how to do this in Python using pysam but I need an R implementation.
Thanks!
What is the pysam functionality you want to reproduce, specifically? A few lines of code would help.
For a given position, I want to read the pileup and when there is a match to the variant, I want to get the mapping coordinates of the read matching the variant. I do not have the exact code yet, but it would imply something like:
By doing that I can access information about each read and relate that to the presence/absence of a variant match