calc_metrics {canprot} | R Documentation |
Calculates selected chemical metrics from amino acid composition(s) of proteins.
calc_metrics(AAcomp, metrics = c("Zc", "nO2", "nH2O"), ...)
AAcomp |
data frame with amino acid compositions |
metrics |
character, chemical metrics to calculate |
... |
additional arguments passed to individual functions |
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
):
length | plength |
H/C , H_C | HC |
N/C , N_C | NC |
O/C , O_C | OC |
S/C , S_C | SC |
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.
# 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"))