Closed smk5g5 closed 4 years ago
This is a notorious issue of seaborn
package, which is used internally by STREAM. Somehow it always interprets integers as numerical
type regardless of its real data type.
An easy workaround is to add a prefix to your cluster labels, e.g.
adata.obs['Seruat_clusters'] = 'cluster_'+adata.obs['Seruat_clusters']
Is a more divergent color scheme possible here?
This is not what it's supposed to look like. Can you try to add a prefix to your cluster label as i suggested above?
KeyError Traceback (most recent call last) ~/opt/anaconda3/envs/env_stream/lib/python3.7/site-packages/pandas/core/indexes/base.py in get_loc(self, key, method, tolerance) 2645 try: -> 2646 return self._engine.get_loc(key) 2647 except KeyError:
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/index.pyx in pandas._libs.index.IndexEngine.get_loc()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
pandas/_libs/hashtable_class_helper.pxi in pandas._libs.hashtable.PyObjectHashTable.get_item()
KeyError: 'Seruat_clusters'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
Sorry i misspelled it. adata.obs['Seurat_clusters'] = 'cluster_'+adata.obs['Seurat_clusters']
should work. (Please make sure the data type of 'Seurat_clusters'
is str
first. )
Thanks! that worked great!
Hi,
As per our conversation yesterday I was able to use the multi-label list as described in the issue here https://github.com/pinellolab/STREAM/issues/80. For the seurat clusters which look as shown in the figure below.
At first STREAM was interpreting the
Seurat_clusters
cluster column as integer and was plotting a continuous distribution over the clustersso I changed it to str and now it is giving me a plot which does not have all cluster info.
Is there a workaround to getting it right?
Thanks!