GLMPCA {scry} | R Documentation

## Generalized principal components analysis for non-normally distributed data

### Description

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

### Usage

    GLMPCA(object, ...)

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

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

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

### Arguments

`object` | A `SingleCellExperiment` or SummarizedExperiment object. Alternatively, a matrix of integer counts.
`...` | further arguments passed to `glmpca`
`assay` | a character or integer specifying which assay to use for GLM-PCA (default = 1). Ignored if `object` is a matrix.
`L` | the desired number of latent dimensions (integer).

### 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

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

[Package scry version 1.0.1 Index]