'Degenerates' n-grams by aggregating amino acid or nucleotide elements into bigger groups.
degenerate_ngrams(x, element_groups, binarize = FALSE)
object containing n-grams.
encoding of elements: list of groups to which elements of n-grams should be aggregated. Must have unique names.
logical indicating if n-grams should be binarized
A character
vector or matrix (if input is a matrix)
containing degenerated n-grams.