illuminate6060 / SpotGF

SpotGF: Denoising Spatially Resolved Transcriptomics Data Using an Optimal Transport-Based Gene Filtering Algorithm
MIT License
9 stars 1 forks source link

TypeError: 'MultiPoint' object is not iterable #4

Open xiaoyuanjianguo123 opened 4 weeks ago

xiaoyuanjianguo123 commented 4 weeks ago

When I run the code in Jupyter Book, I encounter the following issue. How can I resolve it? I didn't modify any of the code


RemoteTraceback Traceback (most recent call last) RemoteTraceback: """ Traceback (most recent call last): File "/opt/conda/envs/SpotGF/lib/python3.7/multiprocessing/pool.py", line 121, in worker result = (True, func(*args, **kwds)) File "/opt/conda/envs/SpotGF/lib/python3.7/multiprocessing/pool.py", line 47, in starmapstar return list(itertools.starmap(args[0], args[1])) File "/deep/SpotGF-main/SpotGF.py", line 134, in calculate_ot gene = [] File "/opt/conda/envs/SpotGF/lib/python3.7/site-packages/alphashape/optimizealpha.py", line 100, in optimizealpha if _testalpha(points, test_alpha): File "/opt/conda/envs/SpotGF/lib/python3.7/site-packages/alphashape/optimizealpha.py", line 41, in _testalpha return all([polygon.intersects(point) for point in points]) TypeError: 'MultiPoint' object is not iterable """

The above exception was the direct cause of the following exception:

TypeError Traceback (most recent call last) /tmp/ipykernel_163981/864656051.py in 14 15 ## ---> 16 GF_df = spotgf.calculate_GFscore(gem_path, binsize) ... --> 657 raise self._value 658 659 def _set(self, i, obj):

TypeError: 'MultiPoint' object is not iterable Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...

Thanks!!!

xiaoyuanjianguo123 commented 4 weeks ago

Thank you, lowering the version can solve the problem

WeijiaSu commented 3 weeks ago

Thank you, lowering the version can solve the problem

Hello,

I got the same error. May I ask which version that you used that can solve the problem?

Thanks for your help. Weijia

xiaoyuanjianguo123 commented 3 weeks ago

Thank you, lowering the version can solve the problem

Hello,

I got the same error. May I ask which version that you used that can solve the problem?

Thanks for your help. Weijia

I use shapely==1.8

illuminate6060 commented 3 weeks ago

I use the following environment is not reported error, you can try it. I hope you try the new version of SpotGF, i have updated it~

python==3.9.19 numpy==1.23.5 pot==0.8.2 pandas==1.4.0 matplotlib==3.5.0 scipy==1.10.0 descartes==1.1.0 alphashape==1.3.1 shapely==1.8.5.post1 scanpy==1.9.2 seaborn==0.13.2