pinellolab / STREAM

STREAM: Single-cell Trajectories Reconstruction, Exploration And Mapping of single-cell data
http://stream.pinellolab.org
GNU Affero General Public License v3.0
173 stars 48 forks source link

Stream remove label ? #130

Closed TarekGharsalli closed 2 years ago

TarekGharsalli commented 3 years ago

Hello,

Does any one encounter this problem when he try to add label to the adata and he don't find all the labels when he plot ? I have 8 clusters and I added the label to my adata (cl0, cl1, .... cl8) and when I plot for example st.plot_dimension_reduction, I don't found cl0 in the legend. I use another label and the same thing, there is usually one cluster lacking.

Thanks

huidongchen commented 3 years ago

Hi , would you mind sharing with me a dummy dataset to reproduce the error so that I can look into the issue?

TarekGharsalli commented 3 years ago

HI @huidongchen ,

Thanks for your reply, I can share the dataset here ? I can show you here an images to expalain more
I load the 10X data, then I add the labels; as you see in the second image that I have a Cluster_0, then I plot the dimension reduction colored by label and I don't found Cluster_0, and when I check again in the the adata , I found label Cluster_0. fig1 fig2 fig3

huidongchen commented 3 years ago

hi thanks for sharing the details.

Unfortunately given this information, I can not really tell what's going on. Can you save the adata to a h5ad file (make sure to run st.write(adata, file_name='adata.h5ad') before the step st.dimension_reduction() )) so that i can try to reproduce the issue myself?

TarekGharsalli commented 2 years ago

Hi @huidongchen

Where can I share the datatset ?

Thanks !

huidongchen commented 2 years ago

Can you upload it here if it is just a dummy dataset?

wong-ziyi commented 2 years ago

I am experiencing the same issue. image

wong-ziyi commented 2 years ago

Hi, I just solved this problem by doing the things in issue #122 Please open the file named core.py in the directory of your stream package and replace the code ax_i.legend(handles=legend_handles[1:], labels=legend_labels[1:] to ax_i.legend(handles=legend_handles[0:], labels=legend_labels[0:] in the line # 1414, 1467, 2780, and 2970.

My stream version = 1.0

image

TarekGharsalli commented 2 years ago

Hello @wong-ziyi ,

Thanks for your reply, I change the code and I check the file after, but its doesn't work bug_stream

TarekGharsalli commented 2 years ago

Hello @huidongchen ,

I tried to load the dataset here but it's doesn't work

huidongchen commented 2 years ago

It is actually an issue caused by the latest version of seaborn in which the legend object has been changed.

I have pushed several fixes. If you install the latest version from the master branch (within your current env), it should fix the issue.

git clone https://github.com/pinellolab/STREAM.git
cd STREAM
pip install .

I will try to get it updated in the Bioconda channel as well soon.

huidongchen commented 2 years ago

The issue has been fixed in stream v1.1.