xiaoyeye / TFvelo

40 stars 5 forks source link

Error with `write_knn_indices` Argument in `neighbors.compute_neighbors` Method on MacBookAir(M2)/macOS Ventura 13.8 #9

Open tyaoi opened 7 months ago

tyaoi commented 7 months ago

Hello,

While running TFvelo_run_demo.py with the dataset name 'pancreas', I encountered a TypeError indicating that an unexpected keyword argument write_knn_indices was passed to the compute_neighbors method in neighbors.py. Here's the specific error message:

TypeError: Neighbors.compute_neighbors() got an unexpected keyword argument 'write_knn_indices'

Upon investigation, it appears that the write_knn_indices=True argument in the compute_neighbors function call (in neighbors.py) is not recognized by the scanpy.Neighbors.compute_neighbors method, leading to this error.

As a temporary fix, I removed the write_knn_indices=True argument from the function call, which resolved the error and allowed the script to run successfully.

Could you please look into this issue? It may help to either update the documentation to reflect the current method parameters or adjust the function call in TFvelo to match the expected arguments of the scanpy.Neighbors.compute_neighbors method.

Additionally, I've attached the environment.yml file for my Conda environment to help with reproducing the issue. This should provide a clear view of all the packages and their versions used in my setup.

In addition to the previous issue, I encountered a problem related to matplotlib version compatibility. Specifically, the script raised an AttributeError due to the absence of mplDeprecation in matplotlib.cbook. Here is the exact error message:

AttributeError: module 'matplotlib.cbook' has no attribute 'mplDeprecation'

This issue suggests that the current code may not be fully compatible with the installed version of matplotlib. Adjusting the code to accommodate changes in matplotlib or specifying compatible version requirements might help avoid similar issues in the future.

I have also included details of my environment in the attached environment.yml file, which lists the version of matplotlib I used. This should aid in diagnosing the compatibility issue.

Thank you for your time and effort in developing and maintaining TFvelo.

name: TFvelo_env
channels:
  - conda-forge
  - bioconda
  - defaults
dependencies:
  - absl-py=2.1.0=pyhd8ed1ab_0
  - anndata=0.10.6=pyhd8ed1ab_0
  - annotated-types=0.6.0=pyhd8ed1ab_0
  - anyio=3.7.1=pyhd8ed1ab_0
  - array-api-compat=1.6=pyhd8ed1ab_0
  - arrow=1.3.0=pyhd8ed1ab_0
  - beautifulsoup4=4.12.3=pyha770c72_0
  - blessed=1.19.1=pyhe4f9e05_2
  - boto3=1.34.74=pyhd8ed1ab_0
  - botocore=1.34.74=pyge310_1234567_0
  - brotli=1.1.0=hb547adb_1
  - brotli-bin=1.1.0=hb547adb_1
  - brotli-python=1.1.0=py311ha891d26_1
  - bzip2=1.0.8=h93a5062_5
  - c-ares=1.28.1=h93a5062_0
  - ca-certificates=2024.2.2=hf0a4a13_0
  - cachecontrol=0.14.0=pyhd8ed1ab_0
  - cachecontrol-with-filecache=0.14.0=pyhd8ed1ab_0
  - cached-property=1.5.2=hd8ed1ab_1
  - cached_property=1.5.2=pyha770c72_1
  - certifi=2024.2.2=pyhd8ed1ab_0
  - cffi=1.16.0=py311h4a08483_0
  - charset-normalizer=3.3.2=pyhd8ed1ab_0
  - chex=0.1.83=pyhd8ed1ab_0
  - cleo=2.1.0=pyhd8ed1ab_0
  - click=8.1.7=unix_pyh707e725_0
  - colorama=0.4.6=pyhd8ed1ab_0
  - contextlib2=21.6.0=pyhd8ed1ab_0
  - contourpy=1.2.0=py311hd03642b_0
  - crashtest=0.4.1=pyhd8ed1ab_0
  - croniter=1.3.15=pyhd8ed1ab_0
  - cycler=0.12.1=pyhd8ed1ab_0
  - dateutils=0.6.12=py_0
  - deepdiff=6.7.1=pyhd8ed1ab_0
  - distlib=0.3.8=pyhd8ed1ab_0
  - dm-tree=0.1.8=py311h4acf6a1_0
  - docrep=0.3.2=pyh44b312d_0
  - dulwich=0.21.7=py311h05b510d_0
  - et_xmlfile=1.1.0=pyhd8ed1ab_0
  - exceptiongroup=1.2.0=pyhd8ed1ab_2
  - fastapi=0.110.0=pyhd8ed1ab_0
  - filelock=3.13.3=pyhd8ed1ab_0
  - flax=0.6.1=pyhd8ed1ab_1
  - fonttools=4.50.0=py311h05b510d_0
  - freetype=2.12.1=hadb7bae_2
  - fsspec=2023.12.2=pyhca7485f_0
  - get-annotations=0.1.2=pyhd8ed1ab_0
  - gmp=6.3.0=hebf3989_1
  - gmpy2=2.1.2=py311h2ba9262_1
  - h11=0.14.0=pyhd8ed1ab_0
  - h5py=3.10.0=nompi_py311hd00467f_101
  - hdf5=1.14.3=nompi_h5bb55e9_100
  - icu=73.2=hc8870d7_0
  - idna=3.6=pyhd8ed1ab_0
  - importlib-metadata=7.1.0=pyha770c72_0
  - importlib_metadata=7.1.0=hd8ed1ab_0
  - inquirer=3.1.4=pyhd8ed1ab_0
  - itsdangerous=2.1.2=pyhd8ed1ab_0
  - jaraco.classes=3.3.1=pyhd8ed1ab_0
  - jax=0.4.13=pyhd8ed1ab_0
  - jaxlib=0.4.12=cpu_py311h2dd720e_1
  - jinja2=3.1.3=pyhd8ed1ab_0
  - jmespath=1.0.1=pyhd8ed1ab_0
  - joblib=1.3.2=pyhd8ed1ab_0
  - keyring=24.3.1=py311h267d04e_0
  - kiwisolver=1.4.5=py311he4fd1f5_1
  - krb5=1.21.2=h92f50d5_0
  - lcms2=2.16=ha0e7c42_0
  - legacy-api-wrap=1.4=pyhd8ed1ab_0
  - lerc=4.0.0=h9a09cb3_0
  - libabseil=20230125.3=cxx17_h13dd4ca_0
  - libaec=1.1.3=hebf3989_0
  - libblas=3.9.0=21_osxarm64_openblas
  - libbrotlicommon=1.1.0=hb547adb_1
  - libbrotlidec=1.1.0=hb547adb_1
  - libbrotlienc=1.1.0=hb547adb_1
  - libcblas=3.9.0=21_osxarm64_openblas
  - libcurl=8.7.1=h2d989ff_0
  - libcxx=16.0.6=h4653b0c_0
  - libdeflate=1.20=h93a5062_0
  - libedit=3.1.20191231=hc8eb9b7_2
  - libev=4.33=h93a5062_2
  - libexpat=2.6.2=hebf3989_0
  - libffi=3.4.2=h3422bc3_5
  - libgfortran=5.0.0=13_2_0_hd922786_3
  - libgfortran5=13.2.0=hf226fd6_3
  - libgrpc=1.56.2=h9075ed4_1
  - libhwloc=2.9.3=default_h4394839_1009
  - libiconv=1.17=h0d3ecfb_2
  - libjpeg-turbo=3.0.0=hb547adb_1
  - liblapack=3.9.0=21_osxarm64_openblas
  - libllvm14=14.0.6=hd1a9a77_4
  - libnghttp2=1.58.0=ha4dd798_1
  - libopenblas=0.3.26=openmp_h6c19121_0
  - libpng=1.6.43=h091b4b1_0
  - libprotobuf=4.23.3=hf32f9b9_1
  - libsqlite=3.45.2=h091b4b1_0
  - libssh2=1.11.0=h7a5bd25_0
  - libtiff=4.6.0=h07db509_3
  - libuv=1.48.0=h93a5062_0
  - libwebp-base=1.3.2=hb547adb_0
  - libxcb=1.15=hf346824_0
  - libxml2=2.12.6=h0d0cfa8_1
  - libzlib=1.2.13=h53f4e23_5
  - lightning=2.0.4=pyhd8ed1ab_0
  - lightning-cloud=0.5.65=pyhd8ed1ab_0
  - lightning-utilities=0.11.2=pyhd8ed1ab_0
  - llvm-openmp=18.1.2=hcd81f8e_0
  - llvmlite=0.42.0=py311hf5d242d_1
  - loompy=3.0.6=py_0
  - markdown-it-py=3.0.0=pyhd8ed1ab_0
  - markupsafe=2.1.5=py311h05b510d_0
  - matplotlib=3.7.3=py311ha1ab1f8_0
  - matplotlib-base=3.7.3=py311h3bc9839_0
  - mdurl=0.1.2=pyhd8ed1ab_0
  - ml-collections=0.1.1=pyhd8ed1ab_0
  - ml_dtypes=0.3.2=py311hfbe21a1_0
  - more-itertools=10.2.0=pyhd8ed1ab_0
  - mpc=1.3.1=h91ba8db_0
  - mpfr=4.2.1=h9546428_0
  - mpmath=1.3.0=pyhd8ed1ab_0
  - msgpack-python=1.0.7=py311hd03642b_0
  - mudata=0.2.3=pyhd8ed1ab_0
  - multipledispatch=0.6.0=py_0
  - munkres=1.1.4=pyh9f0ad1d_0
  - natsort=8.4.0=pyhd8ed1ab_0
  - ncurses=6.4.20240210=h078ce10_0
  - networkx=3.2.1=pyhd8ed1ab_0
  - nomkl=1.0=h5ca1d4c_0
  - numba=0.59.1=py311h00351ea_0
  - numpy=1.26.4=py311h7125741_0
  - numpy_groupies=0.10.2=pyhd8ed1ab_0
  - numpyro=0.13.2=pyhd8ed1ab_0
  - openjpeg=2.5.2=h9f1df11_0
  - openpyxl=3.1.2=py311heffc1b2_0
  - openssl=3.2.1=h0d3ecfb_1
  - opt_einsum=3.3.0=pyhc1e730c_2
  - optax=0.2.2=pyhd8ed1ab_0
  - ordered-set=4.1.0=pyhd8ed1ab_0
  - orjson=3.9.15=py311h94f323b_0
  - packaging=24.0=pyhd8ed1ab_0
  - pandas=2.2.1=py311hfbe21a1_0
  - patsy=0.5.6=pyhd8ed1ab_0
  - pexpect=4.9.0=pyhd8ed1ab_0
  - pillow=10.2.0=py311hb9c5795_0
  - pip=24.0=pyhd8ed1ab_0
  - pkginfo=1.10.0=pyhd8ed1ab_0
  - platformdirs=4.2.0=pyhd8ed1ab_0
  - poetry=1.8.2=osx_pyh534df25_0
  - poetry-core=1.9.0=pyhd8ed1ab_0
  - poetry-plugin-export=1.7.1=pyhd8ed1ab_0
  - psutil=5.9.8=py311h05b510d_0
  - pthread-stubs=0.4=h27ca646_1001
  - ptyprocess=0.7.0=pyhd3deb0d_0
  - pycparser=2.22=pyhd8ed1ab_0
  - pydantic=2.6.4=pyhd8ed1ab_0
  - pydantic-core=2.16.3=py311h94f323b_0
  - pygments=2.17.2=pyhd8ed1ab_0
  - pyjwt=2.8.0=pyhd8ed1ab_1
  - pynndescent=0.5.12=pyhca7485f_0
  - pyparsing=3.1.2=pyhd8ed1ab_0
  - pyproject_hooks=1.0.0=pyhd8ed1ab_0
  - pyro-api=0.1.2=pyhd8ed1ab_0
  - pyro-ppl=1.9.0=pyhd8ed1ab_0
  - pysocks=1.7.1=pyha2e5f31_6
  - python=3.11.8=hdf0ec26_0_cpython
  - python-build=1.2.1=pyhd8ed1ab_0
  - python-dateutil=2.9.0=pyhd8ed1ab_0
  - python-editor=1.0.4=py_0
  - python-fastjsonschema=2.19.1=pyhd8ed1ab_0
  - python-installer=0.7.0=pyhd8ed1ab_0
  - python-multipart=0.0.9=pyhd8ed1ab_0
  - python-tzdata=2024.1=pyhd8ed1ab_0
  - python_abi=3.11=4_cp311
  - pytorch=2.0.0=cpu_generic_py311h35eba3d_1
  - pytorch-lightning=2.2.1=pyhd8ed1ab_0
  - pytz=2024.1=pyhd8ed1ab_0
  - pyyaml=6.0.1=py311heffc1b2_1
  - rapidfuzz=3.7.0=py311h92babd0_0
  - re2=2023.03.02=hc5e2d97_0
  - readchar=4.0.5=pyhd8ed1ab_0
  - readline=8.2=h92ec313_1
  - requests=2.31.0=pyhd8ed1ab_0
  - requests-toolbelt=1.0.0=pyhd8ed1ab_0
  - rich=13.7.1=pyhd8ed1ab_0
  - s3transfer=0.10.1=pyhd8ed1ab_0
  - scanpy=1.10.0=pyhd8ed1ab_0
  - scikit-learn=1.4.1.post1=py311h696fe38_0
  - scipy=1.12.0=py311h4f9446f_2
  - scvelo=0.2.5=pyhd8ed1ab_0
  - scvi-tools=1.1.2=pyhd8ed1ab_0
  - seaborn=0.13.2=hd8ed1ab_0
  - seaborn-base=0.13.2=pyhd8ed1ab_0
  - session-info=1.0.0=pyhd8ed1ab_0
  - setuptools=69.2.0=pyhd8ed1ab_0
  - shellingham=1.5.4=pyhd8ed1ab_0
  - six=1.16.0=pyh6c4a22f_0
  - sleef=3.5.1=h156473d_2
  - sniffio=1.3.1=pyhd8ed1ab_0
  - soupsieve=2.5=pyhd8ed1ab_1
  - sparse=0.15.1=pyhd8ed1ab_1
  - starlette=0.36.3=pyhd8ed1ab_0
  - starsessions=1.3.0=pyhd8ed1ab_0
  - statsmodels=0.14.1=py311h9ea6feb_0
  - stdlib-list=0.10.0=pyhd8ed1ab_0
  - sympy=1.12=pypyh9d50eac_103
  - tbb=2021.11.0=h2ffa867_1
  - threadpoolctl=3.4.0=pyhc1e730c_0
  - tk=8.6.13=h5083fa2_1
  - tomli=2.0.1=pyhd8ed1ab_0
  - tomlkit=0.12.4=pyha770c72_0
  - toolz=0.12.1=pyhd8ed1ab_0
  - torchmetrics=1.3.2=pyhd8ed1ab_0
  - tornado=6.4=py311h05b510d_0
  - tqdm=4.66.2=pyhd8ed1ab_0
  - traitlets=5.14.2=pyhd8ed1ab_0
  - trove-classifiers=2024.3.25=pyhd8ed1ab_0
  - types-python-dateutil=2.9.0.20240316=pyhd8ed1ab_0
  - typing-extensions=4.10.0=hd8ed1ab_0
  - typing_extensions=4.10.0=pyha770c72_0
  - tzdata=2024a=h0c530f3_0
  - umap-learn=0.5.5=py311h267d04e_1
  - urllib3=2.2.1=pyhd8ed1ab_0
  - uvicorn=0.29.0=py311h267d04e_0
  - virtualenv=20.25.1=pyhd8ed1ab_0
  - wcwidth=0.2.13=pyhd8ed1ab_0
  - websocket-client=1.7.0=pyhd8ed1ab_0
  - websockets=11.0.3=py311heffc1b2_1
  - wheel=0.43.0=pyhd8ed1ab_1
  - xarray=2024.3.0=pyhd8ed1ab_0
  - xattr=1.1.0=py311h05b510d_0
  - xlrd=1.2.0=pyh9f0ad1d_1
  - xorg-libxau=1.0.11=hb547adb_0
  - xorg-libxdmcp=1.1.3=h27ca646_0
  - xz=5.2.6=h57fd34a_0
  - yaml=0.2.5=h3422bc3_2
  - zipp=3.17.0=pyhd8ed1ab_0
  - zstd=1.5.5=h4f39d0f_0