Hello,
I used bwa to do the alignment, and the resulting file is a sam file for my pair-end reads. I counted the number of properly-paired reads (-f 0x0001 -f 0x0002), and also counted reads with -f 99, 147, 163, 83 individually, and found they match each other very well.
I then applied a set of filters to remove the multi-aligned reads, and PCR/optical duplicate reads. After the filtering, I found that many originally properly paired reads are no longer paired. I wish to extract only the properly paired reads from my filtered files. What shall I do? I used -f flag option, but found the filtering procedures actually just removed the reads, but did not modify the f flag. I also tried fixmate in samtools, but still got the same results, with the pairing flag not getting updated.
Do you have any suggestion on this? Many thank in advance!
I used bwa to do the alignment, and the resulting file is a sam file for my pair-end reads. I counted the number of properly-paired reads (-f 0x0001 -f 0x0002), and also counted reads with -f 99, 147, 163, 83 individually, and found they match each other very well.
I then applied a set of filters to remove the multi-aligned reads, and PCR/optical duplicate reads. After the filtering, I found that many originally properly paired reads are no longer paired. I wish to extract only the properly paired reads from my filtered files. What shall I do? I used -f flag option, but found the filtering procedures actually just removed the reads, but did not modify the f flag. I also tried fixmate in samtools, but still got the same results, with the pairing flag not getting updated.
Do you have any suggestion on this? Many thank in advance!