How to extract properly paired alignments from a bam file using samtools?
1
3
Entering edit mode
9.2 years ago
pedrodcb ▴ 90

This is what samtools flagstat returns :

87410692 + 0 in total (QC-passed reads + QC-failed reads)
17796957 + 0 secondary
0 + 0 supplimentary
0 + 0 duplicates
87410692 + 0 mapped (100.00%:-nan%)
69613735 + 0 paired in sequencing
34834040 + 0 read1
34779695 + 0 read2
19690094 + 0 properly paired (28.28%:-nan%)
65530882 + 0 with itself and mate mapped
4082853 + 0 singletons (5.87%:-nan%)
4317734 + 0 with mate mapped to a different chr
2061682 + 0 with mate mapped to a different chr (mapQ>=5)
samtools • 6.7k views
ADD COMMENT
1
Entering edit mode
9.2 years ago

Hint: samtools view -f2

ADD COMMENT
0
Entering edit mode

Thank you for your answer Ashutosh, if it's not to much to ask would you care to explain me why? I am new to all of this, I have just started a bachelor in bioinformatics. Thank you!

ADD REPLY
1
Entering edit mode

samtools view -f 0x02 also works

ADD REPLY

Login before adding your answer.

Traffic: 1697 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6