how to plot scanpy tsne based on different conditions

115 Views Asked by At

I have an anndata object like this

adata_all:
AnnData object with n_obs × n_vars = 10000 × 14
obs: 'sample', 'batch', 'condition'
var: 'n', 'channel', 'marker', '$PnB', '$PnG', '$PnE', 'signal_type', '$PnR-0', '$PnR-1', '$PnR-2', 'AB'
uns: 'meta', 'neighbors', 'pca', 'sample_colors', 'umap', 'condition_colors'
obsm: 'X_pca', 'X_umap', 'X_tsne'
varm: 'PCs'
layers: 'original'
obsp: 'connectivities', 'distances'

The conditions are as follow: conditions = ['a', 'b', 'c']. How can I draw tSNEs for each marker separated by each condition in a row? As you can see condition is a feature of obstacles and marker is a feature of variables. I want to plot tSNEs for each marker in three different tSNEs based on conditions. Is this possible?

0

There are 0 best solutions below