Oops those were from my notes dates 5 years back my bad. edited my answer.
How to extract alignments with 0 mismatch from sam or bam file by using samtools?
I have a single-ended sam files generated from bwa with default settings for NIPT calculation. How can I extract a sam or bam files that contains only alignments that have 0 mismatch by using samtools?
• 4,701 views
•
link
2 answers
samtools view -e '[NM]==0' -O BAM -o out.bam in.bam
requires a recent version of samtools.
• 0 views
•
link
• 0 views
•
link
Log in to answer this question.