This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Extract improperly paired read from BAM file

Hi, I want to do manual checking on my BAM file after getting the statistic from samtools flagstat. I tried to extract the improperly paired read but failed to do so far.

I tried to use awk to extract read not contain 2 flagstat, but it's not working because the flagstat is bitwise and combined.

Thank you for your advice.

alignment

1 answer

Don't use awk. Use samtools view.

Log in to answer this question.