Description Usage Arguments Value Examples
corral can be used for dimensionality reduction to find a set of low-dimensional embeddings for a count matrix.
corral is a wrapper for corral_mat and corral_sce, and can be called on any of the acceptable input types.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
inp |
matrix (any type), |
method |
character, the algorithm to be used for svd. Default is irl. Currently supports 'irl' for irlba::irlba or 'svd' for stats::svd |
ncomp |
numeric, number of components; Default is 30 |
row.w |
numeric vector; the row weights to use in chi-squared scaling. Defaults to 'NULL', in which case row weights are computed from the input matrix. |
col.w |
numeric vector; the column weights to use in chi-squared scaling. For instance, size factors could be given here. Defaults to 'NULL', in which case column weights are computed from the input matrix. |
... |
(additional arguments for methods) |
whichmat |
character; defaults to |
fullout |
boolean; whether the function will return the full |
subset_row |
numeric, character, or boolean vector; the rows to include in corral, as indices (numeric), rownames (character), or with booleans (same length as the number of rows in the matrix). If this parameter is |
x |
(print method) corral object; the list output from |
When run on a matrix, a list with the correspondence analysis matrix decomposition result:
da vector of the diagonal singular values of the input mat (from SVD output)
ua matrix of with the left singular vectors of mat in the columns (from SVD output)
va matrix of with the right singular vectors of mat in the columns. When cells are in the columns, these are the cell embeddings. (from SVD output)
eigsumsum of the eigenvalues for calculating percent variance explained
SCu and SCvstandard coordinates, left and right, respectively
PCu and PCvprincipal coordinates, left and right, respectively
When run on a SingleCellExperiment, returns a SCE with the embeddings (PCv from the full corral output) in the reducedDim slot corral (default). Also can return the same output as corral_mat when fullout is set to TRUE.
For matrix and SummarizedExperiment input, returns list with the correspondence analysis matrix decomposition result (u,v,d are the raw svd output; SCu and SCv are the standard coordinates; PCu and PCv are the principal coordinates)
For SummarizedExperiment input, returns the same as for a matrix.
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | mat <- matrix(sample(0:10, 5000, replace=TRUE), ncol=50)
result <- corral_mat(mat)
result <- corral_mat(mat, method = 'svd')
result <- corral_mat(mat, method = 'irl', ncomp = 5)
library(DuoClustering2018)
sce <- sce_full_Zhengmix4eq()[1:100,1:100]
result_1 <- corral_sce(sce)
result_2 <- corral_sce(sce, method = 'svd')
result_3 <- corral_sce(sce, method = 'irl', ncomp = 30, whichmat = 'logcounts')
library(DuoClustering2018)
sce <- sce_full_Zhengmix4eq()[1:100,1:100]
corral_sce <- corral(sce,whichmat = 'counts')
mat <- matrix(sample(0:10, 500, replace=TRUE), ncol=25)
corral_mat <- corral(mat, ncomp=5)
mat <- matrix(sample(1:100, 10000, replace = TRUE), ncol = 100)
corral(mat)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.