---
name: "bamfilterrg.py"
section: "1"
platform: "linux"
package: "bamkit"
version: "0.0.1+git20170413.ccd079d-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/bamfilterrg.py"
---

# bamfilterrg.py(1)

filter readgroup(s) from a BAM file

## NAME

bamfilterrg.py - filter readgroup(s) from a BAM file

## SYNOPSIS

**bamfilterrg.py** \[-h\] \[-i BAM\] \[-r STR\] \[-n INT\] \[-S\] \[-b\] \[-u\]

## DESCRIPTION

filter readgroup(s) from a BAM file

## OPTIONS

### optional arguments:

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

  show this help message and exit

- **-i** BAM, **--input** BAM

  Input BAM file

- **-r** STR, **--readgroup** STR

  Read group(s) to extract (comma separated)

- **-n** INT

  Output first n alignments and quit

- **-S**

  Input is SAM format

- **-b**

  Output BAM format

- **-u**

  Output uncompressed BAM format (implies **-b**)

## AUTHOR

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