kmers {kmers} R Documentation

Create kmers from a given sequence

Description

Usage

kmers(seq, k);

Arguments

seq

[as string]

k

[as integer]

Details

Authors

seqtoolkit

Value

a character vector of the k-mer sequence fragments, which is generated from the given sequence data via a sliding window of size k, and the step size of the sliding window is just one char, so that all of the generated k-mer fragments are overlapped with each other.

an empty character vector will be returned if the value of the k parameter is greater than the length of the input sequence data.

clr value class

Examples

 imports "kmers" from "seqtoolkit";
 
 # all of the generated k-mers are overlapped:
 # "ATGGC" -> "ATG", "TGG", "GGC"
 print(kmers("ATGGC", k = 3));

[Package kmers version 1.0.0.0 Index]