---
name: "cnvkit-autobin"
section: "1"
platform: "linux"
package: "cnvkit"
version: "0.9.12-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/cnvkit-autobin"
---

# cnvkit-autobin(1)

Quickly calculate reasonable bin sizes from BAM read counts.

## NAME

cnvkit\_autobin - Quickly calculate reasonable bin sizes from BAM read counts.

## DESCRIPTION

usage: cnvkit.py autobin \[-h\] \[-f FILENAME\] \[-m {hybrid,amplicon,wgs}\]

- \[-g FILENAME\] \[-t TARGETS\] \[-b BP\_PER\_BIN\]

  \[--target-max-size BASES\] \[--target-min-size BASES\] \[--antitarget-max-size BASES\] \[--antitarget-min-size BASES\] \[--annotate FILENAME\] \[--short-names\] \[--target-output-bed FILENAME\] \[--antitarget-output-bed FILENAME\] bams \[bams ...\]

### positional arguments:

- bams

  Sample BAM file(s) to test for target coverage

### options:

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

  show this help message and exit

- **-f** FILENAME, **--fasta** FILENAME

  Reference genome, FASTA format (e.g. UCSC hg19.fa)

- **-m** {hybrid,amplicon,wgs}, **--method** {hybrid,amplicon,wgs}

  Sequencing protocol: hybridization capture ('hybrid'), targeted amplicon sequencing ('amplicon'), or whole genome sequencing ('wgs'). Determines whether and how to use antitarget bins. \[Default: hybrid\]

- **-g** FILENAME, **--access** FILENAME

  Sequencing-accessible genomic regions, or exons to use as possible targets (e.g. output of refFlat2bed.py)

- **-t** TARGETS, **--targets** TARGETS

  Potentially targeted genomic regions, e.g. all possible exons for the reference genome. Format: BED, interval list, etc.

- **-b** BP\_PER\_BIN, **--bp-per-bin** BP\_PER\_BIN

  Desired average number of sequencing read bases mapped to each bin. \[Default: 100000.0\]

- **--target-max-size** BASES

  Maximum size of target bins. \[Default: 20000\]

- **--target-min-size** BASES

  Minimum size of target bins. \[Default: 20\]

- **--antitarget-max-size** BASES

  Maximum size of antitarget bins. \[Default: 500000\]

- **--antitarget-min-size** BASES

  Minimum size of antitarget bins. \[Default: 500\]

- **--annotate** FILENAME

  Use gene models from this file to assign names to the target regions. Format: UCSC refFlat.txt or ensFlat.txt file (preferred), or BED, interval list, GFF, or similar.

- **--short-names**

  Reduce multi-accession bait labels to be short and consistent.

- **--target-output-bed** FILENAME

  Filename for target BED output. If not specified, constructed from the input file basename.

- **--antitarget-output-bed** FILENAME

  Filename for antitarget BED output. If not specified, constructed from the input file basename.
