I compute metastable states as g_fwd.compute_metastable_states(cluster_key='clusters', n_states=2), which gives the following output:
Computing metastable states
INFO: Using pre-computed schur decomposition
WARNING: The following groups could not be mapped uniquely: `AT2 cells_1, AT2 cells_2`
Adding `.schur_vectors`
`.metastable_states`
`.coarse_T`
`.coarse_stationary_distribution`
Finish (0:00:00)
The resulting states look like this:
This makes no sense. So I check the membership vectors themselves:
They look fine, just the names are off, see the cluster assignment below:
This tells me: the first state should be called "to ciliated cells", while the second one should be called "to AT2 cells"
Also, I check the metastable assignment like this: scv.pl.scatter(adata, color=g_fwd._gpcca.metastable_assignment, color_map='Paired'), which gives
This also looks fine, so it must be a problem with selecting cells from each metastable state. It seems like the wrong cells are selected, which subsequently means that the state gets the wrong name and color assigned.
If needed, I can send you the anndata object to reproduce. Have we got tests yet for
selecting cells from each metastable state
giving names to metastable states
assigning colors to metastable states
?
Since these seem to be a bit tricky in practice, would be important to include some tests for them.
I compute metastable states as
g_fwd.compute_metastable_states(cluster_key='clusters', n_states=2)
, which gives the following output:The resulting states look like this: This makes no sense. So I check the membership vectors themselves:
They look fine, just the names are off, see the cluster assignment below: This tells me: the first state should be called "to ciliated cells", while the second one should be called "to AT2 cells"
Also, I check the metastable assignment like this:
scv.pl.scatter(adata, color=g_fwd._gpcca.metastable_assignment, color_map='Paired')
, which givesThis also looks fine, so it must be a problem with selecting cells from each metastable state. It seems like the wrong cells are selected, which subsequently means that the state gets the wrong name and color assigned.
If needed, I can send you the anndata object to reproduce. Have we got tests yet for
Since these seem to be a bit tricky in practice, would be important to include some tests for them.