R/AllGenerics.R, R/geneSetSummaryByGenes.R
geneSetSummaryByGenes.RdThis function creates a geneset by feature table with geneset membership
information for the features specified by the user. Only the gene sets that
have any of the features are included in the table returned.
geneSetSummaryByGenes(
x,
features,
with.features = TRUE,
feature.rename = NULL,
...,
as.dt = FALSE
)
# S4 method for class 'GeneSetDb'
geneSetSummaryByGenes(
x,
features,
with.features = TRUE,
feature.rename = NULL,
...,
as.dt = FALSE
)
# S4 method for class 'SparrowResult'
geneSetSummaryByGenes(
x,
features,
with.features = TRUE,
feature.rename = NULL,
method = NULL,
max.p = 0.3,
p.col = c("padj", "padj.by.collection", "pval"),
...,
as.dt = FALSE
)GeneSetDb or SparrowResult
a character vector of featureIds
Include columns for features? If x is
is a GeneSetDb, these columns are TRUE/FALSE. If
x is a SparrowResult object, the values are the logFC of
the feature if present in the gene set, otherwise its NA.
if NULL, the feature columns are prefixed with
featureId_, if FALSE, no renaming is done. If x is
a SparrowResult, then this can be the column name found in
logFC(x), in which case the value for the feature from the given
column name would be used (setting this to "symbol") would be a
common thing to do, for instance.
pass through arguments
If FALSE (default), the data.frame like thing that
this funciton returns will be set to a data.frame. Set this to TRUE
to keep this object as a data.table
The GSEA method to pull statistics from
the maximum p-value from the analysis method to allow for the
geneSets included in the returned table
which p-value column to select from: 'padj',
'padj.by.collection', or 'pval'
a data.frame of geneset <-> feature incidence/feature matrix.
geneSetSummaryByGenes(SparrowResult): get geneset:feature incidence table from
a SparrowResult, optionally filtered by statistical significance from
a given gsea method
vm <- exampleExpressionSet(do.voom=TRUE)
gdb <- conform(exampleGeneSetDb(), vm)
mg <- seas(vm, gdb, design = vm$design, contrast = 'tumor')
features <- c("55839", "8522", "29087")
gsm.hit <- geneSetSummaryByGenes(gdb, features)
gsm.fid <- geneSetSummaryByGenes(mg, features, feature.rename=NULL)
gsm.sym <- geneSetSummaryByGenes(mg, features, feature.rename='symbol')