Learn R Programming

kmeRtone (version 1.0)

countKmers: Count k-mers from string(s) using a simple hash table.

Description

Count only observed k-mers. Biostrings::oligonucleotideFrequency reports all possible k-mers. For k > 12, the memory for creating empty k-mer counts spiked and crashed the R session.

Usage

countKmers(sequences, k)

Value

A vector of k-mer counts. The counts of multiple sequences are combined, similar to Biostrings::oligonucleotideFrequency simplify.as "collapsed".

Arguments

sequences

Sequence strings.

k

Size of k-mer.