samtools-rmdup(1)

πŸ’… NAME πŸ’…

samtools rmdup β€” removes duplicate reads (obsolete) 🫢


✨ SYNOPSIS ✨

samtools rmdup [-sS] input.srt.bam out.bam

🌸 DESCRIPTION 🌸

okay so first thing first, bestie: this command is obsolete. like, retired. it's giving flip phone in 2026. use markdup instead, fr fr. πŸ“΅

but for the history girlies, here's the lore: rmdup removes potential PCR duplicates. the way it works is that if multiple read pairs have identical external coordinates, it only keeps the pair with the highest mapping quality. one winner, everyone else goes home. πŸ‘‘

now the fine print, and this is important:

  • In paired-end mode, this command ONLY works with FR orientation and it requires ISIZE to be correctly set. no ISIZE, no service. 🚫
  • It does not work for unpaired reads β€” think two ends mapped to different chromosomes, or orphan reads. they just get left out of the whole situation. 😭

πŸŽ€ OPTIONS πŸŽ€

  • -s β€” remove duplicates for single-end reads. by default the command works for paired-end reads only, so this is your little toggle to switch it up. πŸ’…
  • -S β€” treat paired-end reads and single-end reads. both. together. iconic. ✨

πŸ’€ LIMITATIONS πŸ’€

  • Samtools paired-end rmdup does not work for unpaired reads (e.g. orphan reads or ends mapped to different chromosomes). 🫠 if this is a concern, please use Picard's MarkDuplicates, which correctly handles these cases β€” although it's a little slower. (slower but emotionally available, we love that for us πŸ’–)

πŸ‘‘ AUTHOR πŸ‘‘

Written by Heng Li from the Sanger Institute. legend behaviour, no cap. 🌟


πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole page, bestie β€” this one came from samtools-1.24, dated 9 July 2026 πŸ“…. now go use markdup like a main character πŸ’œπŸ§šβœ¨

πŸ“¦ where this page comes from