for further analysis (methylation calling and Mbias calculation etc.) I need to determine the intra-read-position of a read base at a given Pileupsite. I'm iterating over a SAM-file via pysam, resulting in a pysam.pileupcolumn Object for every given position. This PileupColumn Object contains as attribute a list of pysam.pileupread objects. For each of those I want to determine the exact position in the read. A pileupread object contains the alignment as attribute in form of a pysam.AlignedSegment object. This AlignedSegment object now has may of the classic SAM-properties such as the CIGAR-String and the query_sequence (WITH softclipped bases). Another attribute of the pileupread class is the query_position which seems pretty nice, however it remains unclear whether this query_position takes softclipped bases into account.
Does anyone know more about this attribute query_position? Has anyone had the same Problem so far?