Description Usage Arguments Value Author(s) Examples
View source: R/eigenDecompose.R
Performs principal component analysis from a gene expression matrix. Data is centered and scaled by default.
1 2 | eigenDecompose(expData, n = 10, pseudo = TRUE, returnData = TRUE,
seed = 66)
|
expData |
A matrix object with genes as rows and cells as columns. Unique row names for genes must be provided |
n |
Number of principal components to be computed |
pseudo |
Whether to perform a |
returnData |
Return training data? |
seed |
Numeric seed for computing the eigenvalues and eigenvectors using the Lanczos algorithm |
A scPred object with three or four filled slots
svd
: results from prcomp_irlba
function
expVar
: explained variance by each principal component
pseudo
: TRUE
if a pseudo-log2 transformation was performed
trainData
: if returnData
is TRUE, the training data is returned
Jos<c3><a9> Alquicira Hern<c3><a1>ndez
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | # Eigendecompose gene expression matrix
# Simulate gene expression data for two groups
class1 <- matrix(rnbinom(10000, 1, 0.1), ncol = 100)
class2 <- matrix(rnbinom(10000, 1, 0.15), ncol = 100)
# Create gene expression matrix (rows = cells, colums = genes)
expTrain <- cbind(class1, class2)
# Eigendecompose gene expression matrix
object <- eigenDecompose(expTrain, n = 25)
plotEigen(object)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.