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

How to install an older version of pyscenic #415

Open chentongouc opened 2 years ago

chentongouc commented 2 years ago

I analyze according to the standard tutorial, but there are always errors. This is my running log. I hope to get your reply Thanks! pyscenic ctx adj.sample.tsv $f_db_names --annotations_fname motifs-v10nr_clust-nr.hgnc-m0.001-o0.0.tbl --expression_mtx_fname thocount.loom --mode "dum_workers 20 --mask_dropouts

2022-08-18 21:09:59,915 - pyscenic.cli.pyscenic - INFO - Creating modules.

2022-08-18 21:10:00,342 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.

2022-08-18 21:10:02,356 - pyscenic.utils - INFO - Calculating Pearson correlations.

2022-08-18 21:10:02,573 - pyscenic.utils - WARNING - Note on correlation calculation: the default behaviour for calculating the correlations has chanly, the default was to calculate the correlation between a TF and target gene using only cells with non-zero expression values (mask_dropouts=True). s to match the behavior of the R verision of SCENIC. The original settings can be retained by setting 'rho_mask_dropouts=True' in the modules_from_adrom the CLI. Dropout masking is currently set to [True]. /data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/utils.py:147: RuntimeWarning: invalid value encountered in greater regulations = (rhos > rho_threshold).astype(int) - (rhos < -rho_threshold).astype(int) /data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/utils.py:147: RuntimeWarning: invalid value encountered in less regulations = (rhos > rho_threshold).astype(int) - (rhos < -rho_threshold).astype(int)

2022-08-18 21:10:09,648 - pyscenic.utils - INFO - Creating modules.

2022-08-18 21:10:31,281 - pyscenic.cli.pyscenic - INFO - Loading databases.

2022-08-18 21:10:31,281 - pyscenic.cli.pyscenic - INFO - Calculating regulons. [ ] | 0% Completed | 35.8s Traceback (most recent call last): File "/data/chent/anaconda3/bin/pyscenic", line 8, in sys.exit(main()) File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/cli/pyscenic.py", line 675, in main args.func(args) File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/cli/pyscenic.py", line 221, in prune_targets_command df_motifs = calc_func( File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/prune.py", line 400, in prune2df return _distributed_calc( File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/prune.py", line 333, in _distributed_calc return create_graph().compute( File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/base.py", line 284, in compute (result,) = compute(self, traverse=False, kwargs) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/base.py", line 566, in compute results = schedule(dsk, keys, kwargs) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/multiprocessing.py", line 219, in get result = get_async( File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/local.py", line 514, in get_async raise_exception(exc, tb) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/local.py", line 324, in reraise raise exc.with_traceback(tb) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/local.py", line 223, in execute_task result = _execute_task(task, data) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/core.py", line 121, in _execute_task return func((_execute_task(a, cache) for a in args)) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/core.py", line 121, in return func((_execute_task(a, cache) for a in args)) File "/data/chent/anaconda3/lib/python3.8/site-packages/dask/core.py", line 121, in _execute_task return func(*(_execute_task(a, cache) for a in args)) File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/transform.py", line 301, in modules2df [module2df(db, module, motif_annotations, weighted_recovery, False, module2features_func) for module in modules] File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/transform.py", line 301, in [module2df(db, module, motif_annotations, weighted_recovery, False, module2features_func) for module in modules] File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/transform.py", line 230, in module2df df_annotated_features, rccs, rankings, genes, avg2stdrcc = module2features_func( File "/data/chent/anaconda3/lib/python3.8/site-packages/pyscenic/transform.py", line 152, in module2features_auc1st_impl df = db.load(module) File "/data/chent/anaconda3/lib/python3.8/site-packages/ctxcore/rnkdb.py", line 318, in load gene_set = self.geneset.intersection(set(gs.genes)) File "cytoolz/functoolz.pyx", line 476, in cytoolz.functoolz._memoize.call File "/data/chent/anaconda3/lib/python3.8/site-packages/ctxcore/rnkdb.py", line 98, in geneset return set(self.genes) File "cytoolz/functoolz.pyx", line 476, in cytoolz.functoolz._memoize.call File "/data/chent/anaconda3/lib/python3.8/site-packages/ctxcore/rnkdb.py", line 296, in genes reader = FeatherReader(self._fname) File "/data/chent/anaconda3/lib/python3.8/site-packages/pyarrow/feather.py", line 40, in init self.open(source) File "pyarrow/feather.pxi", line 83, in pyarrow.lib.FeatherReader.open File "pyarrow/error.pxi", line 84, in pyarrow.lib.check_status pyarrow.lib.ArrowInvalid: Not a feather file

SeppeDeWinter commented 2 years ago

Hi @chentongouc

Which cistarget databases are you using? (i.e. what is stored in the $f_db_names variable?)

ghuls commented 2 years ago

pySCENIC v0.12.0 is out, which uses Feather v2 database files. https://pypi.org/project/pyscenic/