Does this mean that I have to convert the Bam file into sam file first? I wonder whether there is a way to remove reads unmapped in proper pair.
• 0 views
•
link
Can anyone tell me how to remove reads whose mate does not map as expected? I know GATK is able to do this.
There is an option fixmate in samtools, but it could not be used to remove the reads I described above.
Does this mean that I have to convert the Bam file into sam file first? I wonder whether there is a way to remove reads unmapped in proper pair.
You can input a BAM or SAM file:
samtools view -f 2 -o foo_proper-pairs.bam foo.bam
samtools view -f 2 -bS -o foo_proper-pairs.bam foo.sam
[this was meant to be a comment on the previous reply]
Log in to answer this question.