In SAM file I get, there are some flag value that dose not make sense:
101 1+4+32+64 means first read, unmapped with direction+ ; mate read mapped with direction -
117 1+4+16+32+64 means this is the fist read, unmapped but with direction -; mate read mapped with direction +
153 1+8+16+128 means this is the second read, mapped with direction -; mate read unmapped with direction +
185 1+8+16+32+128 means this is the second read, mapped with direction -; mate read unmapped with direction -
My question is that if the read or mate-read is unmapped, how could SAM file also report its direction? What is the meaning of unmapped read direction, what is the difference between unmapped read with direction + and -.
Small correction, the information about direction is only meaningful for the mapped read. It can still be set for an unmapped read, but should just be ignored. Always check 0x4 or 0x8 and ignore the remainder accordingly.
Thanks, that make sense.