Description Usage Arguments Value Examples
Runs geneset tests and store in BOWER class.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | ## S3 method for class 'list'
enrich_genesets(
list,
bower,
core = FALSE,
gene_symbol = "X1",
logfoldchanges = "logfoldchanges",
pvals = "pvals",
remove_mito_ribo = TRUE,
minSize = 0,
maxSize = 1000,
...
)
## S3 method for class 'Seurat'
enrich_genesets(
sce,
bower,
groupby = NULL,
core = FALSE,
standardize = TRUE,
mode = c("AUCell", "Seurat", "scanpy"),
sce_assay = "logcounts",
seurat_assay = "RNA",
ncpus = NULL,
aucMaxRank_pct = 5,
...
)
## S3 method for class 'SingleCellExperiment'
enrich_genesets(
sce,
bower,
groupby = NULL,
core = FALSE,
standardize = TRUE,
mode = c("AUCell", "Seurat", "scanpy"),
sce_assay = "logcounts",
seurat_assay = "RNA",
ncpus = NULL,
aucMaxRank_pct = 5,
...
)
|
list |
list containing differentially expressed gene testing results in a data frame. |
bower |
Processed BOWER object. |
core |
boolean. Whether or not to use the coregenes of genesets slot. Default is FALSE (use genesets). |
gene_symbol |
column name for gene_symbol for gsea. |
logfoldchanges |
column name for logfoldchanges for gsea. |
pvals |
column name for pvals for gsea. |
remove_mito_ribo |
boolean. whether or not to remove mitochondial and ribosomal genes from consideration for gsea. Default is TRUE. |
minSize |
minimum geneset size for gsea. Default is 0. |
maxSize |
maximum geneset size for gsea. Default is 1000. |
... |
passed to fgsea::fgsea, AUCell::AUCell_buildRankings or Seurat::AddModuleScore |
sce |
a single cell object in the format of a Seurat object or SingleCellExperiment object. |
groupby |
Column name in the meta.data/colData of the single cell objects specifying the group to average the enrichment score. If not specified, not cluster average will be calculated. |
standardize |
whether or not to standardize mean enrichment values to 0 to 1. Only used if groupby is not NULL. |
mode |
choice of enrichment test to perform. |
sce_assay |
name of assay in SingleCellExperiment object. |
seurat_assay |
name of assay in Seurat object. |
ncpus |
number of cores used for parallelizing geneset testing. |
aucMaxRank_pct |
percentage to use for aucMaxRank in AUCell::AUCell_calcAUC. |
nperm |
number of permuation iterations for gsea. Default is 10000. |
Returns a dataframe of average gene set scores.
1 2 3 4 5 6 7 8 9 | library(ktplots)
data(kidneyimmune)
gmt_file <- system.file("extdata", "h.all.v7.4.symbols.gmt", package = "bowerbird")
bwr <- bower(gmt_file)
bwr <- snn_graph(bwr)
bwr <- find_clusters(bwr)
bwr <- summarize_clusters(bwr, ncpus = 1)
bwr <- enrich_genesets(kidneyimmune, bwr, groupby = 'celltype', ncpus = 1)
bwr
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.