snap-stanford / mars

Discovering novel cell types across heterogenous single-cell experiments
MIT License
120 stars 36 forks source link

ValueError: too many dimensions 'str' when running MARS #8

Closed Yale73 closed 3 years ago

Yale73 commented 3 years ago

Hi MARS team,

Thanks for your help.

Today I ran a new issue.

When I ran the mars = MARS(n_clusters, params, [annotated], unannnotated, pretrain_data), I got the error: ValueError: too many dimensions 'str'

Can you help me with it?

Thanks, Yale

Yale73 commented 3 years ago

I found it is because I choose the wrong obs. I fixed it. But after I corrected it, I got new error. AttributeError: 'Namespace' object has no attribute 'device'.

Thanks for your patience. Yale

giandrickdabian commented 3 years ago

Hi, how did you solve this issue? I am currently experiencing it now.

Yale73 commented 3 years ago

@giandrickdabian I gave it up and used singleR package to annotate the cell types.

mbrbic commented 3 years ago

@giandrickdabian You can check whether the labels you are giving to the MARS are correct. If you have string labels, you need to convert them to numeric. You can check how this is done for Tabula Muris data here.

giandrick commented 3 years ago

@giandrickdabian You can check whether the labels you are giving to the MARS are correct. If you have string labels, you need to convert them to numeric. You can check how this is done for Tabula Muris data here.

Hey thanks, yes in my notebook you see that i did change them to numeric. I read somewhere something about setting reprocess input to true but idk where exactly to do that