get_DE_genes: get_DE_genes

View source: R/get_DE_genes.R

get_DE_genesR Documentation

get_DE_genes

Description

Essentially a wrapper for scran::findMarkers. Returns an aggregated stat across all cell types in a form of data.frame: each row corresponds to cell type and gene which is found to be DE in this cell type (using designated FDR as a threshold for significance), FDR and summary.logFC.

Usage

get_DE_genes(
  sce,
  celltype.id = "celltype",
  test.type = "binom",
  pval.type = "some",
  FDR.thresh = 0.01,
  ...
)

Arguments

sce

SingleCellExperiment object containing gene counts matrix (stored in 'logcounts' assay).

celltype.id

Character specifying which field in colData(sce) shoyld be used as celltype. Default celltype.id="celltype".

test.type

String specifying which testing will be performed. Available options are the same as for scran::findMarkers, parameter test.use. Default test.type="binom".

pval.type

String specifying how p-values are combined. Available options are the same as for scran::findMarkers, parameter pval.type. Default pval.type="some".

FDR.thresh

Positive scalar specifying threshold for FDR. Default FDR=0.01.

...

Additional arguments

Examples

require(SingleCellExperiment)
n_row = 1000
n_col = 100
sce = SingleCellExperiment(assays = list(logcounts = matrix(rnorm(n_row*n_col), ncol=n_col)))
rownames(sce) = as.factor(1:n_row)
colnames(sce) = c(1:n_col)
sce$cell = colnames(sce)
sce$celltype = as.character(sample.int(5, n_col, replace = TRUE))
out = get_DE_genes(sce)


MarioniLab/geneBasisR documentation built on June 30, 2023, 2:04 p.m.