---
name: "DefineClones.py"
section: "1"
platform: "linux"
package: "changeo"
version: "1.3.0-3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/DefineClones.py"
---

# DefineClones.py(1)

Repertoire clonal assignment toolkit (Python 3)

## NAME

DefineClones.py - Repertoire clonal assignment toolkit (Python 3)

## DESCRIPTION

usage: DefineClones.py \[--version\] \[-h\] **-d** DB\_FILES \[DB\_FILES ...\]

- \[-o OUT\_FILES \[OUT\_FILES ...\]\] \[--outdir OUT\_DIR\]

  \[--outname OUT\_NAME\] \[--log LOG\_FILE\] \[--failed\] \[--format {airr,changeo}\] \[--nproc NPROC\] \[--sf SEQ\_FIELD\] \[--vf V\_FIELD\] \[--jf J\_FIELD\] \[--gf GROUP\_FIELDS \[GROUP\_FIELDS ...\]\] \[--mode {allele,gene}\] \[--act {first,set}\] \[--model {ham,aa,hh\_s1f,hh\_s5f,mk\_rs1nf,mk\_rs5nf,hs1f\_compat,m1n\_compat}\] \[--dist DISTANCE\] \[--norm {len,mut,none}\] \[--sym {avg,min}\] \[--link {single,average,complete}\] \[--maxmiss MAX\_MISSING\]

Assign Ig sequences into clones

### help:

- **--version**

  show program's version number and exit

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

  show this help message and exit

### standard arguments:

- **-d** DB\_FILES \[DB\_FILES ...\]

  A list of tab delimited database files. (default: None)

- **-o** OUT\_FILES \[OUT\_FILES ...\]

  Explicit output file name. Note, this argument cannot be used with the **--failed**, **--outdir**, or **--outname** arguments. If unspecified, then the output filename will be based on the input filename(s). (default: None)

- **--outdir** OUT\_DIR

  Specify to changes the output directory to the location specified. The input file directory is used if this is not specified. (default: None)

- **--outname** OUT\_NAME

  Changes the prefix of the successfully processed output file to the string specified. May not be specified with multiple input files. (default: None)

- **--log** LOG\_FILE

  Specify to write verbose logging to a file. May not be specified with multiple input files. (default: None)

- **--failed**

  If specified create files containing records that fail processing. (default: False)

- **--format** {airr,changeo}

  Specify input and output format. (default: airr)

- **--nproc** NPROC

  The number of simultaneous computational processes to execute (CPU cores to utilized). (default: 8)

### cloning arguments:

- **--sf** SEQ\_FIELD

  Field to be used to calculate distance between records. Defaults to junction (airr) or JUNCTION (changeo). (default: None)

- **--vf** V\_FIELD

  Field containing the germline V segment call. Defaults to v\_call (airr) or V\_CALL (changeo). (default: None)

- **--jf** J\_FIELD

  Field containing the germline J segment call. Defaults to j\_call (airr) or J\_CALL (changeo). (default: None)

- **--gf** GROUP\_FIELDS \[GROUP\_FIELDS ...\]

  Additional fields to use for grouping clones aside from V, J and junction length. (default: None)

- **--mode** {allele,gene}

  Specifies whether to use the V(D)J allele or gene for initial grouping. (default: gene)

- **--act** {first,set}

  Specifies how to handle multiple V(D)J assignments for initial grouping. The "first" action will use only the first gene listed. The "set" action will use all gene assignments and construct a larger gene grouping composed of any sequences sharing an assignment or linked to another sequence by a common assignment (similar to single-linkage). (default: set)

- **--model** {ham,aa,hh\_s1f,hh\_s5f,mk\_rs1nf,mk\_rs5nf,hs1f\_compat,m1n\_compat}

  Specifies which substitution model to use for calculating distance between sequences. The "ham" model is nucleotide Hamming distance and "aa" is amino acid Hamming distance. The "hh\_s1f" and "hh\_s5f" models are human specific single nucleotide and 5-mer content models, respectively, from Yaari et al, 2013. The "mk\_rs1nf" and "mk\_rs5nf" models are mouse specific single nucleotide and 5-mer content models, respectively, from Cui et al, 2016. The "m1n\_compat" and "hs1f\_compat" models are deprecated models provided backwards compatibility with the "m1n" and "hs1f" models in Change-O v0.3.3 and SHazaM v0.1.4. Both 5-mer models should be considered experimental. (default: ham)

- **--dist** DISTANCE

  The distance threshold for clonal grouping (default: 0.0)

- **--norm** {len,mut,none}

  Specifies how to normalize distances. One of none (do not normalize), len (normalize by length), or mut (normalize by number of mutations between sequences). (default: len)

- **--sym** {avg,min}

  Specifies how to combine asymmetric distances. One of avg (average of A-\>B and B-\>A) or min (minimum of A-\>B and B-\>A). (default: avg)

- **--link** {single,average,complete}

  Type of linkage to use for hierarchical clustering. (default: single)

- **--maxmiss** MAX\_MISSING

  The maximum number of non-ACGT characters (gaps or Ns) to permit in the junction sequence before excluding the record from clonal assignment. Note, under single linkage non-informative positions can create artifactual links between unrelated sequences. Use with caution. (default: 0)

### output files:

-

  clone-pass

-

  database with assigned clonal group numbers.

-

  clone-fail

-

  database with records failing clonal grouping.

### required fields:

-

  sequence\_id, v\_call, j\_call, junction

### output fields:

-

  clone\_id

## AUTHOR

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