pegasus.fitsne

pegasus.fitsne(data, rep='pca', n_jobs=- 1, n_components=2, perplexity=30, early_exaggeration=12, learning_rate=1000, random_state=0, out_basis='fitsne')[source]

Calculate FIt-SNE embedding of cells.

This function uses fitsne package. See [Linderman19] for details on FIt-SNE.

Parameters
  • data (pegasusio.MultimodalData) – 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. If None, use the count matrix data.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 FI-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: "fitsne") – Key name for calculated FI-tSNE coordinates to store.

Return type

None

Returns

  • None

  • Update data.obsm

    • data.obsm['X_' + out_basis]: FI-tSNE coordinates of the data.

Examples

>>> pg.fitsne(data)