topEnrichBySource | R Documentation |
Subset enrichResult for top enrichment results by source
Subset list of enrichResult for top enrichment results by source
topEnrichBySource(
enrichDF,
n = 15,
min_count = 1,
p_cutoff = 1,
sourceColnames = c("gs_cat", "gs_subcat"),
sortColname = NULL,
countColname = c("gene_count", "count", "geneHits"),
pvalueColname = c("P.Value", "pvalue", "FDR", "adj.P.Val", "qvalue"),
directionColname = c("activation.z.{0,1}score", "z.{0,1}score"),
direction_cutoff = 0,
newColname = "EnrichGroup",
curateFrom = NULL,
curateTo = NULL,
sourceSubset = NULL,
sourceSep = "_",
subsetSets = NULL,
descriptionColname = c("Description", "Name", "Pathway"),
nameColname = c("ID", "Name"),
descriptionGrep = NULL,
nameGrep = NULL,
verbose = FALSE,
...
)
topEnrichListBySource(
enrichList,
n = 15,
min_count = 1,
p_cutoff = 1,
sourceColnames = c("gs_cat", "gs_subcat"),
sortColname = c(pvalueColname, "P-value", "pvalue", "qvalue", "padjust", "-GeneRatio",
"-Count", "-geneHits"),
countColname = c("gene_count", "count", "geneHits"),
pvalueColname = c("P.Value", "pvalue", "FDR", "adj.P.Val", "qvalue"),
directionColname = c("activation.z.{0,1}score", "z.{0,1}score"),
direction_cutoff = 1,
newColname = "EnrichGroup",
curateFrom = NULL,
curateTo = NULL,
sourceSubset = NULL,
sourceSep = "_",
subsetSets = NULL,
descriptionColname = c("Description", "Name", "Pathway"),
nameColname = c("ID", "Name"),
descriptionGrep = NULL,
nameGrep = NULL,
verbose = FALSE,
...
)
enrichDF |
|
n |
|
min_count |
|
p_cutoff |
|
sourceColnames |
|
sortColname |
|
countColname |
|
pvalueColname |
|
directionColname |
|
direction_cutoff |
|
newColname |
|
curateFrom , curateTo |
|
sourceSubset |
|
sourceSep |
|
subsetSets |
|
descriptionColname , nameColname |
character vectors
indicating the colnames to consider description and name,
as returned from |
descriptionGrep , nameGrep |
|
verbose |
|
... |
additional arguments are ignored. |
enrichList |
|
This function takes one enrichResult
object, or
a data.frame
of enrichment results, and determines the
top n
number of pathways sorted by P-values, within
each pathway source. This function may optionally require
min_count
genes in each pathway, and p_cutoff
maximum
enrichment P-value, prior to taking the top topEnrichN
entries. The default arguments do not apply filters
to min_count
and p_cutoff
.
When the enrichment data represents pathways from multiple sources, the filtering and sorting is applied to each source independently. The intent is to retain the top entries from each source, as a method of representing each source consistently even when one source may contain many more pathways, and importantly where the range of enrichment P-values may be very different for each source. For example, a database of small canonical pathways would generally provide less statistically significant P-values than a database of dysregulated genes from gene expression experiments, where each set contains a large number of genes.
This function can optionally apply basic curation of pathway
source names, and can optionally be applied to multiple
source columns. This feature is intended for sources like
MSigDB (see http://software.broadinstitute.org/gsea/msigdb/index.jsp)
which contains columns "Source"
and "Category"
,
and where canonical pathways are either represented with "CP"
or a prefix "CP:"
. The default parameters recognize this
case and curates all prefix "CP:.*"
down to just "CP"
so that all canonical pathways are considered to be the
same source. For MSigDB there are also numerous other sources,
which are each independently filtered and sorted to the
top topEnrichN
entries.
Finally, this function is useful to subset enrichment results
by name, using descriptionGrep
, nameGrep
, or subsetSets
.
topEnrichListBySource()
extends topEnrichBySource()
by applying
filters to each enrichList
entry, then keeping pathways
across all enrichList
that match the filter criteria in any
one enrichList
. It is most useful in the context of
multiEnrichMap()
where a pathway must meet all criteria
in at least one enrichment, and that pathway should then
be included for all enrichments for the purpose of
comparative analysis.
data.frame
subset up to topEnrichN
rows, after
applying optional min_count
and p_cutoff
filters.
Other jam enrichment functions:
add_pathway_direction()
,
multiEnrichMap()
Other jam enrichment functions:
add_pathway_direction()
,
multiEnrichMap()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.