Learn R Programming

canprot (version 2.0.0)

calc_metrics: Calculate one or more chemical metrics

Description

Calculates selected chemical metrics from amino acid composition(s) of proteins.

Usage

calc_metrics(AAcomp, metrics = c("Zc", "nO2", "nH2O"), ...)

Value

A data frame with the same number of rows as AAcomp and one column of numeric values for each of the metrics. An error is produced if any of the metrics is not available for calculation.

Arguments

AAcomp

data frame with amino acid compositions

metrics

character, chemical metrics to calculate

...

additional arguments passed to individual functions

Details

This is a wrapper function for the functions described at metrics. This wrapper implements case-insensitve matching to the function names (e.g., zc matches Zc). The following additional shortcuts are defined (e.g., length can be used in place of the actual function name, plength):

lengthplength
H/C, H_CHC
N/C, N_CNC
O/C, O_COC
S/C, S_CSC

See Also

metrics

Examples

Run this code
# Define the acid composition of alanylglycine
AG <- data.frame(Ala = 1, Gly = 1)
# Calculate default metrics (Zc, nO2, nH2O)
calc_metrics(AG)
# Calculate selected metrics
calc_metrics(AG, c("H/C", "O/C", "Length"))

Run the code above in your browser using DataLab