RankGenes: Find highly variable genes

Description Usage Arguments Details Value Examples

View source: R/hvgs.R

Description

Get variable genes from normalized UMI counts using Fano Factor metric.

Usage

1
RankGenes(object, ngenes_keep = 1000)

Arguments

object

A SingleCellExperiment object containing normalized expression values in "normcounts".

ngenes_keep

integer to return top ranking ngenes_keep number of genes.

Details

Compute Fano Factor metric for each gene. The metric computes the median absolute deviation of dispersion across multiple bins for each gene.

Value

A SingleCellExperiment object with an additional column named HVG in rowData column. The column stores a a logical value against each gene to indicate if it has been ranked within the top ngenes_keep. It also generates an additional column dispersion_norm in rowData to store the dispersion metric against each gene.

Examples

1
2
3
4
5
6
7
8
9
library(SingleCellExperiment)
ncells <- 100
ngenes <- 2000
x <- matrix(rpois(ncells*ngenes, lambda = 10), ncol=ncells, nrow=ngenes, byrow=TRUE)
rownames(x) <- paste0("Gene", seq_len(ngenes))
colnames(x) <- paste0("Cell", seq_len(ncells))
sce <- SingleCellExperiment(list(counts=x))
sce <- CountNormalize(sce)
sce <- RankGenes(sce)

debsin/dropClust documentation built on Nov. 4, 2019, 10:22 a.m.