sccloud.tsne¶
-
sccloud.tsne(data, rep='pca', n_jobs=-1, n_components=2, perplexity=30, early_exaggeration=12, learning_rate=1000, random_state=0, out_basis='tsne')[source]¶ Calculate tSNE embedding using MulticoreTSNE package.
- Parameters
data (
anndata.AnnData) – Annotated data matrix with rows for cells and columns for genes.rep (
str, optional, default:"pca") – Representation of data used for the calculation. By default, use PCA coordinates. IfNone, use the count matrixdata.X.n_jobs (
int, optional, default:-1) – Number of threads to use. If-1, use all available threads.n_components (
int, optional, default:2) – Dimension of calculated tSNE coordinates. By default, generate 2-dimensional data for 2D visualization.perplexity (
float, optional, default:30) – The perplexity is related to the number of nearest neighbors used in other manifold learning algorithms. Larger datasets usually require a larger perplexity.early_exaggeration (
int, optional, default:12) – Controls how tight natural clusters in the original space are in the embedded space, and how much space will be between them.learning_rate (
float, optional, default:1000) – The learning rate can be a critical parameter, which should be between 100 and 1000.random_state (
int, optional, default:0) – Random seed set for reproducing results.out_basis (
str, optional, default:"tsne") – Key name for calculated tSNE coordinates to store.
- Return type
None- Returns
NoneUpdate
data.obsm–data.obsm['X_' + out_basis]: tSNE coordinates of the data.
Examples
>>> scc.tsne(adata)