<p>Based on my experience reviewing k-mer counting software and as a core contributor to the khmer project, I can confidently say that there is no widely used standard format.</p>

CC BY-SA 3.0
2017-07-26T17:39:51.333Z
2017-07-26T17:39:51.333Z
Daniel Standage
<p>Not as far as I am aware. The Ray assembler used to (and possibly still does) store the kmers as FASTA files where the header was the count of the sequence, which I thought was a pretty neat bastardisation of the FASTA file format. It looks like this format is also used by Jellyfish when reporting kmer frequencies by the <code>dump</code> command (but its default output format is a custom binary format):</p>

<blockquote>
  <p>The dump subcommand outputs a list of all the k-mers in the file associated with their count. By default, the output is in FASTA format, where the header line contains the count of the k-mer and the sequence part is the sequence of the k-mer. This format has the advantage that the output contains the sequence of k-mers and can be directly fed into another program expecting the very common FASTA format. A more convenient column format (for human beings) is selected with the -c  switch.</p>
</blockquote>

<p><a href="http://www.genome.umd.edu/jellyfish.html" rel="nofollow noreferrer">Jellyfish</a> changed their internal format between v1 and v2 (both not FASTA), because they changed to doing counts based on bloom filters. Jellyfish2 has an optional two-pass method that sets up a bloom filter intermediate file to record kmers, and multiple different final reporting formats.</p>

<p><a href="http://khmer.readthedocs.io/en/v2.1.2/introduction.html" rel="nofollow noreferrer">Khmer</a> also uses bloom filters, but in a slightly different way. It also has been extended to be useful for partitioning and comparing datasets.</p>

CC BY-SA 3.0
2017-07-26T05:13:34.800Z
2017-07-28T01:33:46.580Z
2017-07-28T01:33:46.580Z
gringer
<p>I am doing a research project involving calculating k-mer frequencies and I am wondering if there is any standard file format for storing k-mer counts.</p>

<file-formats><k-mer><phylogenetics>
Is there a standard k-mer count file format?
# Is there a standard k-mer count file format?

(Asked by: username_0 on 2017-07-26)

I am doing a research project involving calculating k-mer frequencies and I am wondering if there is any standard file format for storing k-mer counts.

**Tags:** file-formats, k-mer, phylogenetics

---

## 2 answers

### Answer by username_2 on 2017-07-26. Score: 6 | Accepted answer

Not as far as I am aware. The Ray assembler used to (and possibly still does) store the kmers as FASTA files where the header was the count of the sequence, which I thought was a pretty neat bastardisation of the FASTA file format. It looks like this format is also used by Jellyfish when reporting kmer frequencies by the `dump` command (but its default output format is a custom binary format):

> The dump subcommand outputs a list of all the k-mers in the file associated with their count. By default, the output is in FASTA format, where the header line contains the count of the k-mer and the sequence part is the sequence of the k-mer. This format has the advantage that the output contains the sequence of k-mers and can be directly fed into another program expecting the very common FASTA format. A more convenient column format (for human beings) is selected with the -c switch.

[Jellyfish](http://www.genome.umd.edu/jellyfish.html) changed their internal format between v1 and v2 (both not FASTA), because they changed to doing counts based on bloom filters. Jellyfish2 has an optional two-pass method that sets up a bloom filter intermediate file to record kmers, and multiple different final reporting formats.

[Khmer](http://khmer.readthedocs.io/en/v2.1.2/introduction.html) also uses bloom filters, but in a slightly different way. It also has been extended to be useful for partitioning and comparing datasets.


---

### Answer by username_1 on 2017-07-26. Score: 5

Based on my experience reviewing k-mer counting software and as a core contributor to the khmer project, I can confidently say that there is no widely used standard format.


---

