Entering edit mode
3.1 years ago
Anst
▴
50
Hello!
I am studying pysam and if have a question: if I have a reference and several reads aligned as will shown below:
pos: 123456789...
ref: AATTCCGTCGTAGC
read1: AAT CGGTC
read2: ATTC TAGC
How can I get all nucleotides of reads which have 'T' in reference sequence?
I tried to collect all indexes of appearance of 'T' in a list (3,4,9,11) and then iterate pileupread.alignment.query_sequence[index] via collected indexes but it doesn't work since index is out of the range.