Handled secondary alignments with pysam API instead of a system call