I have a RNA-seq bam file and there are few reads that are puzzling me.
According to the bam header, this bam file is sorted by coordinate, created using tophat and markduplicate step is not done. But some reads are marked for being duplicate in the samflag. What is worse is when I run picard markduplicate, these reads' pcr duplicate flag is toggled, marking them not a duplicate. Also I manually found the duplicate of this read (identical reads with same start positions and mates start position) so initial marking looks true.
So my questions are:
Any idea why would this happen?
Does Tophat mark reads for being duplicate? ( I don't think so)
And does picard markduplicate
toggle the duplicate flag if the reads are already marked as being duplicates?
Here is how the read looks before and after mark duplicate step.
Before:
C0RTF 1187 17 7579880 255 61M10754N40M = 7579927 10902 CTC...
0UNP1 163 17 7579880 255 61M10754N40M = 7579927 10902 CTC...
After Markduplicate:
C0RTF 163 17 7579880 255 61M10754N40M = 7579927 10902 CTC...
0UNP1 163 17 7579880 255 61M10754N40M = 7579927 10902 CTC...
isDuplicate
is false. Not if it is already true. Am I missing something? $\endgroup$