recommend_enzyme() calls compare_digests() and returns the name of the
enzyme with the highest composite score. When two or more enzymes are tied,
all tied enzyme names are returned in alphabetical order. It is a compact
model-ranking result for scripted triage that stays aligned with
compare_digests().
Usage
recommend_enzyme(
sequence,
enzymes = c("trypsin", "lysc"),
missed_cleavages = 1L,
proteome = NULL,
weights = NULL,
...
)Arguments
- sequence
A single-protein input passed to
compare_digests(). IfNULLor empty, raises an error.- enzymes
Character vector of unique enzyme names to compare. Defaults to
c("trypsin", "lysc").- missed_cleavages
Maximum missed cleavages. Defaults to
1L.- proteome
Optional proteome digest tibble for uniqueness scoring. When
NULL(default), no uniqueness scoring.- weights
Optional scoring weight vector. When
NULL(default), uses pepVet's default scoring weights.- ...
Additional scoring arguments passed to
compare_digests()and ultimately toevaluate_digest()andscore_peptides().
Value
A character vector of one or more enzyme names. Length greater than one only when top scores are tied within floating-point tolerance.
Limitations
Single-protein only. When multiple enzymes tie within tolerance, all are returned in alphabetical order with no further tie-breaking. The result is not an experimental recommendation.
Examples
bsa_path <- system.file("extdata", "P02769.fasta", package = "pepVet")
recommend_enzyme(bsa_path, enzymes = c("trypsin", "lysc"))
#> [1] "trypsin"
