RankPCAGenes: Select PCA based Genes

Description Usage Arguments Details Value Examples

View source: R/hvgs.R

Description

Performs gene selection on sampled cells based on PCA loadings

Usage

1
RankPCAGenes(object, top = 200)

Arguments

object

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

top

integer specifying to number of genes to return in their order of ranking

Details

Genes are ranked for selection in 3 steps:

  1. First 50 principal components are obtained using Singular value Decomposition is used as implemented in the irlba R package.

  2. Among the first 50 components, top 10 components are selected in the order of their modality.

  3. Genes are ordered based on their average loadings in the rotation matrix containing the top 10 components.

Value

A SingleCellExperiment object with an additional column named PCAGenes in rowData column. The column stores a a logical value against each gene to indicate if it has been ranked within the top.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
library(SingleCellExperiment)
ncells <- 1000
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)
sce <- Sampling(sce)
sce <- RankPCAGenes(sce)

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