Learn R Programming

BALCONY (version 0.2.10)

Escore_conservativity: Calculate the Escore conservation metric

Description

This function facilitates the calculation of Escore conservation metric (in amino acid or group mode)

Usage

Escore_conservativity(alignment, grouping_method = NULL, weights = NULL,pseudo_counts=F)

Arguments

alignment

Alignment data read with read.alignment function

grouping_method

(optional) A string which specifies the grouping method to be used. One of following: 'substitution_matrix', 'polarity', 'size', 'aromaticity', default: NULL

weights

(optional) A vector of length equal number of sequences in the alignment object with weights to overcome the taxonomic bias in the conservation analysis.

pseudo_counts

(optional) A logical indicating if pseudo-counts should be added to the MSA. Pseudo-counts can be used only in non-group mode and without weights. Using these options with pseudo-counts will be suppressed. Default: FALSE

Value

conservation_score

A vector of length equal to the length of aligned sequences

Details

The conservativity score is calculated according to the following formula: $$P(i) = max(p(i))/n(i)$$ $$Pnorm(i) = P(i)/max(P)$$ $$score = -ln(P_norm(i))/max(-ln(P_norm))$$ where: \(p(i)\) - amino acids frequency on i-th position where gaps are included \(n(i)\) - amino acids count on i-th position where gaps are excluded

Examples

Run this code
# NOT RUN {
data("small_alignment")
# }
# NOT RUN {
conservation_score = Escore_conservativity(alignment)
# }

Run the code above in your browser using DataLab