aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
163 stars 27 forks source link

'unsupported operand type' error in import export_pseudobulk #292

Closed cbiagii closed 5 months ago

cbiagii commented 5 months ago

After installing SCENIC+ using the instructions in the GitHub repository (Python 3.8), I tried to load the modules and functions to run the tool. Specifically, when I tried to run the following command, an error was returned that I couldn't identify a solution for:

Command:

from pycisTopic.pseudobulk_peak_calling import export_pseudobulk

Error:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/cao385/envs/scenicplus/lib/python3.8/site-packages/pycisTopic/pseudobulk_peak_calling.py", line 16, in <module>
    from scatac_fragment_tools.library.bigwig.fragments_to_bigwig import (
  File "/home/cao385/envs/scenicplus/lib/python3.8/site-packages/scatac_fragment_tools/library/bigwig/fragments_to_bigwig.py", line 31, in <module>
    def normalise_filepath(path: str | Path, check_not_directory: bool = True) -> str:
TypeError: unsupported operand type(s) for |: 'type' and 'type'

Versions:

I've read that this could be an Python version problem since the use of operand | is possible from Python version 3.10, but I'm not so sure because I don't have a profound knowledge of Python at this level.

Would you happen to have any solutions or guidance so I can use the tool without any problems?

Many many thanks for your help!! Carlos

Gut2Sdu commented 5 months ago

I have encountered the same issue as well

SeppeDeWinter commented 5 months ago

Hi @cbiagii and @Gut2Sdu

Please refer to: https://github.com/aertslab/pycisTopic/issues/108#issuecomment-1908976584 and https://github.com/aertslab/pycisTopic/issues/108#issuecomment-1908976584.

All the best,

Seppe