---
name: "bam_rmdup_collapsed"
section: "1"
platform: "linux"
package: "paleomix"
version: "1.3.8-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bam_rmdup_collapsed"
---

# bam\_rmdup\_collapsed(1)

filter BAM file for PCR duplicates

## NAME

bam\_rmdup\_collapsed - filter BAM file for PCR duplicates

## SYNOPSIS

**paleomix rmdup\_collapsed** \[options\] \< sorted.bam \> out.bam

## DESCRIPTION

The rmdup\_collapsed filters a BAM file for PCR duplicates unpaired reads under the assumption that any unpaired read have been generated by the merging of overlapping paired-end reads, and thereby represent the complete template sequence. PCR duplicates are therefore detected based on both the 5' and 3' alignment coordinate.

Paired reads (0x1), unmapped reads (0x4), secondary alignments (0x100), reads that failed QC (0x200), and chimeric alignments (0x800), as identified using the BAM record flags, are not filtered, but simply written to the output.

By default, filtered reads are flagged using the "duplicate" flag (0x400), and written to the output. Use the **--remove-duplicates** command-line option to instead remove these records from the output.

This program is part of the [paleomix(1)](/paleomix/1.md) suite.

## OPTIONS

### positional arguments:

- input

  BAM file; if not set, input is read from STDIN.

### optional arguments:

- **-h**, **--help**

  show this help message and exit

- **--remove-duplicates**

  Remove duplicates from output; by default duplicates are only flagged (flag = 0x400).

- **--seed** SEED

  Seed used for randomly selecting representative reads when no reads have quality scores assigned\[default: initialized using system time\].

## SEE ALSO

[paleomix(1)](/paleomix/1.md)

## AUTHOR

This manpage was written by Andreas Tille for the Debian distribution and can be used for any other usage of the program.
