tmodSummary {tmod} | R Documentation |
Create a summary of multiple tmod analyses
Description
Create a summary of multiple tmod analyses
Usage
tmodSummary(
x,
clust = NULL,
filter.empty = FALSE,
filter.unknown = TRUE,
select = NULL,
effect.col = NULL,
pval.col = "adj.P.Val"
)
Arguments
x |
list, in which each element has been generated with a tmod test function |
clust |
whether, in the resulting data frame, the modules should be ordered by clustering them with either q-values ("qval") or the effect size ("effect"). If "sort" or NULL, the modules are sorted alphabetically by their ID. If "keep", then the order of the modules is kept. |
filter.empty |
If TRUE, all elements (columns) with no significant enrichment will be removed |
filter.unknown |
If TRUE, modules with no annotation will be omitted |
select |
a character vector of module IDs to show. If clust == "keep", then in that particular order. |
effect.col |
The name of the column with the effect size (if NULL, the default, the effect size will be taken from the tmod results object attributes) |
pval.col |
The name of the p-value column |
Details
This function is useful if you run an analysis for several conditions or time points and would like to summarize the information in a single data frame. You can use lapply() to generate a list with tmod results and use tmodSummary to convert it to a data frame.
Value
a data frame with a line for each module encountered anywhere in the list x, two columns describing the module (ID and module title), and two columns(effect size and q value) for each element of list x.
See Also
tmodPanelPlot
Examples
## Not run:
data(Egambia)
E <- Egambia[,-c(1:3)]
pca <- prcomp(t(E), scale.=TRUE)
# Calculate enrichment for each component
gs <- Egambia$GENE_SYMBOL
gn.f <- function(r) {
tmodCERNOtest(gs[order(abs(r),
decreasing=TRUE)],
qval=0.01)
}
x <- apply(pca$rotation, 2, gn.f)
tmodSummary(x)
## End(Not run)