pcaVariances<- {singleCellTK} | R Documentation

## Set PCA variances

### Description

Set PCA variances

### Usage

    pcaVariances(x, ...) <- value

### Arguments

`x` | SCtkE object
`...` | other parameters
`value` | PCA variances DataFrame()

### Value

A SCtkExperiment object with the pcaVariances slot set.

### Examples

    data("mouseBrainSubsetSCE")
    pcaVariances(mouseBrainSubsetSCE)
    #getPCA() sets the pcaVariances
    newSCE <- getPCA(mouseBrainSubsetSCE, useAssay = "counts")

    #alternatively, set the pcaVariances directly
    pca <- prcomp(assay(mouseBrainSubsetSCE, "logcounts"))
    percentVar <- pca$sdev ^ 2 / sum(pca$sdev ^ 2)
    pcaVariances(mouseBrainSubsetSCE) <- DataFrame(percentVar)

[Package singleCellTK version 1.6.0 Index]