compdr {FateID} | R Documentation |
Computation of dimensional reduction representations
Description
This function computes dimensional reduction representations to a specified number of dimensions using a number of different algorithms: t-SNE, cmd, diffusion maps, umap
Usage
compdr(
x,
z = NULL,
m = c("tsne", "cmd", "umap"),
k = 2,
tsne.perplexity = 30,
umap.pars = NULL,
seed = 12345
)
Arguments
x |
expression data frame with genes as rows and cells as columns. Gene IDs should be given as row names and cell IDs should be given as column names. This can be a reduced expression table only including the features (genes) to be used in the analysis. |
z |
Matrix containing cell-to-cell distances to be used in the fate bias computation. Default is |
m |
a vector of dimensional reduction representations to be computed. The following representations can be computed: |
k |
vector of integers representing the dimensions for which the dimensional reduction representations will be computed. Default value is |
tsne.perplexity |
positive number. Perplexity used in the t-SNE computation. Default value is 30. |
umap.pars |
umap parameters. See umap package, |
seed |
integer seed for initialization. If equal to |
Value
A two-dimensional list with the dimensional reduction representation stored as data frames as components. Component names for the first dimension are given by one of the following algorithms:
cmd |
classical multidimensional scaling computed by the |
tsne |
t-SNE map computed by the |
umap |
umap computed by the |
Component names of the second dimension are a concatenation of a capital D and an integer number of the dimension. There is one component for each dimension in k
.
Examples
x <- intestine$x
dr <- compdr(x,z=NULL,m="cmd",k=2,tsne.perplexity=30)
plot(dr[["cmd"]][["D2"]],pch=20,col="grey")