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

Help with error when running scenicplus tutorial using snakemake in the step score_regions_to_single_gene #519

Open
zhli12 opened this issue Dec 2, 2024 · 0 comments

Comments

@zhli12
Copy link

zhli12 commented Dec 2, 2024

Hi all,

I'm trying to run the scenicplus tutorial here using snakemake and had an error saying descriptor '__call__' for 'type' objects doesn't apply to a 'property' object in the step score_regions_to_single_gene. I followed the steps in the tutorial and I'm not sure what's the cause for this error.

Below is the full error message:

2024-12-01 22:17:16,541 R2G          INFO     Calculating region to gene importances, using GBM method
Running using 10 cores:   0%|▏                                                                                                                                                                              | 16/19156 [00:01<27:38, 11.54it/s]joblib.externals.loky.process_executor._RemoteTraceback: 
"""
Traceback (most recent call last):
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/externals/loky/process_executor.py", line 463, in _process_worker
    r = call_item()
        ^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/externals/loky/process_executor.py", line 291, in __call__
    return self.fn(*self.args, **self.kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 589, in __call__
    return [func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 589, in <listcomp>
    return [func(*args, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/enhancer_to_gene.py", line 140, in _score_regions_to_single_gene
    from arboreto import core as arboreto_core
  File "/home/zli4/.local/lib/python3.11/site-packages/arboreto/core.py", line 12, in <module>
    from dask.dataframe import from_delayed
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/__init__.py", line 100, in <module>
    from dask.dataframe import backends, dispatch, rolling
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/backends.py", line 15, in <module>
    from dask.dataframe.core import DataFrame, Index, Scalar, Series, _Frame
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/core.py", line 36, in <module>
    from dask.dataframe import methods
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/methods.py", line 34, in <module>
    from dask.dataframe.utils import is_dataframe_like, is_index_like, is_series_like
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/utils.py", line 20, in <module>
    from dask.dataframe import (  # noqa: F401 register pandas extension types
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/_dtypes.py", line 9, in <module>
    from dask.dataframe.extensions import make_array_nonempty, make_scalar
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/extensions.py", line 8, in <module>
    from dask.dataframe.accessor import (
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 126, in <module>
    class DatetimeAccessor(Accessor):
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 81, in __init_subclass__
    _bind_property(cls, pd_cls, attr, min_version)
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/dataframe/accessor.py", line 35, in _bind_property
    setattr(cls, attr, property(derived_from(pd_cls, version=min_version)(func)))
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/utils.py", line 987, in wrapper
    method.__doc__ = _derived_from(
                     ^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/utils.py", line 940, in _derived_from
    method_args = get_named_args(method)
                  ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/dask/utils.py", line 701, in get_named_args
    s = inspect.signature(func)
        ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/inspect.py", line 3263, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/inspect.py", line 3011, in from_callable
    return _signature_from_callable(obj, sigcls=cls,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/inspect.py", line 2599, in _signature_from_callable
    call = _descriptor_get(call, obj)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/inspect.py", line 2432, in _descriptor_get
    return get(descriptor, obj, type(obj))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object
"""

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

Traceback (most recent call last):
  File "/home/zli4/.conda/envs/scenicplus/bin/scenicplus", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/cli/scenicplus.py", line 1137, in main
    args.func(args)
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/cli/scenicplus.py", line 330, in TF_to_gene
    infer_region_to_gene(
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/cli/commands.py", line 739, in infer_region_to_gene
    adj = calculate_regions_to_genes_relationships(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/enhancer_to_gene.py", line 261, in calculate_regions_to_genes_relationships
    region_to_gene_importances = _score_regions_to_genes(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.conda/envs/scenicplus/lib/python3.11/site-packages/scenicplus/enhancer_to_gene.py", line 219, in _score_regions_to_genes
    joblib.Parallel(
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 1952, in __call__
    return output if self.return_generator else list(output)
                                                ^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 1595, in _get_outputs
    yield from self._retrieve()
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 1699, in _retrieve
    self._raise_error_fast()
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 1734, in _raise_error_fast
    error_job.get_result(self.timeout)
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 736, in get_result
    return self._return_or_raise()
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/zli4/.local/lib/python3.11/site-packages/joblib/parallel.py", line 754, in _return_or_raise
    raise self._result
TypeError: descriptor '__call__' for 'type' objects doesn't apply to a 'property' object

My python version is 3.11.10, and

Below is package version:

Package                              Version
------------------------------------ -----------------
adjustText                           1.0.4
aiohappyeyeballs                     2.4.3
aiohttp                              3.9.3
aiohttp-cors                         0.7.0
aiosignal                            1.3.1
anndata                              0.10.5.post1
annotated-types                      0.7.0
annoy                                1.17.3
ansicolors                           1.1.8
anyio                                4.6.2.post1
appdirs                              1.4.4
arboreto                             0.1.6
argon2-cffi                          23.1.0
argon2-cffi-bindings                 21.2.0
argparse-dataclass                   2.0.0
array_api_compat                     1.5.1
arrow                                1.3.0
asttokens                            2.4.1
async-lru                            2.0.4
attr                                 0.3.2
attrs                                23.2.0
babel                                2.16.0
bbknn                                1.6.0
beautifulsoup4                       4.12.3
bidict                               0.23.1
bioservices                          1.11.2
bleach                               6.2.0
blessed                              1.20.0
blosc2                               2.5.1
bokeh                                3.4.0
boltons                              23.1.1
Brotli                               1.1.0
bs4                                  0.0.2
cached-property                      1.5.2
cachetools                           5.5.0
cattrs                               23.2.3
certifi                              2024.2.2
cffi                                 1.17.1
charset-normalizer                   3.3.2
click                                8.1.7
cloudpickle                          3.0.0
colorama                             0.4.6
colorful                             0.5.6
colorlog                             6.8.2
comm                                 0.2.2
conda-inject                         1.3.1
ConfigArgParse                       1.7
connection-pool                      0.0.3
contourpy                            1.2.0
cryptography                         43.0.3
ctxcore                              0.2.0
cycler                               0.12.1
Cython                               0.29.37
cytoolz                              0.12.3
dask                                 2024.2.1
dataclasses-json                     0.6.4
datrie                               0.8.2
debugpy                              1.8.9
decorator                            5.1.1
defusedxml                           0.7.1
dill                                 0.3.8
distributed                          2024.2.1
docutils                             0.20.1
dpath                                2.1.6
easydev                              0.13.1
entrypoints                          0.4
et-xmlfile                           1.1.0
exceptiongroup                       1.2.2
executing                            2.0.1
fastjsonschema                       2.19.1
fbpca                                1.0
filelock                             3.13.1
fonttools                            4.50.0
fqdn                                 1.5.1
frozendict                           2.4.0
frozenlist                           1.4.1
fsspec                               2024.3.1
future                               1.0.0
gensim                               4.3.2
geosketch                            1.2
gevent                               24.2.1
gitdb                                4.0.11
GitPython                            3.1.42
globre                               0.1.5
google-api-core                      2.22.0
google-auth                          2.35.0
googleapis-common-protos             1.65.0
gpustat                              1.1.1
greenlet                             3.0.3
grequests                            0.7.0
grpcio                               1.67.1
gseapy                               0.10.8
h11                                  0.14.0
h2                                   4.1.0
h5py                                 3.10.0
harmonypy                            0.0.9
hpack                                4.0.0
httpcore                             1.0.7
httpx                                0.27.2
humanfriendly                        10.0
hyperframe                           6.0.1
idna                                 3.6
igraph                               0.11.4
imageio                              2.34.0
immutables                           0.20
importlib-metadata                   7.0.1
importlib_resources                  6.1.2
interlap                             0.2.7
intervaltree                         3.1.0
ipykernel                            6.29.5
ipympl                               0.9.4
ipython                              8.22.2
ipywidgets                           8.1.5
isoduration                          20.11.0
jedi                                 0.19.1
Jinja2                               3.1.3
joblib                               1.3.2
json5                                0.9.28
jsonpickle                           3.0.3
jsonpointer                          3.0.0
jsonschema                           4.21.1
jsonschema-specifications            2023.12.1
jupyter_client                       8.6.3
jupyter_core                         5.7.2
jupyter-events                       0.10.0
jupyter-lsp                          2.2.5
jupyter_server                       2.14.2
jupyter_server_terminals             0.5.3
jupyterlab                           4.3.0
jupyterlab_pygments                  0.3.0
jupyterlab_server                    2.27.3
jupyterlab_widgets                   3.0.13
kaleido                              0.2.1
kiwisolver                           1.4.5
lazy_loader                          0.3
lda                                  3.0.0
leidenalg                            0.10.2
Levenshtein                          0.26.1
line-profiler                        4.1.2
llvmlite                             0.42.0
locket                               1.0.0
loompy                               3.0.7
loomxpy                              0.4.2
lxml                                 5.1.0
lz4                                  4.3.3
MACS2                                2.2.9.1
markdown-it-py                       3.0.0
MarkupSafe                           2.1.5
marshmallow                          3.21.1
matplotlib                           3.6.3
matplotlib-inline                    0.1.6
mdurl                                0.1.2
mistune                              3.0.2
mizani                               0.9.3
msgpack                              1.0.8
mudata                               0.2.3
multidict                            6.0.5
multiprocessing-on-dill              3.5.0a4
munkres                              1.1.4
mypy-extensions                      1.0.0
natsort                              8.4.0
nbclient                             0.10.0
nbconvert                            7.16.4
nbformat                             5.10.3
nbsphinx                             0.9.5
nbsphinx-link                        1.3.1
ncls                                 0.0.68
ndindex                              1.8
nest_asyncio                         1.6.0
networkx                             3.2.1
notebook_shim                        0.2.4
numba                                0.59.0
numexpr                              2.9.0
numpy                                1.26.4
numpy-groupies                       0.10.2
numpydoc                             1.8.0
nvidia-ml-py                         12.560.30
opencensus                           0.11.4
opencensus-context                   0.1.3
openpyxl                             3.1.2
overrides                            7.7.0
packaging                            24.0
pandas                               1.5.0
pandocfilters                        1.5.0
papermill                            2.6.0
parso                                0.8.3
partd                                1.4.1
patsy                                0.5.6
pexpect                              4.9.0
pickleshare                          0.7.5
pillow                               10.2.0
pip                                  24.3.1
pkgutil_resolve_name                 1.3.10
plac                                 1.4.3
platformdirs                         4.2.0
plotly                               5.19.0
plotnine                             0.12.4
ply                                  3.11
polars                               0.20.13
progressbar2                         4.4.2
prometheus_client                    0.21.0
prompt-toolkit                       3.0.43
propcache                            0.2.0
proto-plus                           1.25.0
protobuf                             5.26.0
psutil                               5.9.8
ptyprocess                           0.7.0
PuLP                                 2.8.0
pure-eval                            0.2.2
py-cpuinfo                           9.0.0
py-spy                               0.4.0
pyarrow                              15.0.0
pyarrow-hotfix                       0.6
pyasn1_modules                       0.4.1
pybedtools                           0.9.1
pybigtools                           0.1.2
pyBigWig                             0.3.22
pybiomart                            0.2.0
pycistarget                          1.0a2
pycisTopic                           2.0a0
pycparser                            2.22
pydantic                             2.9.2
pydantic_core                        2.23.4
pyfasta                              0.5.2
pygam                                0.9.0
Pygments                             2.17.2
pynndescent                          0.5.11
pyOpenSSL                            24.2.1
pyparsing                            3.1.2
PyQt5                                5.15.9
PyQt5-sip                            12.12.2
pyranges                             0.0.111
pyrle                                0.0.39
pysam                                0.22.0
pyscenic                             0.12.1+8.gd2309fe
PySocks                              1.7.1
python-dateutil                      2.9.0.post0
python-igraph                        0.11.8
python-json-logger                   2.0.7
python-Levenshtein                   0.26.1
python-utils                         3.8.2
pytz                                 2024.1
pyvis                                0.3.2
PyYAML                               6.0.1
pyzmq                                26.2.0
RapidFuzz                            3.10.1
ray                                  2.9.3
referencing                          0.34.0
requests                             2.32.3
requests-cache                       1.2.0
reretry                              0.11.8
rfc3339-validator                    0.1.4
rfc3986-validator                    0.1.1
rich                                 13.7.1
rich-argparse                        1.4.0
rpds-py                              0.18.0
rsa                                  4.9
scanorama                            1.7.4
scanpy                               1.8.2
scatac_fragment_tools                0.1.0
scenicplus                           1.0a1
scikit-image                         0.22.0
scikit-learn                         1.3.2
scipy                                1.12.0
scrublet                             0.2.3
seaborn                              0.13.2
Send2Trash                           1.8.3
setuptools                           75.6.0
sinfo                                0.3.4
sip                                  6.7.12
six                                  1.16.0
smart-open                           6.4.0
smmap                                5.0.1
snakemake                            8.5.5
snakemake-interface-common           1.17.1
snakemake-interface-executor-plugins 8.2.0
snakemake-interface-report-plugins   1.0.0
snakemake-interface-storage-plugins  3.1.1
sniffio                              1.3.1
sorted-nearest                       0.0.39
sortedcontainers                     2.4.0
soupsieve                            2.5
sphinx-rtd-theme                     3.0.1
sphinxcontrib-jquery                 4.1
stack-data                           0.6.3
statistics                           1.0.3.5
statsmodels                          0.14.1
stdlib-list                          0.10.0
stopit                               1.1.2
suds-community                       1.1.2
tables                               3.9.2
tabulate                             0.9.0
tblib                                3.0.0
tenacity                             8.2.3
terminado                            0.18.1
texttable                            1.7.0
threadpoolctl                        3.4.0
throttler                            1.2.2
tifffile                             2024.2.12
tinycss2                             1.4.0
tmtoolkit                            0.12.0
toml                                 0.10.2
tomli                                2.1.0
toolz                                0.12.1
toposort                             1.10
tornado                              6.4
tqdm                                 4.66.2
traitlets                            5.14.2
tspex                                0.6.3
types-python-dateutil                2.9.0.20241003
typing                               3.7.4.3
typing_extensions                    4.10.0
typing-inspect                       0.9.0
typing-utils                         0.1.0
umap-learn                           0.5.5
unicodedata2                         15.1.0
uri-template                         1.3.0
url-normalize                        1.4.3
urllib3                              2.2.1
wcwidth                              0.2.13
webcolors                            24.8.0
webencodings                         0.5.1
websocket-client                     1.8.0
wheel                                0.43.0
widgetsnbextension                   4.0.13
wrapt                                1.16.0
xlrd                                 2.0.1
xmltodict                            0.13.0
xyzservices                          2023.10.1
yarl                                 1.9.4
yte                                  1.5.4
zict                                 3.0.0
zipp                                 3.18.1
zope.event                           5.0
zope.interface                       6.2
zstandard                            0.23.0


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