Skip to contents

Encapsulates the full precursor -> protein pipeline: AggregateLimpa -> strategy_limpa -> build_model_limpa -> ContrastsLimma.

Takes nested (precursor/peptide-level) LFQData, runs limpa's DPC-based aggregation internally to produce protein-level expression with posterior standard errors, then fits a vooma model with imputation-aware precision weights.

For protein-level input that was already aggregated upstream via AggregateLimpa, use ContrastsLimpaFacade instead.

Value

An R6 class generator.

See also

Other modelling: AnovaExtractor, Contrasts, ContrastsComparison, ContrastsDEqMSFacade, ContrastsDEqMSVoomFacade, ContrastsFacadeBase, ContrastsFirth, ContrastsFirthFacade, ContrastsHurdleFacade, ContrastsHurdleNestedFacade, ContrastsLMFacade, ContrastsLMImputeFacade, ContrastsLimma, ContrastsLimmaFacade, ContrastsLimmaImputeFacade, ContrastsLimmaVoomFacade, ContrastsLimmaVoomImputeFacade, ContrastsLimpaFacade, ContrastsLmerNestedFacade, ContrastsModerated, ContrastsModeratedDEqMS, ContrastsPlotter, ContrastsRLMFacade, ContrastsROPECA, ContrastsROPECANestedFacade, ContrastsROPECAV2, ContrastsROPECAV2NestedFacade, ContrastsRfitFacade, ContrastsRfitImputeFacade, ContrastsTable, INTERNAL_FUNCTIONS_BY_FAMILY, Model, ModelFirth, ModelLimma, StrategyLM, StrategyLimma, StrategyLimpa, StrategyLmer, StrategyLogistf, StrategyRLM, StrategyRfit, build_contrast_analysis(), build_model(), build_model_glm_protein(), build_model_impute(), build_model_limma(), build_model_limma_impute(), build_model_limma_voom(), build_model_limma_voom_impute(), build_model_limpa(), compute_borrowed_variance(), compute_borrowed_variance_limma(), df.residual.rfit_prolfqua(), group_label(), impute_from_model(), impute_refit_singular(), list_facades(), lookup_facade(), lr_test(), merge_contrasts_results(), new_imputed_model(), nobs.rfit_prolfqua(), pivot_model_contrasts_to_wide(), prolfqua_analysis_methods, register_facade(), sigma.rfit_prolfqua(), strategy_limma(), strategy_limpa(), strategy_logistf(), vcov.rfit_prolfqua()

Super classes

ContrastsInterface -> ContrastsFacadeBase -> ContrastsLimpaNestedFacade

Methods

Inherited methods


ContrastsLimpaNestedFacade$new()

initialize

Usage

ContrastsLimpaNestedFacade$new(
  lfqdata,
  modelstr,
  contrasts,
  prefix = "protein",
  dpc_slope = 0.8,
  plot = FALSE,
  span = NULL,
  trend = FALSE,
  robust = FALSE
)

Arguments

lfqdata

nested LFQData (precursor/peptide-level, log2-transformed)

modelstr

model formula string (e.g. "~ group_")

contrasts

named character vector of contrasts

prefix

prefix for the aggregated hierarchy level (default "protein")

dpc_slope

DPC slope parameter passed to AggregateLimpa (default 0.8)

plot

logical; if TRUE, plot the vooma mean-variance trend

span

lowess smoother span (NULL = auto)

trend, robust

passed to eBayes, see strategy_limpa


ContrastsLimpaNestedFacade$clone()

The objects of this class are cloneable with this method.

Usage

ContrastsLimpaNestedFacade$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (requireNamespace("limpa", quietly = TRUE)) {
  istar <- prolfqua::sim_lfq_data_peptide_config(n_proteins = 10)
  lfqdata <- LFQData$new(istar$data, istar$config)
  lfqdata <- lfqdata$get_Transformer()$log2()$lfq
  contrasts <- c("A_vs_Ctrl" = "group_A - group_Ctrl")
  fa <- ContrastsLimpaNestedFacade$new(lfqdata, "~ group_", contrasts)
  head(fa$get_contrasts())
}
#> `protein_Id`: columns `proteinID`, `idtype2` united with separator '~'.
#> creating sampleName from file_name column
#> setup_analysis: dropped 6 unconfigured columns: average_prot_abundance, sd, mean, N, avg_peptide_abd, Replicate.
#> setup_analysis: added 36 rows with NA response for feature and sample combinations absent from the input.
#> Transformed response column added: log2_abundance
#> # A tibble: 6 × 16
#>   modelName    estimate_type protein_Id  contrast     diff      FDR
#>   <chr>        <chr>         <chr>       <chr>       <dbl>    <dbl>
#> 1 limpa_nested observed      0EfVhX~0087 A_vs_Ctrl -0.0280 0.230   
#> 2 limpa_nested observed      7cbcrd~5725 A_vs_Ctrl  0.719  0.0164  
#> 3 limpa_nested observed      9VUkAq~4703 A_vs_Ctrl -0.569  0.00145 
#> 4 limpa_nested observed      BEJI92~5282 A_vs_Ctrl  0.224  0.0198  
#> 5 limpa_nested observed      CGzoYe~2147 A_vs_Ctrl -0.295  0.230   
#> 6 limpa_nested observed      DoWup2~5896 A_vs_Ctrl  0.281  0.000267
#> # ℹ 10 more variables: std.error.unmoderated <dbl>, df.unmoderated <dbl>,
#> #   std.error <dbl>, statistic <dbl>, p.value <dbl>, sigma <dbl>, df <dbl>,
#> #   conf.low <dbl>, conf.high <dbl>, avgAbd <dbl>