cpv_ranges {agvgd}R Documentation

Determine CPV ranges


This function determines the range (minimum and maximum) values for the three amino acid side chain property values — composition, polarity and molecular volume — from the amino acids at the alignment position of interest.

The alignment passed in alignment must be an already focused alignment of three columns whose second column is the position of interest.


cpv_ranges(alignment, exclude = c("-", "X", NA_character_))



A character matrix or an alignment object obtained with read_alignment(). Rows are expected to be sequences of single characters (protein residues), and columns the alignment positions. The first row must be the reference sequence, i.e. the sequence whose substitutions will be evaluated against.


A vector of character values to be ignored when collecting the amino acids at the position of interest.


A tibble with one single row, of six variables, i.e., the minimum and maximum values for composition (c_min and c_max), polarity (p_min and p_max) and molecular volume (v_min and v_max).

See Also



# You need to first focus the alignment around the position of interest. The
# position of interest is position 4 in the example below. After subsetting
# the alignment, it becomes position 2.
alignment <- read_alignment('ATM')

alignment[, 3:5]

cpv_ranges(alignment[, 3:5])

# If at the position of interest there are symbols other than amino acid
# symbols, e.g. gaps ("-"), then these are ignored and the calculated ranges
# are based only on the observed amino acids.
alignment[, 270:272]

cpv_ranges(alignment[, 270:272])

[Package agvgd version 0.1.2 Index]