GLMPCA: Generalized principal components analysis for non-normally...

Description Usage Arguments Value Examples

Description

This function implements the GLM-PCA dimensionality reduction method for high-dimensional count data. This is a wrapper for glmpca.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
GLMPCA(object, ...)

## S4 method for signature 'SummarizedExperiment'
GLMPCA(object, L, assay = "counts", ...)

## S4 method for signature 'matrix'
GLMPCA(object, L, ...)

## S4 method for signature 'Matrix'
GLMPCA(object, L, ...)

Arguments

object

A SingleCellExperiment or SummarizedExperiment object. Alternatively, a matrix-like object of non-negative integer counts (such as a sparse Matrix).

...

further arguments passed to glmpca

L

the desired number of latent dimensions (integer).

assay

a character or integer specifying which assay to use for GLM-PCA (default = 'counts'). Ignored if object is a matrix.

Value

The original SingleCellExperiment or SummarizedExperiment object with the GLM-PCA results added to the metadata slot. If the original input was a SingleCellExperiment, then a new reducedDim element called "GLMPCA" will be added, representing the GLM-PCA factors. If the input was a matrix, output matches that of glmpca.

Examples

1
2
3
4
ncells <- 100
u <- matrix(rpois(20000, 5), ncol=ncells)
sce <- SingleCellExperiment::SingleCellExperiment(assays=list(counts=u))
GLMPCA(sce, L = 2)

kstreet13/scry documentation built on June 21, 2021, 11:55 a.m.