I know samtools rmdup is obsolete and markdup should be used instead. My old pipeline used rmdup and now I'm trying to upgrade it to use markdup.
When comparing the results between these two, using default settings, rmdup removes more reads on my test dataset (188M vs 185M remaining). I'm checking the manual, it looks like markdup by default removes PCR duplicates and not optical duplicates, I think that's what rmdup does too. (rmdup does not have an option for dealing with optical reads).
Where does this difference come from? How can I reproduce results similar to samtools rmdup using samtools markdup.