I have targeted sequencing alignments bam files. I want to "pull out" only read pairs in which the reads have a variant, i.e. do not perfectly match the reference. It doesn't matter if these are sequencing errors etc.
Any suggestions, simply using samtools would be great but I could find any bam flags for this, a pysam solution would also be great.