Samtools: Mark Duplicates

Identify and mark duplicate reads in BAM files.

Accepted format: .bam

Mark Duplicates

Function:

Mark Duplicates is a commonly used step in next-generation sequencing (NGS) data processing that identifies and flags duplicate reads generated during PCR amplification. Duplicate reads can artificially inflate coverage and introduce bias into downstream analyses such as variant calling and expression quantification.

Rather than removing duplicate reads, the tool marks them using alignment flags so that downstream applications can ignore them when necessary.

Input Format:

  • BAM File (.bam)
  • CRAM File (.cram)

Input files should typically be coordinate-sorted before running duplicate marking.

Output Format:

  • Marked BAM File (.bam) containing duplicate flags.
  • Metrics File containing duplicate statistics and summary information.

Example Workflow:

# Sort BAM file
samtools sort input.bam -o sorted.bam

# Mark duplicates
samtools markdup sorted.bam marked_duplicates.bam

# View duplicate statistics
samtools flagstat marked_duplicates.bam

Applications:

  • Improves accuracy of variant calling analyses.
  • Reduces PCR amplification bias.
  • Enhances quality control of sequencing datasets.
  • Supports reliable SNP and INDEL detection.
  • Assesses library complexity and sequencing quality.
  • Standard preprocessing step for WGS, WES, RNA-Seq, ChIP-Seq, and other NGS workflows.

Output Example:

READ1  FLAG=1024
READ2  FLAG=0
READ3  FLAG=1024

Reads marked with flag 1024 are identified as duplicate reads.

Advantages:

  • Prevents duplicate reads from influencing analyses.
  • Improves confidence in detected variants.
  • Provides duplication metrics for quality assessment.
  • Maintains original read information without deletion.

Suggested Reading:

Picard MarkDuplicates Documentation: MarkDuplicates Manual

Samtools Markdup Documentation: Samtools Markdup Manual

Citation:

If you use duplicate marking in your workflow, please cite:

Broad Institute. Picard Toolkit. Available at: https://broadinstitute.github.io/picard/
Li, H., Handsaker, B., Wysoker, A., Fennell, T., Ruan, J., Homer, N., et al. (2009). The Sequence Alignment/Map (SAM) format and SAMtools. Bioinformatics, 25(16), 2078–2079. DOI: 10.1093/bioinformatics/btp352