formatPHResults: Extract logFC and raw pvalues from multiple post-hoc models...

formatPHResultsR Documentation

Extract logFC and raw pvalues from multiple post-hoc models summaries

Description

Extract logFC and raw pvalues from multiple post-hoc models summaries

Usage

formatPHResults(post_hoc_models_summaries)

Arguments

post_hoc_models_summaries

a list of summaries of post-hoc models.

Value

a list of 2 dataframes containing the logFC values and pvalues for each comparison.

Author(s)

Hélène Borges

Examples

utils::data(Exp1_R25_prot, package='DAPARdata')
obj <- Exp1_R25_prot[1:1000]
level <- obj@experimentData@other$typeOfData
metacell.mask <- match.metacell(GetMetacell(obj), 'missing', level)
indices <- GetIndices_WholeMatrix(metacell.mask, op='>=', th=1)
obj <- MetaCellFiltering(obj, indices, cmd='delete')
anova_tests <- t(apply(Biobase::exprs(obj$new),1, classic1wayAnova, 
conditions=as.factor(Biobase::pData(obj$new)$Condition)))
names(anova_tests) <- rownames(Biobase::exprs(obj$new))
tms <- lapply(anova_tests,
             function(x) summary(multcomp::glht(x, 
             linfct = multcomp::mcp(conditions = "Tukey")),
                   test = multcomp::adjusted("none")))
res <- formatPHResults(tms)


samWieczorek/DAPAR documentation built on May 6, 2022, 5:30 p.m.