create_encoding: Create encoding

Description Usage Arguments Details Value See Also Examples

View source: R/create_encoding.R

Description

Reduces an alphabet using physicochemical properties.

Usage

1
create_encoding(prop, len)

Arguments

prop

matrix of properties with number of column equal to the length of the alphabet. Column must be named after elements of the alphabet. Each row represents a different physicochemical property.

len

length of the resulting encoding. Must be larger than zero and smaller than number of elements in the alphabet.

Details

The encoding is a list of groups to which elements of an alphabet should be reduced. All elements of the alphabet (all amino acids or all nucleotides) should appear in the encoding.

Value

An encoding.

See Also

calc_ed: calculate the encoding distance between two encodings. encoding2df: converts an encoding to a data frame. validate_encoding: validate a structure of an encoding.

Examples

1
2
3
enc1 = list(`1` = c("a", "t"), 
            `2` = c("g", "c"))
encoding2df(enc1)

biogram documentation built on March 31, 2020, 5:14 p.m.