Skip to contents

Limpa contrast analysis facade for nested input

Limpa contrast analysis facade for nested input

Value

An R6 class generator.

Details

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.

See also

Other modelling: AnovaExtractor, Contrasts, ContrastsDEqMSFacade, ContrastsDEqMSVoomFacade, ContrastsFacadeBase, ContrastsFirth, ContrastsFirthFacade, ContrastsFirthNestedFacade, ContrastsLMFacade, ContrastsLMImputeFacade, ContrastsLMMissingFacade, ContrastsLimma, ContrastsLimmaFacade, ContrastsLimmaImputeFacade, ContrastsLimmaVoomFacade, ContrastsLimmaVoomImputeFacade, ContrastsLimpaFacade, ContrastsLmerNestedFacade, ContrastsMissing, ContrastsModerated, ContrastsModeratedDEqMS, ContrastsPlotter, ContrastsRLMFacade, ContrastsROPECA, ContrastsROPECANestedFacade, ContrastsRfitFacade, ContrastsRfitImputeFacade, ContrastsTable, INTERNAL_FUNCTIONS_BY_FAMILY, LR_test(), Model, ModelFirth, ModelLimma, StrategyLM, StrategyLimma, StrategyLimpa, StrategyLmer, StrategyLogistf, StrategyRLM, StrategyRfit, build_contrast_analysis(), build_model(), build_model_glm_peptide(), 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(), build_model_logistf(), compute_borrowed_variance(), compute_borrowed_variance_limma(), compute_contrast(), compute_lmer_contrast(), contrasts_fisher_exact(), df.residual.rfit_prolfqua(), get_anova_df(), get_complete_model_fit(), get_p_values_pbeta(), group_label(), impute_refit_singular(), is_singular_lm(), linfct_all_possible_contrasts(), linfct_factors_contrasts(), linfct_from_model(), linfct_matrix_contrasts(), list_facades(), lookup_facade(), merge_contrasts_results(), model_analyse(), model_summary(), moderated_p_deqms(), moderated_p_deqms_long(), moderated_p_limma(), moderated_p_limma_long(), new_imputed_model(), pivot_model_contrasts_to_wide(), plot_lmer_peptide_predictions(), register_facade(), sigma.rfit_prolfqua(), sim_build_models_lm(), sim_build_models_lmer(), sim_build_models_logistf(), sim_make_model_lm(), sim_make_model_lmer(), strategy_limma(), strategy_limpa(), strategy_logistf(), summary_ROPECA_median_p.scaled(), unregister_facade(), vcov.rfit_prolfqua()

Super classes

prolfqua::ContrastsInterface -> prolfqua::ContrastsFacadeBase -> ContrastsLimpaNestedFacade

Public fields

model

ModelLimma object (from build_model_limpa)

contrast

ContrastsLimma object

.lfqdata

stored reference to the aggregated protein-level LFQData

.lfqdata_nested

stored reference to the original nested input

.contrast_names

names of the requested contrasts

Methods

Inherited methods


Method new()

initialize

Usage

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

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)

...

passed to strategy_limpa (e.g. trend, robust)


Method 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(Nprot = 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())
}
#> creating sampleName from file_name column
#> completing cases
#> completing cases done
#> setup done
#> Column added : log2_abundance
#> completing cases
#> # A tibble: 6 × 14
#>   modelName    estimate_type protein_Id  contrast     diff       FDR std.error
#>   <chr>        <chr>         <chr>       <chr>       <dbl>     <dbl>     <dbl>
#> 1 limpa_nested observed      0EfVhX~0087 A_vs_Ctrl -0.0244 0.407        0.0283
#> 2 limpa_nested observed      7cbcrd~5725 A_vs_Ctrl  0.725  0.00458      0.185 
#> 3 limpa_nested observed      9VUkAq~4703 A_vs_Ctrl -0.572  0.000276     0.0991
#> 4 limpa_nested observed      BEJI92~5282 A_vs_Ctrl  0.236  0.0138       0.0739
#> 5 limpa_nested observed      CGzoYe~2147 A_vs_Ctrl -0.296  0.146        0.175 
#> 6 limpa_nested observed      DoWup2~5896 A_vs_Ctrl  0.282  0.0000889    0.0417
#> # ℹ 7 more variables: statistic <dbl>, p.value <dbl>, sigma <dbl>, df <dbl>,
#> #   conf.low <dbl>, conf.high <dbl>, avgAbd <dbl>