View source: R/findMarkers_1vAll.R
findMarkers_1vAll | R Documentation |
scran::findMarkers()
.For each cell type, this function computes the statistics comparing that cell type (the "1") against all other cell types combined ("All").
findMarkers_1vAll(
sce,
assay_name = "counts",
cellType_col = "cellType",
add_symbol = FALSE,
mod = NULL,
verbose = TRUE,
direction = "up"
)
sce |
A SingleCellExperiment object. |
assay_name |
Name of the assay to use for calculation. See
see |
cellType_col |
Column name on |
add_symbol |
A |
mod |
A |
verbose |
A |
direction |
A |
See https://github.com/MarioniLab/scran/issues/57 for a more in depth
discussion about the standard log fold change statistics provided by
scran::findMarkers()
.
See also https://youtu.be/IaclszgZb-g for a LIBD rstats club presentation on "Finding and interpreting marker genes in sc/snRNA-seq data". The companion notes are available at https://docs.google.com/document/d/1BeMtKgE7gpmNywInndVC9o_ufopn-U2EZHB32bO7ObM/edit?usp=sharing.
A tibble::tibble()
of 1 vs. ALL standard log fold change + p-values
for each gene x cell type.
gene
is the name of the gene (from rownames(sce)
).
logFC
the log fold change from the DE test
log.p.value
the log of the p-value of the DE test
log.FDR
the log of the False Discovery Rate adjusted p.value
std.logFC
the standard logFC.
cellType.target
the cell type we're finding marker genes for
std.logFC.rank
the rank of std.logFC
for each cell type
std.logFC.anno
is an annotation of the std.logFC
value
helpful for plotting.
## load example SingleCellExperiment
if (!exists("sce_DLPFC_example")) sce_DLPFC_example <- fetch_deconvo_data("sce_DLPFC_example")
## Explore properties of the sce object
sce_DLPFC_example
## this data contains logcounts of gene expression
SummarizedExperiment::assays(sce_DLPFC_example)$logcounts[1:5, 1:5]
## nuclei are classified in to cell types
table(sce_DLPFC_example$cellType_broad_hc)
## Get the 1vALL stats for each gene for each cell type defined in
## `cellType_broad_hc`
marker_stats_1vAll <- findMarkers_1vAll(
sce = sce_DLPFC_example,
assay_name = "logcounts",
cellType_col = "cellType_broad_hc",
mod = "~BrNum"
)
## explore output, top markers have high logFC
head(marker_stats_1vAll)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.