Description Usage Arguments Value Author(s) References See Also Examples
This function computes the single-cell Stably Expressed Gene (scSEG) index from Lin. et al. (2019) for a given single-cell count data matrix. Each gene in the data is fitted with a gamma-normal mixture model and the final SEG index is computed as an average of key parameters that measure the expression stability of a gene.
We recommend using either the pre-computed genes (see "See Also" below) or the top SEG genes
from an user's own data as the control genes in the scMerge
function
(see the ctl
argument in the scMerge
function).
1 2 3 4 5 6 | scSEGIndex(
exprs_mat,
cell_type = NULL,
BPPARAM = SerialParam(progressbar = TRUE),
return_all = FALSE
)
|
exprs_mat |
A log-transformed single-cell data, assumed to have no batch effect and covered a wide range of cell types. A n by m matrix, where n is the number of genes and m is the number of cells. |
cell_type |
A vector indicating the cell type information for each cell in the gene expression matrix.
If it is |
BPPARAM |
A |
return_all |
Default to FALSE. If set to TRUE, then all genes will be returned. Otherwise, only genes with less than 80 percent zeroes will be returned. |
Returns a data frame.
Each row is a gene and each column is a statistic relating to the stability of expression of each gene.
The main statistic is the segIdx
column, which is the SEG index.
Shila Ghazanfar, Yingxin Lin, Pengyi Yang
Evaluating stably expressed genes in single cells (2019). doi:10.1093/gigascience/giz106.
Download human SEG directly from this link; Download mouse SEG directly from this link.
1 2 3 4 5 6 7 8 9 10 11 | ## Loading example data
data('example_sce', package = 'scMerge')
## subsetting genes to illustrate usage.
exprs_mat = SummarizedExperiment::assay(example_sce, 'logcounts')[1:110, 1:20]
set.seed(1)
result1 = scSEGIndex(exprs_mat = exprs_mat)
## If parallelisation is needed:
param = BiocParallel::MulticoreParam(workers = 2, progressbar = TRUE)
result2 = scSEGIndex(exprs_mat = exprs_mat, BPPARAM = param)
## Closing the parallelisation
BiocParallel::register(BPPARAM = BiocParallel::SerialParam())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.