This function takes an object of class iCellR and runs tSNE on main data. Wrapper for the C++ implementation of Barnes-Hut t-Distributed Stochastic Neighbor Embedding. t-SNE is a method for constructing a low dimensional embedding of high-dimensional data, distances or similarities. Exact t-SNE can be computed by setting theta=0.0.
run.tsne(
x = NULL,
clust.method = "base.mean.rank",
top.rank = 500,
gene.list = "character",
add.3d = TRUE,
initial_dims = 50,
perplexity = 30,
theta = 0.5,
check_duplicates = TRUE,
pca = TRUE,
max_iter = 1000,
verbose = FALSE,
is_distance = FALSE,
Y_init = NULL,
pca_center = TRUE,
pca_scale = FALSE,
stop_lying_iter = ifelse(is.null(Y_init), 250L, 0L),
mom_switch_iter = ifelse(is.null(Y_init), 250L, 0L),
momentum = 0.5,
final_momentum = 0.8,
eta = 200,
exaggeration_factor = 12
)
An object of class iCellR.
An object of class iCellR.
Choose from "base.mean.rank" or "gene.model", defult is "base.mean.rank".
A number taking the top genes ranked by base mean, defult = 500.
A list of genes to be used for tSNE analysis. If "clust.method" is set to "gene.model", defult = "my_model_genes.txt".
Add 3D tSNE as well, default = TRUE.
integer; the number of dimensions that should be retained in the initial PCA step (default: 50)
numeric; Perplexity parameter
numeric; Speed/accuracy trade-off (increase for less accuracy), set to 0.0 for exact TSNE (default: 0.5)
logical; Checks whether duplicates are present. It is best to make sure there are no duplicates present and set this option to FALSE, especially for large datasets (default: TRUE)
logical; Whether an initial PCA step should be performed (default: TRUE)
integer; Number of iterations (default: 1000)
logical; Whether progress updates should be messageed (default: FALSE)
logical; Indicate whether X is a distance matrix (experimental, default: FALSE)
matrix; Initial locations of the objects. If NULL, random initialization will be used (default: NULL). Note that when using this, the initial stage with exaggerated perplexity values and a larger momentum term will be skipped.
logical; Should data be centered before pca is applied? (default: TRUE)
logical; Should data be scaled before pca is applied? (default: FALSE)
integer; Iteration after which the perplexities are no longer exaggerated (default: 250, except when Y_init is used, then 0)
integer; Iteration after which the final momentum is used (default: 250, except when Y_init is used, then 0)
numeric; Momentum used in the first part of the optimization (default: 0.5)
numeric; Momentum used in the final part of the optimization (default: 0.8)
numeric; Learning rate (default: 200.0)
numeric; Exaggeration factor used to multiply the P matrix in the first part of the optimization (default: 12.0)