BiomedicalMachineLearning / stLearn

A novel machine learning pipeline to analyse spatial transcriptomics data
Other
176 stars 23 forks source link

st.spatial.trajectory.pseudotimespace_global() #256

Closed yandouwahhh closed 8 months ago

yandouwahhh commented 8 months ago

Hi, I recently in learning stlearn, when I use 'st.spatial.trajectory.pseudotimespace_global()' function, the following error occurred:

Start to construct the trajectory: 6 -> 7 Traceback (most recent call last):

File "C:\Users\lfr\AppData\Local\Temp\ipykernel_52288\4050765558.py", line 1, in st.spatial.trajectory.pseudotimespace_global(data,use_label="louvain",list_clusters=["6","7"])

File "E:\Anaconda\envs\stlearn\lib\site-packages\stlearn\spatials\trajectory\pseudotimespace.py", line 55, in pseudotimespace_global global_level(

File "E:\Anaconda\envs\stlearn\lib\site-packages\stlearn\spatials\trajectory\global_level.py", line 165, in global_level H_sub = nx.algorithms.tree.minimum_spanning_arborescence(H_sub)

File "E:\Anaconda\envs\stlearn\lib\site-packages\networkx\utils\backends.py", line 412, in call return self.orig_func(*args, **kwargs)

File "E:\Anaconda\envs\stlearn\lib\site-packages\networkx\algorithms\tree\branchings.py", line 1310, in minimum_spanning_arborescence B = minimal_branching(

File "E:\Anaconda\envs\stlearn\lib\site-packages\networkx\utils\backends.py", line 412, in call return self.orig_func(*args, **kwargs)

File "E:\Anaconda\envs\stlearn\lib\site-packages\networkx\algorithms\tree\branchings.py", line 1237, in minimal_branching if w > max_weight:

TypeError: '<' not supported between instances of 'float' and 'NoneType'

Hope to get your reply!

yandouwahhh commented 8 months ago

conda list

packages in environment at E:\Anaconda\envs\stlearn:

#

Name Version Build Channel

_tflow_select 2.3.0 mkl
absl-py 2.0.0 pyhd8ed1ab_0 conda-forge aiohttp 3.8.1 py310he2412df_1 conda-forge aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge alabaster 0.7.12 pyhd3eb1b0_0
anndata 0.10.2 pyhd8ed1ab_0 conda-forge aom 3.5.0 h63175ca_0 conda-forge array-api-compat 1.4 pyhd8ed1ab_0 conda-forge arrow 1.2.3 py310haa95532_1 astroid 2.14.2 py310haa95532_0 astunparse 1.6.3 pyhd8ed1ab_0 conda-forge async-timeout 4.0.3 pyhd8ed1ab_0 conda-forge atomicwrites 1.4.0 py_0 attrs 23.1.0 pyh71513ae_1 conda-forge autopep8 1.6.0 pyhd3eb1b0_1 babel 2.11.0 py310haa95532_0 backcall 0.2.0 pyhd3eb1b0_0 bcrypt 3.2.0 py310h2bbff1b_1 beautifulsoup4 4.12.2 py310haa95532_0 binaryornot 0.4.4 pyhd3eb1b0_1 black 23.10.1 pypi_0 pypi bleach 4.1.0 pyhd3eb1b0_0 blinker 1.6.3 pyhd8ed1ab_0 conda-forge blosc 1.21.5 hdccc3a2_0 conda-forge bokeh 3.3.0 pyhd8ed1ab_0 conda-forge brotli 1.0.9 ha925a31_2 brotli-python 1.0.9 py310h00ffb61_9 conda-forge bzip2 1.0.8 he774522_0 ca-certificates 2023.7.22 h56e8100_0 conda-forge cached-property 1.5.2 hd8ed1ab_1 conda-forge cached_property 1.5.2 pyha770c72_1 conda-forge cachetools 5.3.2 pyhd8ed1ab_0 conda-forge certifi 2023.7.22 pyhd8ed1ab_0 conda-forge cffi 1.16.0 py310h8d17308_0 conda-forge cfitsio 3.470 h2bbff1b_7 chardet 4.0.0 py310haa95532_1003 charls 2.2.0 h6c2663c_0 charset-normalizer 2.0.4 pyhd3eb1b0_0 click 8.1.7 py310haa95532_0 cloudpickle 3.0.0 pyhd8ed1ab_0 conda-forge colorama 0.4.6 py310haa95532_0 comm 0.1.2 py310haa95532_0 contourpy 1.1.1 py310h232114e_1 conda-forge cookiecutter 1.7.3 pyhd3eb1b0_0 cryptography 41.0.3 py310h3438e0d_0 cycler 0.12.1 pyhd8ed1ab_0 conda-forge cytoolz 0.12.2 py310h8d17308_1 conda-forge dask-core 2023.10.1 pyhd8ed1ab_0 conda-forge dav1d 1.2.1 hcfcfb64_0 conda-forge debugpy 1.6.7 py310hd77b12b_0 decorator 5.1.1 pyhd3eb1b0_0 defusedxml 0.7.1 pyhd3eb1b0_0 diff-match-patch 20200713 pyhd3eb1b0_0 dill 0.3.7 py310haa95532_0 docstring-to-markdown 0.13 pypi_0 pypi docutils 0.18.1 py310haa95532_3 entrypoints 0.4 py310haa95532_0 exceptiongroup 1.1.3 pyhd8ed1ab_0 conda-forge flake8 6.0.0 pypi_0 pypi flatbuffers 23.5.26 h63175ca_1 conda-forge fonttools 4.43.1 py310h8d17308_0 conda-forge freetype 2.12.1 hdaf720e_2 conda-forge frozenlist 1.4.0 py310h8d17308_1 conda-forge fsspec 2023.10.0 pyhca7485f_0 conda-forge gast 0.4.0 pyh9f0ad1d_0 conda-forge giflib 5.2.1 h64bf75a_3 conda-forge glpk 5.0 h8ffe710_0 conda-forge google-auth 2.23.3 pyhca7485f_0 conda-forge google-auth-oauthlib 0.4.1 py_2 conda-forge google-pasta 0.2.0 pyh8c360ce_0 conda-forge grpcio 1.42.0 py310hc60d5dd_0 h5py 3.9.0 nompi_py310h727aef9_100 conda-forge hdf5 1.14.0 nompi_h97a5375_103 conda-forge icu 58.2 ha925a31_3 idna 3.4 py310haa95532_0 igraph 0.10.7 h0e101eb_1 conda-forge imagecodecs 2023.1.23 py310h6c6a46e_0 imageio 2.31.5 pyh8c1a49c_0 conda-forge imagesize 1.4.1 py310haa95532_0 importlib-metadata 6.8.0 pyha770c72_0 conda-forge importlib_metadata 6.8.0 hd8ed1ab_0 conda-forge inflection 0.5.1 py310haa95532_0 intel-openmp 2023.2.0 h57928b3_50496 conda-forge intervaltree 3.1.0 pyhd3eb1b0_0 ipykernel 6.25.0 py310h9909e9c_0 ipython 7.31.1 py310haa95532_1 ipython_genutils 0.2.0 pyhd3eb1b0_1 isort 5.9.3 pyhd3eb1b0_0 jaraco.classes 3.2.1 pyhd3eb1b0_0 jedi 0.18.1 py310haa95532_1 jellyfish 1.0.1 py310h36a85e1_0 jinja2 3.1.2 pyhd8ed1ab_1 conda-forge jinja2-time 0.2.0 pyhd3eb1b0_3 joblib 1.3.2 pyhd8ed1ab_0 conda-forge jpeg 9e hcfcfb64_3 conda-forge jsonschema 4.17.3 py310haa95532_0 jupyter_client 8.1.0 py310haa95532_0 jupyter_core 5.3.0 py310haa95532_0 jupyterlab_pygments 0.1.2 py_0 keras 2.10.0 py310haa95532_0 keras-preprocessing 1.1.2 pyhd8ed1ab_0 conda-forge keyring 23.13.1 py310haa95532_0 kiwisolver 1.4.5 py310h232114e_1 conda-forge krb5 1.20.1 h6609f42_0 conda-forge lazy-object-proxy 1.6.0 py310h2bbff1b_0 lazy_loader 0.3 pyhd8ed1ab_0 conda-forge lcms2 2.15 ha5c8aab_0 conda-forge leidenalg 0.10.1 py310h855be57_1 conda-forge lerc 3.0 hd77b12b_0 libaec 1.1.2 h63175ca_1 conda-forge libavif 0.11.1 ha7b97ba_2 conda-forge libblas 3.9.0 19_win64_mkl conda-forge libbrotlicommon 1.0.9 hcfcfb64_9 conda-forge libbrotlidec 1.0.9 hcfcfb64_9 conda-forge libbrotlienc 1.0.9 hcfcfb64_9 conda-forge libcblas 3.9.0 19_win64_mkl conda-forge libcurl 7.88.1 h68f0423_1 conda-forge libdeflate 1.17 h2bbff1b_1 libffi 3.4.4 hd77b12b_0 libhwloc 2.9.3 default_haede6df_1009 conda-forge libiconv 1.17 h8ffe710_0 conda-forge liblapack 3.9.0 19_win64_mkl conda-forge libleidenalg 0.11.1 h91493d7_0 conda-forge libpng 1.6.39 h8cc25b3_0 libprotobuf 3.20.3 h12be248_0 conda-forge libsodium 1.0.18 h62dcd97_0 libspatialindex 1.9.3 h6c2663c_0 libssh2 1.10.0 hcd4344a_2 libtiff 4.5.1 hd77b12b_0 libwebp 1.3.2 hcfcfb64_1 conda-forge libwebp-base 1.3.2 hcfcfb64_0 conda-forge libxml2 2.11.5 hc3477c8_1 conda-forge libzlib 1.2.13 hcfcfb64_5 conda-forge libzopfli 1.0.3 h0e60522_0 conda-forge llvmlite 0.40.1 py310hb84602e_0 conda-forge locket 1.0.0 pyhd8ed1ab_0 conda-forge loompy 3.0.7 pypi_0 pypi louvain 0.8.1 py310h855be57_1 conda-forge lz4-c 1.9.4 hcfcfb64_0 conda-forge m2w64-gcc-libgfortran 5.3.0 6 conda-forge m2w64-gcc-libs 5.3.0 7 conda-forge m2w64-gcc-libs-core 5.3.0 7 conda-forge m2w64-gmp 6.1.0 2 conda-forge m2w64-libwinpthread-git 5.0.0.4634.697f757 2 conda-forge markdown 3.5 pyhd8ed1ab_0 conda-forge markupsafe 2.1.3 py310h8d17308_1 conda-forge matplotlib-base 3.5.3 py310h7329aa0_2 conda-forge matplotlib-inline 0.1.6 py310haa95532_0 mccabe 0.7.0 pypi_0 pypi mistune 0.8.4 py310h2bbff1b_1000 mkl 2023.2.0 h6a75c08_50496 conda-forge more-itertools 8.12.0 pyhd3eb1b0_0 mpir 3.0.0 he025d50_1002 conda-forge msys2-conda-epoch 20160418 1 conda-forge multidict 6.0.4 py310h8d17308_1 conda-forge munkres 1.1.4 pyh9f0ad1d_0 conda-forge mypy_extensions 1.0.0 py310haa95532_0 natsort 8.4.0 pyhd8ed1ab_0 conda-forge nbclient 0.5.13 py310haa95532_0 nbconvert 6.4.4 py310haa95532_0 nbformat 5.9.2 py310haa95532_0
nest-asyncio 1.5.6 py310haa95532_0 networkx 3.2 pyhd8ed1ab_0 conda-forge numba 0.57.1 py310h19bcfe9_0 conda-forge numpy 1.21.6 py310hcae7c84_0 conda-forge numpy-groupies 0.10.2 pypi_0 pypi numpydoc 1.5.0 py310haa95532_0 oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge openjpeg 2.5.0 ha2aaf27_2 conda-forge openssl 1.1.1w hcfcfb64_0 conda-forge opt_einsum 3.3.0 pyhc1e730c_2 conda-forge packaging 23.2 pyhd8ed1ab_0 conda-forge pandas 2.0.3 py310h1c4a608_1 conda-forge pandocfilters 1.5.0 pyhd3eb1b0_0 paramiko 2.8.1 pyhd3eb1b0_0 parso 0.8.3 pyhd3eb1b0_0 partd 1.4.1 pyhd8ed1ab_0 conda-forge pathspec 0.10.3 py310haa95532_0 patsy 0.5.3 pyhd8ed1ab_0 conda-forge pexpect 4.8.0 pyhd3eb1b0_3 pickleshare 0.7.5 pyhd3eb1b0_1003 pillow 10.0.1 py310h045eedc_0 pip 23.3 py310haa95532_0 platformdirs 3.11.0 pyhd8ed1ab_0 conda-forge pluggy 1.0.0 py310haa95532_1 pooch 1.8.0 pyhd8ed1ab_0 conda-forge poyo 0.5.0 pyhd3eb1b0_0 prompt-toolkit 3.0.36 py310haa95532_0 protobuf 3.20.3 py310h5588dad_1 conda-forge psutil 5.9.0 py310h2bbff1b_0 pthreads-win32 2.9.1 hfa6e2cd_3 conda-forge ptyprocess 0.7.0 pyhd3eb1b0_2 pyasn1 0.5.0 pyhd8ed1ab_0 conda-forge pyasn1-modules 0.3.0 pyhd8ed1ab_0 conda-forge pycodestyle 2.10.0 pypi_0 pypi pycparser 2.21 pyhd3eb1b0_0 pydocstyle 6.3.0 py310haa95532_0 pyflakes 3.0.1 pypi_0 pypi pygments 2.15.1 py310haa95532_1 pyjwt 2.8.0 pyhd8ed1ab_0 conda-forge pylint 2.16.2 py310haa95532_0 pylint-venv 3.0.3 pypi_0 pypi pyls-spyder 0.4.0 pyhd3eb1b0_0 pynacl 1.5.0 py310h8cc25b3_0 pynndescent 0.5.10 pyh1a96a4e_0 conda-forge pyopenssl 23.2.0 pyhd8ed1ab_1 conda-forge pyparsing 3.1.1 pyhd8ed1ab_0 conda-forge pyqt 5.9.2 py310hd77b12b_6 pyqt5 5.15.10 pypi_0 pypi pyqt5-qt5 5.15.2 pypi_0 pypi pyqt5-sip 12.13.0 pypi_0 pypi pyqtwebengine 5.15.6 pypi_0 pypi pyqtwebengine-qt5 5.15.2 pypi_0 pypi pyrsistent 0.18.0 py310h2bbff1b_0 pysocks 1.7.1 pyh0701188_6 conda-forge python 3.10.13 h966fe2a_0 python-dateutil 2.8.2 pyhd3eb1b0_0 python-fastjsonschema 2.16.2 py310haa95532_0 python-flatbuffers 23.5.26 pyhd8ed1ab_0 conda-forge python-igraph 0.11.2 py310hc9e38e4_1 conda-forge python-lsp-black 1.3.0 pypi_0 pypi python-lsp-jsonrpc 1.0.0 pyhd3eb1b0_0 python-lsp-server 1.7.4 pypi_0 pypi python-slugify 5.0.2 pyhd3eb1b0_0 python-tzdata 2023.3 pyhd8ed1ab_0 conda-forge python_abi 3.10 2_cp310 conda-forge pytoolconfig 1.2.5 py310haa95532_1 pytz 2023.3.post1 py310haa95532_0 pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge pywavelets 1.4.1 py310h9b08ddd_0 conda-forge pywin32 305 py310h2bbff1b_0 pywin32-ctypes 0.2.0 py310haa95532_1000 pyyaml 6.0.1 py310h8d17308_1 conda-forge pyzmq 25.1.0 py310hd77b12b_0 qdarkstyle 3.0.2 pyhd3eb1b0_0 qstylizer 0.2.2 pypi_0 pypi qt 5.9.7 vc14h73c81de_0 qtawesome 1.2.2 pypi_0 pypi qtconsole 5.4.4 pypi_0 pypi qtpy 2.4.1 pypi_0 pypi requests 2.31.0 pyhd8ed1ab_0 conda-forge requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge rope 1.7.0 py310haa95532_0 rsa 4.9 pyhd8ed1ab_0 conda-forge rtree 1.0.1 py310h2eaa2aa_0 scanpy 1.9.4 pyhd8ed1ab_0 conda-forge scikit-image 0.20.0 py310h3513d60_0 scikit-learn 1.2.2 py310hd266714_2 conda-forge scipy 1.10.1 py310h578b7cb_3 conda-forge seaborn 0.13.0 hd8ed1ab_0 conda-forge seaborn-base 0.13.0 pyhd8ed1ab_0 conda-forge session-info 1.0.0 pyhd8ed1ab_0 conda-forge setuptools 68.0.0 py310haa95532_0 sip 4.19.13 py310hd77b12b_0 six 1.16.0 pyhd3eb1b0_1 snappy 1.1.10 hfb803bf_0 conda-forge snowballstemmer 2.2.0 pyhd3eb1b0_0 sortedcontainers 2.4.0 pyhd3eb1b0_0 soupsieve 2.5 py310haa95532_0 sphinx 5.0.2 py310haa95532_0 sphinxcontrib-applehelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-devhelp 1.0.2 pyhd3eb1b0_0 sphinxcontrib-htmlhelp 2.0.0 pyhd3eb1b0_0 sphinxcontrib-jsmath 1.0.1 pyhd3eb1b0_0 sphinxcontrib-qthelp 1.0.3 pyhd3eb1b0_0 sphinxcontrib-serializinghtml 1.1.5 pyhd3eb1b0_0 spyder 5.2.2 py310haa95532_1 spyder-kernels 2.4.4 pypi_0 pypi sqlite 3.41.2 h2bbff1b_0 statsmodels 0.14.0 py310h9b08ddd_1 conda-forge stdlib-list 0.8.0 pyhd8ed1ab_0 conda-forge stlearn 0.4.12 pyhd8ed1ab_0 conda-forge tbb 2021.10.0 h91493d7_1 conda-forge tensorboard 2.10.0 py310haa95532_0 tensorboard-data-server 0.6.1 py310haa95532_0 tensorboard-plugin-wit 1.8.1 pyhd8ed1ab_0 conda-forge tensorflow 2.10.0 mkl_py310hd99672f_0 tensorflow-base 2.10.0 mkl_py310h6a7f48e_0 tensorflow-estimator 2.10.0 py310haa95532_0 termcolor 2.3.0 pyhd8ed1ab_0 conda-forge testpath 0.6.0 py310haa95532_0 text-unidecode 1.3 pyhd3eb1b0_0 textdistance 4.2.1 pyhd3eb1b0_0 texttable 1.7.0 pyhd8ed1ab_0 conda-forge threadpoolctl 3.2.0 pyha21a80b_0 conda-forge three-merge 0.1.1 pyhd3eb1b0_0 tifffile 2023.4.12 pyhd8ed1ab_0 conda-forge tinycss2 1.2.1 py310haa95532_0 tk 8.6.12 h2bbff1b_0 toml 0.10.2 pyhd3eb1b0_0 tomli 2.0.1 py310haa95532_0 tomlkit 0.11.1 py310haa95532_0 toolz 0.12.0 pyhd8ed1ab_0 conda-forge tornado 6.3.3 py310h8d17308_1 conda-forge tqdm 4.66.1 pyhd8ed1ab_0 conda-forge traitlets 5.7.1 py310haa95532_0 typing-extensions 4.8.0 hd8ed1ab_0 conda-forge typing_extensions 4.8.0 pyha770c72_0 conda-forge tzdata 2023c h04d1e81_0 ucrt 10.0.22621.0 h57928b3_0 conda-forge ujson 5.4.0 py310hd77b12b_0 umap-learn 0.5.4 py310h5588dad_0 conda-forge unicodedata2 15.1.0 py310h8d17308_0 conda-forge unidecode 1.2.0 pyhd3eb1b0_0 urllib3 2.0.6 pyhd8ed1ab_0 conda-forge vc 14.2 h21ff451_1 vc14_runtime 14.36.32532 hdcecf7f_17 conda-forge vs2015_runtime 14.36.32532 h05e6639_17 conda-forge watchdog 2.1.6 py310haa95532_0 wcwidth 0.2.5 pyhd3eb1b0_0 webencodings 0.5.1 py310haa95532_1 werkzeug 3.0.1 pyhd8ed1ab_0 conda-forge xz 5.4.2 h8cc25b3_0 yaml 0.2.5 h8ffe710_2 conda-forge yapf 0.40.2 pypi_0 pypi yarl 1.9.2 py310h8d17308_1 conda-forge zeromq 4.3.4 hd77b12b_0 zfp 1.0.0 h63175ca_4 conda-forge zipp 3.17.0 pyhd8ed1ab_0 conda-forge zlib 1.2.13 hcfcfb64_5 conda-forge zstd 1.5.5 h12be248_0 conda-forge

duypham2108 commented 8 months ago

Duplicated issue #254