Skip to contents

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.

Usage

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

Arguments

alignment

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.

exclude

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

Value

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

Examples

# 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]
#> Hsap_ATM_AAB65827.1  1 SLV
#> Mmus_ATM_NP_031525.2 1 SLA
#> Sscr_ATM_AAT01608.1  1 SLA
#> Mdom_ATM_IARC        1 SLA
#> Ggal_ATM_edited      1 SLV
#> Xlae_ATM_AAT72929.1  1 SLA
#> Drer_ATM_IARC_v2     1 SLA
#> Bflo_ATM_IARC        1 DLL
#> Spur_ATM_ABY60856.1  1 EVL

cpv_ranges(alignment[, 3:5])
#> # A tibble: 1 × 6
#>   c_min c_max p_min p_max v_min v_max
#>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1     0     0   4.9   5.9    84   111

# 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]
#> Hsap_ATM_AAB65827.1  1 QHR
#> Mmus_ATM_NP_031525.2 1 QHR
#> Sscr_ATM_AAT01608.1  1 QHR
#> Mdom_ATM_IARC        1 QQR
#> Ggal_ATM_edited      1 QYR
#> Xlae_ATM_AAT72929.1  1 MQR
#> Drer_ATM_IARC_v2     1 GMR
#> Bflo_ATM_IARC        1 N-R
#> Spur_ATM_ABY60856.1  1 S-N

cpv_ranges(alignment[, 270:272])
#> # A tibble: 1 × 6
#>   c_min c_max p_min p_max v_min v_max
#>   <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1     0  0.89   5.7  10.5    85   136