pySCENIC
pySCENIC copied to clipboard
TypeError("Must supply at least one delayed object")
I used pmbc to test pyscenic, but I had this problem while running the grn step, however I followed the given steps exactly and I am sure my file is fine.
pyscenic grn --num_worker 4 --sparse --method grnboost2 -o sce.adj.csv sample.loom hs_hgnc_tfs.txt
2024-06-16 15:15:59,718 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.
2024-06-16 15:16:00,293 - pyscenic.cli.pyscenic - INFO - Inferring regulatory networks.
/home/E/user/lib/python3.9/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use.
Perhaps you already have a cluster running?
Hosting the HTTP server on port 46677 instead
warnings.warn(
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
Numba: Attempted to fork from a non-main thread, the TBB library may be in an invalid state in the child process.
preparing dask client
parsing input
creating dask graph
not shutting down client, client was created externally
finished
Traceback (most recent call last):
File "/home/E/user/bin/pyscenic", line 8, in <module>
sys.exit(main())
File "/home/E/user/lib/python3.9/site-packages/pyscenic/cli/pyscenic.py", line 713, in main
args.func(args)
File "/home/E/user/lib/python3.9/site-packages/pyscenic/cli/pyscenic.py", line 97, in find_adjacencies_command
network = method(
File "/home/E/user/lib/python3.9/site-packages/arboreto/algo.py", line 39, in grnboost2
return diy(expression_data=expression_data, regressor_type='GBM', regressor_kwargs=SGBM_KWARGS,
File "/home/E/user/lib/python3.9/site-packages/arboreto/algo.py", line 120, in diy
graph = create_graph(expression_matrix,
File "/home/E/user/lib/python3.9/site-packages/arboreto/core.py", line 450, in create_graph
all_meta_df = from_delayed(delayed_meta_dfs, meta=_META_SCHEMA)
File "/home/E/user/lib/python3.9/site-packages/dask_expr/io/_delayed.py", line 101, in from_delayed
raise TypeError("Must supply at least one delayed object")
TypeError: Must supply at least one delayed object
Can you try?
arboreto_with_multiprocessing.py --num_worker 4 --sparse --method grnboost2 -o sce.adj.csv sample.loom hs_hgnc_tfs.txt
Can you try?
arboreto_with_multiprocessing.py --num_worker 4 --sparse --method grnboost2 -o sce.adj.csv sample.loom hs_hgnc_tfs.txt
I tried this command and it seems ok.
I met same bug.
I had the same error as well
The problem with [TypeError: Must supply at least one delayed object should be fixed if you install via bioconda, as I just pinned the respective dask-expr<1.0.0 version in the arboreto package. So this should now install a working version of pyscenic:
conda create -n pyscenic -c conda-forge -b bioconda pyscenic
The original suggestion for this pinning comes from a comment in one of the issues here.