pySCENIC
pySCENIC copied to clipboard
Dask error on ctx step (CLI)
Using the pySCENIC 0.9.4 CLI, I get the following error on the ctx step. This seems to be related to the most recent version of dask (v1.1.0), since when I downgrade dask to version 1.0.0 this step works again with no error.
$ pyscenic ctx adj.tsv genome-ranking.feather --annotations_fname motifs.tbl --expression_mtx_fname expr_mat.tsv --mode "dask_multiprocessing" --output reg.csv
2019-01-30 16:00:32,877 - pyscenic.cli.pyscenic - INFO - Creating modules.
2019-01-30 16:00:32,887 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.
/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/utils.py:138: RuntimeWarning: invalid value encountered in greater
regulations = (rhos > rho_threshold).astype(int) - (rhos < -rho_threshold).astype(int)
/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/utils.py:138: RuntimeWarning: invalid value encountered in less
regulations = (rhos > rho_threshold).astype(int) - (rhos < -rho_threshold).astype(int)
2019-01-30 16:00:34,026 - pyscenic.cli.pyscenic - INFO - Loading databases.
2019-01-30 16:00:34,026 - pyscenic.cli.pyscenic - INFO - Calculating regulons.
[ ] | 0% Completed | 12.7s
Traceback (most recent call last):
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/bin/pyscenic", line 11, in <module>
sys.exit(main())
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/cli/pyscenic.py", line 402, in main
args.func(args)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/cli/pyscenic.py", line 155, in prune_targets_command
num_workers=args.num_workers)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/prune.py", line 351, in prune2df
num_workers, module_chunksize)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/pyscenic/prune.py", line 300, in _distributed_calc
return create_graph().compute(scheduler='processes', num_workers=num_workers if num_workers else cpu_count())
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/base.py", line 156, in compute
(result,) = compute(self, traverse=False, **kwargs)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/base.py", line 398, in compute
results = schedule(dsk, keys, **kwargs)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/multiprocessing.py", line 192, in get
raise_exception=reraise, **kwargs)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/local.py", line 459, in get_async
raise_exception(exc, tb)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/compatibility.py", line 111, in reraise
raise exc.with_traceback(tb)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/local.py", line 230, in execute_task
result = _execute_task(task, data)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/core.py", line 119, in _execute_task
return func(*args2)
File "/home/luna.kuleuven.be/u0125489/chris/envs/pyscenic/lib/python3.6/site-packages/dask/dataframe/utils.py", line 587, in check_meta
errmsg))
ValueError: Metadata mismatch found in `from_delayed`.
The columns in the computed data do not match the columns in the provided metadata.
MultiIndex(levels=[['Enrichment'], ['AUC', 'Annotation', 'Context', 'MotifSimilarityQvalue', 'NES', 'OrthologousIdentity', 'RankAtMax', 'TargetGenes']],
labels=[[0, 0, 0, 0, 0, 0, 0, 0], [0, 4, 3, 5, 1, 2, 7, 6]])
:MultiIndex(levels=[['Enrichment'], ['AUC', 'Annotation', 'Context', 'MotifSimilarityQvalue', 'NES', 'OrthologousIdentity', 'RankAtMax', 'TargetGenes']],
labels=[[0, 0, 0, 0, 0, 0, 0, 0], [0, 1, 2, 3, 4, 5, 6, 7]],
sortorder=0)