summarize_batch() extracts aggregate statistics from a batch_evaluate()
result tibble. Returns a named list with verdict distribution, score
distribution, per-component averages, the lowest-scoring proteins, and a
heuristic set of enzyme-switch candidates.
Arguments
- batch_result
A tibble returned by
batch_evaluate(). IfNULLor empty, raises an error.
Value
A named list with five elements:
verdict_countsA tibble with columns
verdict,n, andpctcovering the three verdict categories.score_distributionA named numeric vector with
mean,median,sd,q25,q75,min, andmaxof composite scores.component_summaryA named numeric vector of per-component mean scores. The lowest values identify the weakest scoring dimension across the proteome.
problem_proteinsA tibble of proteins in the bottom 10% by composite score, ordered ascending, with all score and flag columns.
enzyme_switch_candidatesA tibble of Moderate or Poor proteins where
flag_hydrophobicorflag_short_proteinisTRUE. These rows are candidates for direct comparison with another enzyme or preset.
Details
enzyme_switch_candidates is a heuristic flag list derived from
sequence-level difficulty flags, not from running alternative enzymes.
Use compare_digests() to confirm whether a specific alternative enzyme
improves the verdict for a flagged protein.
Limitations
The enzyme_switch_candidates are heuristic flags based on sequence
difficulty, not actual re-evaluation with alternative enzymes. Use
compare_digests() to confirm whether a switch improves the verdict.
Examples
small_path <- system.file(
"extdata", "small_proteome_50_proteins.fasta",
package = "pepVet"
)
batch <- batch_evaluate(small_path, enzyme = "trypsin")
summary <- summarize_batch(batch)
summary$verdict_counts
#> # A tibble: 3 × 3
#> verdict n pct
#> <chr> <int> <dbl>
#> 1 Good 40 80
#> 2 Moderate 9 18
#> 3 Poor 1 2
summary$component_summary
#> S_length S_coverage S_count S_hydro S_charge
#> 0.4850442 0.6888812 0.9188799 0.6323869 0.7019852
