utils-sequence {universalmotif} | R Documentation |
Sequence-related utility functions.
get_klets(lets, k = 1L) count_klets(string, k = 1) shuffle_string(string, k = 1, method = c("euler", "linear", "markov"))
lets |
|
k |
|
string |
|
method |
|
For count_klets()
: A data.frame
with columns lets
and counts
.
For get_klets()
: A character
vector of k-lets.
For shuffle_string()
: A single character
string'.
Benjamin Jean-Marie Tremblay, b2tremblay@uwaterloo.ca
create_sequences()
, shuffle_sequences()
####################################################################### ## count_klets ## Count k-lets for any string of characters count_klets("GCAAATGTACGCAGGGCCGA", k = 2) ## The default 'k' value (1) counts individual letters count_klets("GCAAATGTACGCAGGGCCGA") ####################################################################### ## get_klets ## Generate all possible k-lets for a set of characters get_klets(c("A", "C", "G", "T"), 3) ## Note that each element in 'lets' is considered a single unit; ## see: get_klets(c("AA", "B"), k = 2) ####################################################################### ## shuffle_string ## Shuffle any string of characters shuffle_string("ASDADASDASDASD", k = 2)