Question: How to extract properly paired alignments from a bam file using samtools?
3
gravatar for pedrodcb
4.7 years ago by
pedrodcb50
Canada
pedrodcb50 wrote:

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)
ADD COMMENTlink written 4.7 years ago by pedrodcb50
1
gravatar for Ashutosh Pandey
4.7 years ago by
Philadelphia
Ashutosh Pandey11k wrote:

Hint: samtools view -f2 

ADD COMMENTlink written 4.7 years ago by Ashutosh Pandey11k

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 REPLYlink written 4.7 years ago by pedrodcb50
1

https://broadinstitute.github.io/picard/explain-flags.html

http://blog.nextgenetics.net/?e=18

ADD REPLYlink written 4.7 years ago by Ashutosh Pandey11k

samtools view -f 0x02 also works

ADD REPLYlink written 16 months ago by Kevin Blighe51k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 871 users visited in the last hour