symphonypy.tl.tsne

symphonypy.tl.tsne(adata: AnnData, use_rep: str = 'X_pca', t_sne_slot: str = 'X_tsne', use_model: TSNEEmbedding | str | None = None, save_path: str | None = None, use_raw: bool | None = None, return_model: bool = False, **kwargs) None

Run openTSNE dimension reduction on adata if use_model is None, or ingest adata.obsm[use_rep] to existing embedding, saved in use_model.

Parameters:
  • adata (AnnData) – AnnData object

  • use_rep (str, optional) – adata.obsm[use_rep] will be used as features for openTSNE model, defaults to “X_pca”

  • t_sne_slot (str, optional) – to adata.obsm[t_sne_slot] embedding will be saved, defaults to “X_tsne”

  • use_model (openTSNE.TSNEEmbedding | str | None, optional) – openTSNE model object or path to pickle dumped model to use, defaults to None

  • save_path (str | None, optional) – Filepath to save pickle of the openTSNE model, defaults to None

  • use_raw (bool | None, optional) – If to use adata.raw.X as features for openTSNE, defaults to None

  • return_model (bool, optional) – If to return openTSNE model, defaults to False