aertslab / pycisTopic

pycisTopic is a Python module to simultaneously identify cell states and cis-regulatory topics from single cell epigenomics data.
Other
58 stars 12 forks source link

import export_pseudobulk [ERROR] #108

Closed cbiagii closed 9 months ago

cbiagii commented 10 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!!

foxberrysquash commented 10 months ago

I had the same problem, solved totally by switching to Python 3.10

SeppeDeWinter commented 9 months ago

Hi @cbiagii and @foxberrysquash

Using this commit it should now also work with python version 3.8.

This commit https://github.com/aertslab/scatac_fragment_tools/commit/5a3f5383d0b681ee1a407cc0053c4b109f9881ba.

All the best,

Seppe

cbiagii commented 9 months ago

Thank your help, @SeppeDeWinter; it works for me now!