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 NULL. In this case, a correlation-based distance is computed from x by 1 - cor(x)

m

a vector of dimensional reduction representations to be computed. The following representations can be computed: cmd (classical multidimensional scaling), dm (diffusion map), tsne (t-SNE map), umap (umap). The default value of m is c("cmd","tsne","umap"). Any subset of methods can be selected.

k

vector of integers representing the dimensions for which the dimensional reduction representations will be computed. Default value is 2.

tsne.perplexity

positive number. Perplexity used in the t-SNE computation. Default value is 30.

umap.pars

umap parameters. See umap package, umap.defaults. Default is NULL and umap.defaults are used. umap.pars$input is automatically set to "dist", since the umap is computed for the distance object.

seed

integer seed for initialization. If equal to NULL then each run will yield slightly different results due to the randomness of the random forest algorithm. Default is NULL

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 cmdscale function of the stats package.

tsne

t-SNE map computed by the Rtsne function of the Rtsne package.

umap

umap computed by the umap function of the umap package.

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")


[Package FateID version 0.2.2 Index]