Description Usage Arguments Value Author(s)
Takes in a single long kmer, for example a 26mer, and returns the composite shorter kmers for some k, for example, all the 10mers within the 26mer. It is designed to be used to unwrap a dense representation of the kmers: for example, given the 26mers every 19 base pairs, we can quickly extract all 8mers.
1  | unwrap_kmers(kmer, old_len = 26, new_len = 8, base = 4, num_kmers = 0L)
 | 
kmer | 
 A number representing a single large kmer, with k = old_len  | 
old_len | 
 The length of the kmer represented by kmer (ie k)  | 
new_len | 
 The length of the kmers we want to extract, eg, if we want 8mers, new_len = 8  | 
base | 
 The length of the alphabet. For normal DNA sequence this is 4.  | 
num_kmers | 
 The number of the new kmers to return. The functions returns the first num_kmers in the vector. Default value is 0, which returns all kmers.  | 
A vector of doubles (actually integers represented as doubles), representing all the (new_len)-mers contained within the single (old_len)-mer.
Tom Mayo t.mayo@ed.ac.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.