Skip to contents

Encapsulates the pipeline: strategy_lm -> build_model -> Contrasts -> ContrastsModerated -> ContrastsROPECAV2.

Like ContrastsROPECANestedFacade, it fits one linear model per peptide and reports the median peptide fold change per protein. The protein p-value tests the median of the moderated peptide z-scores against its exact null distribution, allowing for the correlation of the peptides of a protein, which is estimated once from the peptide model residuals. Input must be nested LFQData (peptide subject_id strictly below the protein hierarchy).

Value

An R6 class generator.

See also

Other modelling: AnovaExtractor, Contrasts, ContrastsDEqMSFacade, ContrastsDEqMSVoomFacade, ContrastsFacadeBase, ContrastsFirth, ContrastsFirthFacade, ContrastsHurdleFacade, ContrastsHurdleNestedFacade, ContrastsLMFacade, ContrastsLMImputeFacade, ContrastsLimma, ContrastsLimmaFacade, ContrastsLimmaImputeFacade, ContrastsLimmaVoomFacade, ContrastsLimmaVoomImputeFacade, ContrastsLimpaFacade, ContrastsLimpaNestedFacade, ContrastsLmerNestedFacade, ContrastsModerated, ContrastsModeratedDEqMS, ContrastsPlotter, ContrastsRLMFacade, ContrastsROPECA, ContrastsROPECANestedFacade, ContrastsROPECAV2, 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_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(), df.residual.rfit_prolfqua(), get_anova_df(), get_complete_model_fit(), get_p_values_pbeta(), group_label(), impute_from_model(), impute_refit_singular(), 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(), new_imputed_model(), nobs.rfit_prolfqua(), pivot_model_contrasts_to_wide(), prolfqua_analysis_methods, 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(), vcov.rfit_prolfqua()

Super classes

ContrastsInterface -> ContrastsFacadeBase -> ContrastsROPECAV2NestedFacade

Methods

Inherited methods


ContrastsROPECAV2NestedFacade$new()

initialize

Usage

ContrastsROPECAV2NestedFacade$new(lfqdata, modelstr, contrasts, ...)

Arguments

lfqdata

nested LFQData (peptide-level)

modelstr

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

contrasts

named character vector of contrasts

...

passed to strategy_lm


ContrastsROPECAV2NestedFacade$get_contrasts()

Get protein-level contrasts with the standard columns.

Usage

ContrastsROPECAV2NestedFacade$get_contrasts(all = FALSE)

Arguments

all

FALSE (default) returns the standard columns; TRUE appends n_peptides, median_z and rho


ContrastsROPECAV2NestedFacade$get_Plotter()

get ContrastsPlotter (uses standardized column names)

Usage

ContrastsROPECAV2NestedFacade$get_Plotter(
  fc_threshold = 2,
  fdr_threshold = 0.1
)

Arguments

fc_threshold

fold change threshold

fdr_threshold

FDR threshold


ContrastsROPECAV2NestedFacade$to_wide()

convert results to wide format

Usage

ContrastsROPECAV2NestedFacade$to_wide(
  columns = c("p.value", "FDR", "statistic")
)

Arguments

columns

value columns to pivot, default c("p.value", "FDR", "statistic")


ContrastsROPECAV2NestedFacade$clone()

The objects of this class are cloneable with this method.

Usage

ContrastsROPECAV2NestedFacade$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

istar <- sim_lfq_data_peptide_config()
#> creating sampleName from file_name column
lfqdata <- LFQData$new(istar$data, istar$config)
lfqdata <- lfqdata$get_Transformer()$log2()$lfq
#> Column added : log2_abundance
contrasts <- c("A_vs_Ctrl" = "group_A - group_Ctrl")
fa <- ContrastsROPECAV2NestedFacade$new(lfqdata, "~ group_", contrasts)
#> fit (Model): 36 missing responses dropped (e.g. 0EfVhX~0087~ITLb4x1q, 0EfVhX~0087~ahQLlQY7, 0EfVhX~0087~dJkdz7so, 7cbcrd~5725~D5dQ4nKk, 9VUkAq~4703~eIC06D7g, ...): NA response (missing observation) left out of the fit
#> See $provenance().
head(fa$get_contrasts())
#> # A tibble: 6 × 14
#>   modelName  estimate_type protein_Id contrast avgAbd    diff      FDR statistic
#>   <chr>      <chr>         <chr>      <chr>     <dbl>   <dbl>    <dbl>     <dbl>
#> 1 ropecaV2_… observed      0EfVhX~00… A_vs_Ct…   4.27 -0.0742 1.45e- 2     -2.44
#> 2 ropecaV2_… observed      7cbcrd~57… A_vs_Ct…   4.51  0.741  2.48e- 8      5.78
#> 3 ropecaV2_… observed      9VUkAq~47… A_vs_Ct…   4.47 -0.598  8.51e-10     -6.39
#> 4 ropecaV2_… observed      BEJI92~52… A_vs_Ct…   4.23  0.277  2.38e- 6      4.82
#> 5 ropecaV2_… observed      CGzoYe~21… A_vs_Ct…   4.76 -0.310  2.94e- 7     -5.26
#> 6 ropecaV2_… observed      DoWup2~58… A_vs_Ct…   4.43  0.295  3.08e- 8      5.70
#> # ℹ 6 more variables: std.error <dbl>, df <dbl>, p.value <dbl>, conf.low <dbl>,
#> #   conf.high <dbl>, sigma <dbl>
fa$contrast$rho
#> [1] 0
fa$to_wide()
#> # A tibble: 10 × 5
#>    protein_Id diff.A_vs_Ctrl p.value.A_vs_Ctrl FDR.A_vs_Ctrl statistic.A_vs_Ctrl
#>    <chr>               <dbl>             <dbl>         <dbl>               <dbl>
#>  1 0EfVhX~00…        -0.0742          1.45e- 2      1.45e- 2               -2.44
#>  2 7cbcrd~57…         0.741           7.44e- 9      2.48e- 8                5.78
#>  3 9VUkAq~47…        -0.598           1.70e-10      8.51e-10               -6.39
#>  4 BEJI92~52…         0.277           1.43e- 6      2.38e- 6                4.82
#>  5 CGzoYe~21…        -0.310           1.47e- 7      2.94e- 7               -5.26
#>  6 DoWup2~58…         0.295           1.23e- 8      3.08e- 8                5.70
#>  7 Fl4JiV~86…         0.0700          8.21e- 3      9.12e- 3                2.64
#>  8 HvIpHG~90…        -0.384           1.89e-12      1.89e-11               -7.04
#>  9 JcKVfU~96…        -0.0634          2.48e- 4      3.10e- 4               -3.66
#> 10 SGIVBl~57…        -0.122           1.56e- 5      2.23e- 5               -4.32