ContrastsModerated | R Documentation |
Limma moderated contrasts
Limma moderated contrasts
prolfqua::ContrastsInterface
-> ContrastsModerated
Contrast
Class implementing the Contrast interface
modelName
name of model
subject_Id
columns with subject_Id (proteinID)
p.adjust
function to adjust p-values
new()
initialize
ContrastsModerated$new( Contrast, modelName = paste0(Contrast$modelName, "_moderated"), p.adjust = prolfqua::adjust_p_values )
Contrast
class implementing the ContrastInterface
modelName
name of the model
p.adjust
function to adjust p-values - default BH
get_contrast_sides()
get both sides of contrasts
ContrastsModerated$get_contrast_sides()
get_linfct()
get linear functions from contrasts
ContrastsModerated$get_linfct(global = TRUE)
global
logical TRUE - get the a linear functions for all models, FALSE - linear function for each model
get_contrasts()
applies limma moderation
ContrastsModerated$get_contrasts(all = FALSE)
all
should all columns be returned (default FALSE)
global
use a global linear function (determined by get_linfct)
get_Plotter()
get ContrastsPlotter
ContrastsModerated$get_Plotter(FCthreshold = 1, FDRthreshold = 0.1)
FCthreshold
fold change threshold to show in plots
FDRthreshold
FDR threshold to show in plots
to_wide()
convert to wide format
ContrastsModerated$to_wide(columns = c("p.value", "FDR", "statistic"))
columns
value column default moderated.p.value
data.frame
clone()
The objects of this class are cloneable with this method.
ContrastsModerated$clone(deep = FALSE)
deep
Whether to make a deep clone.
moderated_p_limma_long
Other modelling:
Contrasts
,
ContrastsMissing
,
ContrastsPlotter
,
ContrastsProDA
,
ContrastsROPECA
,
ContrastsTable
,
INTERNAL_FUNCTIONS_BY_FAMILY
,
LR_test()
,
Model
,
build_model()
,
contrasts_fisher_exact()
,
get_anova_df()
,
get_complete_model_fit()
,
get_p_values_pbeta()
,
isSingular_lm()
,
linfct_all_possible_contrasts()
,
linfct_factors_contrasts()
,
linfct_from_model()
,
linfct_matrix_contrasts()
,
merge_contrasts_results()
,
model_analyse()
,
model_summary()
,
moderated_p_limma()
,
moderated_p_limma_long()
,
my_contest()
,
my_contrast()
,
my_contrast_V1()
,
my_contrast_V2()
,
my_glht()
,
pivot_model_contrasts_2_Wide()
,
plot_lmer_peptide_predictions()
,
sim_build_models_lm()
,
sim_build_models_lmer()
,
sim_make_model_lm()
,
sim_make_model_lmer()
,
strategy_lmer()
,
summary_ROPECA_median_p.scaled()
istar <- sim_lfq_data_protein_config(Nprot = 50)
protIntensity <- istar$data
config <- istar$config
lProt <- LFQData$new(protIntensity, config)
lProt$rename_response("transformedIntensity")
modelFunction <-
strategy_lm("transformedIntensity ~ group_")
mod <- build_model(
lProt,
modelFunction)
Contr <- c("dil.b_vs_a" = "group_A - group_Ctrl")
contrast <- prolfqua::Contrasts$new(mod,
Contr)
contrast <- ContrastsModerated$new(contrast)
bb <- contrast$get_contrasts()
csi <- ContrastsMissing$new(lProt, contrasts = Contr)
contrast$get_contrasts() |> dim()
(xx <- csi$get_contrasts()) |> dim()
merged <- merge_contrasts_results(contrast, csi)
merged$more$get_contrasts() |> dim()
stopifnot(all(dim(merged$merged$get_contrasts() == c(50,13))))
stopifnot(all(dim(merged$same$get_contrasts()) == c(49,13)))
cs <- contrast$get_contrast_sides()
cslf <- contrast$get_linfct()
ctr <- contrast$get_contrasts()
ctrwide <- contrast$to_wide()
cp <- contrast$get_Plotter()
print(cp$histogram()$p.value, vp=NULL)
print(cp$histogram()$FDR, vp = NULL)
cp$volcano()
cp$ma_plot()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.