Learn R Programming

biogram (version 1.6.3)

regenerate: Regenerate n-grams

Description

'Regenerates' amino acid or nucleic sequence written in a simplified alphabet by converting groups to regular expression.

Usage

regenerate(x, element_groups)

Arguments

x

character string representing single n-gram.

element_groups

encoding of elements: list of groups to which elements of sequence should be aggregated. Must have unique names.

Value

A character string representing a POSIX regular expression.

See Also

degenerate to easily convert information stored in biological sequences from letters to numbers. calc_ed to calculate distance between simplified alphabets.

Examples

Run this code
# NOT RUN {
regenerate("ssw", list(w = c(1, 4), s = c(2, 3)))
# }

Run the code above in your browser using DataLab