aertslab / pySCENIC

pySCENIC is a lightning-fast python implementation of the SCENIC pipeline (Single-Cell rEgulatory Network Inference and Clustering) which enables biologists to infer transcription factors, gene regulatory networks and cell types from single-cell RNA-seq data.
http://scenic.aertslab.org
GNU General Public License v3.0
420 stars 179 forks source link

[BUG] Don't know what's wrong #497

Open yixxx091 opened 1 year ago

yixxx091 commented 1 year ago

Describe the bug A clear and concise description of what the bug is. Hi Previously, I run mm9 on R scenic no problem. I just first time try the pySCENIC on my own desktop. The process is exactly the test run in tutorial. Found this issue can not be solved, any idea? Is it because win11 desktop, and will probably no issue if on linux server? Once enter GRNBOOST2, just got this error.

Steps to reproduce the behavior DATA_FOLDER = "D:\User\SEU\NLG1\Pythonfiles" RESOURCES_FOLDER = "D:\Rsupport\cisTarget_databases" DATABASE_FOLDER = "D:\Rsupport\cisTarget_databases\mm10_scenic" SCHEDULER = "123.122.8.24:8786" DATABASES_GLOB = os.path.join(DATABASE_FOLDER, "mm10*rankings.feather") MOTIF_ANNOTATIONS_FNAME = os.path.join(RESOURCES_FOLDER, "motifs-v9-nr.mgi-m0.001-o0.0.tbl") MM_TFS_FNAME = os.path.join(RESOURCES_FOLDER, 'mm_mgi_tfs.txt') SC_EXP_FNAME = os.path.join(RESOURCES_FOLDER, "GSE60361_C1-3005-Expression.txt") REGULONS_FNAME = os.path.join(DATA_FOLDER, "regulons.p") MOTIFS_FNAME = os.path.join(DATA_FOLDER, "motifs.csv")

ex_matrix = pd.read_csv(SC_EXP_FNAME, sep='\t', header=0, index_col=0).T
ex_matrix.shape

tf_names = load_tf_names(MM_TFS_FNAME)
db_fnames = glob.glob(DATABASES_GLOB)

def name(fname):
    return os.path.splitext(os.path.basename(fname))[0]
    dbs = [RankingDatabase(fname=fname, name=name(fname)) for fname in db_fnames]

adjacencies = grnboost2(ex_matrix, tf_names=tf_names, verbose=True)

preparing dask client Traceback (most recent call last): File "", line 1, in File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 120, in spawn_main Traceback (most recent call last): File "", line 1, in File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 120, in spawn_main exitcode = _main(fd, parent_sentinel) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 129, in _main exitcode = _main(fd, parent_sentinel) ^^^^^^^^Traceback (most recent call last): File "", line 1, in File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 120, in spawn_main prepare(preparation_data) ^^^^^^^^^ File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 240, in prepare ^^^^^^^^^ File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 129, in _main _fixup_main_from_path(data['init_main_from_path'])
exitcode = _main(fd, parent_sentinel) File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 291, in _fixup_main_from_path prepare(preparation_data) File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 240, in prepare ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 129, in _main main_content = runpy.run_path(main_path, _fixup_main_from_path(data['init_main_from_path']) File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 291, in _fixup_main_from_path ^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 290, in run_path File "", line 254, in _get_code_from_file OSError: [Errno 22] Invalid argument: 'D:\xx\SEU\NLG1\Pythonfiles\' prepare(preparation_data) main_content = runpy.run_path(main_path, File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 240, in prepare ^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 290, in run_path File "", line 254, in _get_code_from_file OSError: [Errno 22] Invalid argument: 'D:\xx\SEU\NLG1\Pythonfiles\' _fixup_main_from_path(data['init_main_from_path']) File "C:\Users\x\AppData\Local\Programs\Python\Python311\Lib\multiprocessing\spawn.py", line 291, in _fixup_main_from_path main_content = runpy.run_path(main_path, ^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 290, in run_path File "", line 254, in _get_code_from_file OSError: [Errno 22] Invalid argument: 'D:\xx\SEU\NLG1\Pythonfiles\'

Please complete the following information:

...
ghuls commented 1 year ago

pySCENIC is only tested on Linux, so it might not work on Windows anyway, but use the command line version of pySCENIC instead of the notebook version (just 3 steps): https://pyscenic.readthedocs.io/en/latest/installation.html#command-line-interface

You are probably hitting this problem when you try to run it interactively: https://stackoverflow.com/questions/61916606/python-multiprocessing-pool-oserror-errno-22-invalid-argument