Learn R Programming

tmod (version 0.19)

tmodSummary: 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)

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 NULL, the modules are sorted alphabetically by their ID.
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

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.

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.

See Also

tmodPanelPlot

Examples

Run this code
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)

Run the code above in your browser using DataLab