So I've never run in to this being a problem before, leading me to suspect something funny may be going on with this particular sample. The problem only became apparent because IndelRealigner through an error about malformed read headers in the BAM file due to the missing mate pair which truncated my pipeline. And yes, I keep all my unmapped reads in my datasets. I'll try this and see if it clears up the problem, I suspect it will.
This is the first time this problem has ever happened for me, after dozens of times of running my exome sequencing mapping, post-processing, and variant calling pipeline. The BAM file that is my output from MarkDuplicates on this single sample is missing mate pairs for many reads apparently. Here is the command line I am using for MarkDuplicates:
java -Xmx4g -jar MarkDuplicates.jar CREATE_INDEX=true INPUT=input.bam OUTPUT=output.bam METRICS_FILE=metrics.txt REMOVE_DUPLICATES=true VALIDATION_STRINGENCY=Lenient
When I check the input BAM file with ValidateSameFile it checks out fine, the output however I get errors about mate not found for paired read. Any ideas? Anyone have this happen to them?
1 answer
Do not use REMOVE_DUPLICATES=true .
Furthermore, you should keep all your reads :-) Should I remove the unmapped reads from my BAM ?
Hi, Dan
I have the same problem as you. Did removing REMOVE_DUPLICATES=true solve the missing pair problem? A follow-up with your problem will be appreciated.
Thanks!
Than
Yes it did. I thought I had originally accepted Pierre's answer as solving the issue. I have done so now.
Log in to answer this question.
This is the behavior I always had with MarkDuplicates when removing them. It generates orphan reads. These orphan reads are unmapped.
Actually, it happens when you have a pair where only one read is mapped. When this mapped read is tagged as a duplicate, MarkDuplicate leaves its unmapped mate in the BAM.