Why presets exist
Most digest-scoring tools expose a fixed set of assumptions. Real experiments do not. A targeted assay, a membrane-protein workflow, and an FFPE rescue experiment do not value the same peptide properties to the same degree.
pepvet_preset() packages three related decisions into
one object.
- the valid peptide-length window
- the acceptable GRAVY window
- the component weight vector
The returned object keeps the scoring settings explicit and editable.
score_peptides() records the resolved workflow label in
preset_used. When a call exactly matches one of pepVet’s
shipped presets, the function reports that preset name. Otherwise it
reports "custom".
Available presets
pepvet_preset("standard")
#> $gravy_range
#> [1] -1.0 0.6
#>
#> $length_range
#> [1] 7 25
#>
#> $weights
#> S_length S_coverage S_count S_hydro S_charge S_unique
#> 0.200 0.348 0.226 0.138 0.088 0.000
#>
#> $include_pI
#> [1] FALSE| Preset | Intended use | Key change |
|---|---|---|
standard |
Routine DDA | Default expert-prior weights |
dia |
DIA and SWATH |
[7,30] aa, GRAVY [-1,0.8], high coverage
weight |
targeted |
SRM, PRM, MRM |
[8,20] aa, GRAVY [-0.8,0.4],
S_unique 30% |
membrane |
Hydrophobic proteins | Length [7,30], GRAVY [-1.0,2.0],
S_hydro 5% |
ffpe_degraded |
Degraded material |
[6,30] aa, higher S_count weight |
fractionated |
Offline fractionation | Standard settings with pI annotation |
Standard workflow
The standard preset contains the package defaults for
routine peptide-centric proteomics.
standard <- pepvet_preset("standard")
do.call(
evaluate_digest,
c(list(sequence = bsa_path, enzyme = "trypsin", missed_cleavages = 1L), standard)
)$scores
#> # A tibble: 1 × 12
#> protein_id S_length S_coverage S_count S_hydro S_charge composite_score
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 sp|P02769|ALBU_B… 0.688 0.997 1 0.769 0.778 0.885
#> # ℹ 5 more variables: verdict <chr>, median_peptide_length <dbl>,
#> # preset_used <chr>, n_high_efficiency_sites <int>,
#> # n_low_efficiency_sites <int>DIA workflow
The dia preset assigns more weight to coverage, widens
the valid length window to 30 aa, and extends the GRAVY window to
.
These values encode a broader inclusion prior for DIA workflows. They
are not calibrated detection boundaries.
syn_proteome <- digest_protein(syn_path, enzyme = "trypsin")
dia <- pepvet_preset("dia")
do.call(
evaluate_digest,
c(list(sequence = syn_path, enzyme = "trypsin", proteome = syn_proteome), dia)
)$scores
#> # A tibble: 3 × 13
#> protein_id S_length S_coverage S_count S_hydro S_charge S_unique
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 sp|P37840|SYUA_HUMAN Al… 0.548 0.693 1 1 0.706 0
#> 2 sp|P37840-2|SYUA_HUMAN … 0.613 1 1 0.895 0.684 0.105
#> 3 sp|P37840-3|SYUA_HUMAN … 0.519 0.659 1 1 0.643 0.214
#> # ℹ 6 more variables: composite_score <dbl>, verdict <chr>,
#> # median_peptide_length <dbl>, preset_used <chr>,
#> # n_high_efficiency_sites <int>, n_low_efficiency_sites <int>Targeted workflow
The targeted preset assigns more weight to
S_unique and requires a relevant comparison proteome. It
uses a narrower length and GRAVY window than the standard preset.
proteome <- digest_protein(syn_path, enzyme = "trypsin")
targeted <- pepvet_preset("targeted")
do.call(
evaluate_digest,
c(list(sequence = syn_path, enzyme = "trypsin", proteome = proteome), targeted)
)$scores
#> # A tibble: 3 × 13
#> protein_id S_length S_coverage S_count S_hydro S_charge S_unique
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 sp|P37840|SYUA_HUMAN Al… 0.516 0.693 1 0.812 0.688 0
#> 2 sp|P37840-2|SYUA_HUMAN … 0.581 1 1 0.722 0.667 0.111
#> 3 sp|P37840-3|SYUA_HUMAN … 0.481 0.659 1 0.692 0.615 0.231
#> # ℹ 6 more variables: composite_score <dbl>, verdict <chr>,
#> # median_peptide_length <dbl>, preset_used <chr>,
#> # n_high_efficiency_sites <int>, n_low_efficiency_sites <int>Without a proteome digest, pepVet cannot calculate a non-zero uniqueness component and raises an error.
Membrane workflow
The membrane preset extends the GRAVY window to
,
extends the length window to
,
and lowers the S_hydro weight to 5%. These settings reduce
the score penalty for hydrophobic peptides. They remain workflow priors
and do not predict peptide observation.
pepvet_preset("membrane")
#> $gravy_range
#> [1] -1 2
#>
#> $length_range
#> [1] 7 30
#>
#> $weights
#> S_length S_coverage S_count S_hydro S_charge S_unique
#> 0.25 0.25 0.20 0.05 0.15 0.10
#>
#> $include_pI
#> [1] FALSEThe preset changes how the score treats hydrophobic peptides. It does not predict whether the digest will succeed experimentally.
Degraded samples
The ffpe_degraded preset lowers the minimum length to 6
aa and increases the S_count weight. This configuration
includes more short products and gives peptide count more influence on
the composite score. It does not model formalin chemistry or degradation
directly.
pepvet_preset("ffpe_degraded")
#> $gravy_range
#> [1] -1.0 0.8
#>
#> $length_range
#> [1] 6 30
#>
#> $weights
#> S_length S_coverage S_count S_hydro S_charge S_unique
#> 0.2 0.2 0.3 0.1 0.1 0.1
#>
#> $include_pI
#> [1] FALSEUse this preset only when the sample context justifies it. A wider
window changes the meaning of S_length,
S_coverage, and S_count.
Editing a preset
Presets are plain R lists. Copy one and change the fields required by the workflow.
custom_fractionated <- pepvet_preset("fractionated")
custom_fractionated$weights["S_coverage"] <- 0.30
custom_fractionated$weights["S_hydro"] <- 0.10
custom_fractionated$weights <-
custom_fractionated$weights / sum(custom_fractionated$weights)
do.call(
evaluate_digest,
c(list(sequence = bsa_path, enzyme = "chymotrypsin-high"), custom_fractionated)
)$scores
#> # A tibble: 1 × 13
#> protein_id S_length S_coverage S_count S_hydro S_charge composite_score
#> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
#> 1 sp|P02769|ALBU_B… 0.477 0.590 0.840 0.549 0.863 0.649
#> # ℹ 6 more variables: verdict <chr>, median_peptide_length <dbl>,
#> # preset_used <chr>, n_high_efficiency_sites <int>,
#> # n_low_efficiency_sites <int>, pI <list>Presets are data, not hidden state. You can inspect, store, version, and modify them without changing package internals.
Interpreting presets
The preset name records the assumptions used for a score. It does not make scores from different configurations directly comparable.
When presets help
Presets provide a recorded starting configuration when:
- You need a starting point for a new assay.
- You want comparisons to stay consistent across a panel of proteins.
- You need to explain why a score changed when the workflow changed.
If a membrane target receives a higher score only after widening the GRAVY window, the recorded configuration shows which assumption changed.
Cross-preset interpretation
Do not compare composite scores across different presets as if they
were on one universal scale. A standard score and a
targeted score can differ because the weight vector,
peptide-length window, and GRAVY window changed, not because the protein
became intrinsically better or worse.
Use preset_used when saving or comparing results.
Compare scores only when the resolved scoring configuration matches.
Presets are starting points, not experimentally fitted parameter sets. Modify them when the workflow requires different assumptions.
Session info
sessionInfo()
#> R version 4.6.1 (2026-06-24)
#> Platform: x86_64-pc-linux-gnu
#> Running under: Ubuntu 24.04.4 LTS
#>
#> Matrix products: default
#> BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3
#> LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so; LAPACK version 3.12.0
#>
#> locale:
#> [1] LC_CTYPE=C.UTF-8 LC_NUMERIC=C LC_TIME=C.UTF-8
#> [4] LC_COLLATE=C.UTF-8 LC_MONETARY=C.UTF-8 LC_MESSAGES=C.UTF-8
#> [7] LC_PAPER=C.UTF-8 LC_NAME=C LC_ADDRESS=C
#> [10] LC_TELEPHONE=C LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C
#>
#> time zone: UTC
#> tzcode source: system (glibc)
#>
#> attached base packages:
#> [1] stats graphics grDevices utils datasets methods base
#>
#> other attached packages:
#> [1] pepVet_0.99.1
#>
#> loaded via a namespace (and not attached):
#> [1] vctrs_0.7.3 crayon_1.5.3 cli_3.6.6
#> [4] knitr_1.51 rlang_1.3.0 xfun_0.60
#> [7] otel_0.2.0 generics_0.1.4 textshaping_1.0.5
#> [10] jsonlite_2.0.0 glue_1.8.1 S4Vectors_0.51.5
#> [13] Biostrings_2.81.5 htmltools_0.5.9 stats4_4.6.1
#> [16] ragg_1.5.2 sass_0.4.10 cleaver_1.51.0
#> [19] rmarkdown_2.31 Seqinfo_1.3.0 tibble_3.3.1
#> [22] evaluate_1.0.5 jquerylib_0.1.4 fastmap_1.2.0
#> [25] IRanges_2.47.2 yaml_2.3.12 lifecycle_1.0.5
#> [28] compiler_4.6.1 fs_2.1.0 pkgconfig_2.0.3
#> [31] XVector_0.53.0 systemfonts_1.3.2 digest_0.6.39
#> [34] R6_2.6.1 utf8_1.2.6 pillar_1.11.1
#> [37] magrittr_2.0.5 bslib_0.11.0 tools_4.6.1
#> [40] pkgdown_2.2.1 BiocGenerics_0.59.10 cachem_1.1.0
#> [43] desc_1.4.3