tsne graph

None

Parameters

color: str Colour based on an obs value.


perplexity: int The perplexity is related to the number of nearest neighbors that is used in other manifold learning algorithms. Larger datasets usually require a larger perplexity. Consider selecting a value between 5 and 50. The choice is not extremely critical since t-SNE is quite insensitive to this parameter.


Web view

tsne_graph_screenshot

Python equivalent

import scanpy as sc

# compute neighbours to use for colours
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=40)
sc.tl.leiden(adata) 
sc.tl.tsne(adata, perplexity=30)  
sc.pl.tsne(adata, color="leiden")