Hi,
I am using pysam in python to extract mate reads of a list of target alignments, but get error "ValueError: mate MG01HX01:920:H3YVTCCX2:8:1223:25530:16850: is unmapped". I am just wondering whether pysam can get mate reads for both mapped and unmapped reads? Below is my code. I really appreaciated it if you can give adice for this issue. Thank you!
please advice.
I think you should check your data to ensure that you do have the mate in the BAM file.
And only then troubleshoot the code. Make sure that
MG01HX01:920:H3YVTCCX2:8:1223:25530:16850
can be found twice in the datanow check the flags etc.