I've looked through the documentation for samtools and pysam but haven't found what I'm looking for. Pysam can check if
read.is_secondary which returns true if the read is not primary alignment. Whilst in samtools, I think the corresponding flag is:
256 0x100 secondary alignment
But what I'm looking for is a way to view/filter reads that are mapped to multiple regions, is there a way to do this with samtools or pysam?