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

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

[Package scry version 1.4.0 Index]