def CigarIndex(cigar, pos) :
position = 0
k = 0 # cigar index
addpos = pos # extra positions
for cigartype, cigarlength in cigar :
position += cigarlength
if position < pos :
k += 1
addpos -= cigarlength
else : return k, addpos
# Converts string of cigar symbol characters into the format used by Pysam
评论列表
文章目录