Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with st.plot_stream() #115

Open
aradley opened this issue Jan 31, 2021 · 1 comment
Open

Error with st.plot_stream() #115

aradley opened this issue Jan 31, 2021 · 1 comment

Comments

@aradley
Copy link

aradley commented Jan 31, 2021

Hi,

Really like what I've been able to do with the software so far. Unfortunately, the functionality I was most looking forward to using, the st.plot_stream() function, appears to be pulling up an error.

I've confirmed this error on both my dataset and your example Nestorowa dataset by following your notebook examples. Everything appears to work and plot correctly up to the single cell stream plot with st.plot_stream_sc(). Sadly when I try st.plot_stream(), I get the following error.

''''
Traceback (most recent call last):
File "", line 1, in
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/stream/core.py", line 3131, in plot_stream
log_scale=log_scale,factor_zoomin=factor_zoomin)
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/stream/extra.py", line 933, in cal_stream_polygon_string
df_stream.loc[df_stream.index[id_cells],'edge'] = [x]
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/pandas/core/indexing.py", line 692, in setitem
iloc._setitem_with_indexer(indexer, value, self.name)
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/pandas/core/indexing.py", line 1635, in _setitem_with_indexer
self._setitem_with_indexer_split_path(indexer, value, name)
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/pandas/core/indexing.py", line 1672, in _setitem_with_indexer_split_path
self._setitem_with_indexer_2d_value(indexer, value)
File "/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/pandas/core/indexing.py", line 1733, in _setitem_with_indexer_2d_value
"Must have equal len keys and value when setting with an ndarray"
ValueError: Must have equal len keys and value when setting with an ndarray
''''

My first guess is this is a deprecation issue with Pandas? This also would make sense because I get this warning when importing stream:
'''
/home/ahr35/miniconda3/envs/env_stream/lib/python3.7/site-packages/rpy2/robjects/pandas2ri.py:17: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
from pandas.core.index import Index as PandasIndex
''''

Bit confused since I installed the entire STREAM environment through miniconda. Any ideas?

Thanks,

Arthur

@aradley
Copy link
Author

aradley commented Jan 31, 2021

Ok yes, I downgraded to pandas==1.0 and the problem went away.

Some extra information for yourselves. I tried this with most of your available branches/versions and got the same error, so the most recent version of pandas may be incompatible in all versions (including STREAM2).

Hope this is helpful.

Best,

Arthur

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant