uniqueKmers: Generate Unique K-mer Sequences

Description Usage Arguments Value Author(s)

View source: R/uniqueKmers.R

Description

This simple function returns a vector of all unique k-mers of a specified length, filtered to remove reverse complement redundancy such that, e.g. only one of "AA" and "TT" is kept. When deciding between a k-mer and the reverse complement, the alphabetically earlier sequence is kept. In the example above, "AA" will be kept because "AA" occurs before "TT".

Note, this function is not meant to be used for k > 10 as the computational cost of the approach can quickly grow to be too much. By default, an error willbe thrown if k > 10 is specified. This can be overriden by setting largek = TRUE.

Usage

1
uniqueKmers(k = 8L, .largek = FALSE)

Arguments

k

an integer length of oligonucleotide sequences to be returned. (default = 8L)

.largek

a logical value whether to allow specifying a large k, i.e. k > 10L. (default = FALSE)

Value

Vector of unique k-mer strings.

Author(s)

Patrick Kimes


pkimes/upbm documentation built on Oct. 17, 2020, 9:10 a.m.