---
name: "kmc"
section: "1"
platform: "linux"
package: "kmc"
version: "3.2.4+dfsg-1+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/kmc"
---

# kmc(1)

count kmers in genomic sequences

## NAME

kmc - count kmers in genomic sequences

## DESCRIPTION

KMC—K-mer Counter is a utility designed for counting k-mers (sequences of consecutive k symbols) in a set of reads from genome sequencing projects.

## SYNOPSIS

kmc \[options\] \<input\_file\_name\> \<output\_file\_name\> \<working\_directory\>

kmc \[options\] \<@input\_file\_names\> \<output\_file\_name\> \<working\_directory\>

## OPTIONS

**-v** - verbose mode (shows all parameter settings); default: false

**-k**\<len\> - k-mer length (k from 1 to 256; default: 25)

**-m**\<size\> - max amount of RAM in GB (from 1 to 1024); default: 12

**-sm** - use strict memory mode (memory limit from **-m**\<n\> switch will not be exceeded)

**-hc** - count homopolymer compressed k-mers (approximate and experimental)

**-p**\<par\> - signature length (5, 6, 7, 8, 9, 10, 11); default: 9

**-f**\<a/q/m/bam/kmc\> - input in FASTA format (**-fa**), FASTQ format (**-fq**), multi FASTA (**-fm**) or BAM (**-fbam**) or KMC(**-fkmc**); default: FASTQ

**-ci**\<value\> - exclude k-mers occurring less than \<value\> times (default: 2)

**-cs**\<value\> - maximal value of a counter (default: 255)

**-cx**\<value\> - exclude k-mers occurring more of than \<value\> times (default: 1e9)

**-b** - turn off transformation of k-mers into canonical form

**-r** - turn on RAM-only mode

**-n**\<value\> - number of bins

**-t**\<value\> - total number of threads (default: no. of CPU cores)

**-sf**\<value\> - number of FASTQ reading threads

**-sp**\<value\> - number of splitting threads

**-sr**\<value\> - number of threads for 2nd stage

**-j**\<file\_name\> - file name with execution summary in JSON format

**-w** - without output

**-o**\<kmc/kff\> - output in KMC of KFF format; default: KMC

**-hp** - hide percentage progress (default: false)

**-e** - only estimate histogram of k-mers occurrences instead of exact k-mer counting

**--opt-out-size** - optimize output database size (may increase running time)

## EXAMPLES

kmc **-k27** **-m24** NA19238.fastq NA.res /data/kmc\_tmp\_dir/

kmc **-k27** **-m24** @files.lst NA.res /data/kmc\_tmp\_dir/

## AUTHOR

kmc was originally written by:

Sebastian Deorowicz (sebastian.deorowicz@polsl.pl)

Marek Kokot

Szymon Grabowski

Agnieszka Debudaj-Grabysz

## COPYING

KMC is a free software distributed under GNU GPL3 licence for academic, research, and commercial use.
