calc_metrics {canprot} | R Documentation |
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"), ...)
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
):
length | plength |
H/C , H_C | HC |
N/C , N_C | NC |
O/C , O_C | OC |
S/C , S_C | SC |
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.
See Also
Examples
# 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"))
[Package canprot version 2.0.0 Index]