This is a test version of Biostars. For the public version, visit https://www.biostars.org.
How to check whether the mate read is fully mapped or not?

Hello,

For paired-end reads, after aligned to reference. I can know whether a read is fully mapped or not by checking the "CIGAR" option. Is there any way to directly check whether the mate read is fully mapped or not?

In sam/bam specification, there is a option "MC Z CIGAR string for mate/next segment". Doesn't any alignment tool can report this "MC" field? It seems BWA doesn't report this field.

Thank you

Chong

alignment next-gen sequence

1 answer

That information can be inferred from the bit-flag value, in particular 0x2 and 0x8 flags. Check the documentation.

Hi JC,

Thank you for your reply. From the bit-flag value, we can only know whether the mate read is mapped or not, but we don't know whether is fully mapped or not. If a read is soft-clipped, it is also reported as mapped, right? I want to check whether the mate read is fully mapped or not.

Chong

I see, then there are not other way to check it except in the CIGAR. You can sort your BAM file by read_id with `samtools -n` and check the pairs.

Log in to answer this question.