Please see the file MRDS-with-uncertain-dups.R and instructions therein.