Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] #607

Open
wuxiangning opened this issue Feb 25, 2025 · 0 comments
Open

[BUG] #607

wuxiangning opened this issue Feb 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@wuxiangning
Copy link

MY code:
import subprocess

构建 PySCENIC 命令

command = [
r"E:\Ana\envs\pyscenic\Scripts\pyscenic.exe", "ctx", "step1out_grn1.tsv",
"hg38_500bp_up_100bp_down_full_tx_v10_clust.genes_vs_motifs.rankings.feather",
"hg38_10kbp_up_10kbp_down_full_tx_v10_clust.genes_vs_motifs.rankings.feather",
"--annotations_fname", "motifs-v10nr_clust-nr.hgnc-m0.001-o0.0.tbl",
"--expression_mtx_fname", "LIHC_9Neu_random300_cells.loom",
"--mode", "dask_multiprocessing",
"--output", "step2out_ctx——tes.tsv",
"--num_workers", "14"
]

运行命令并捕获输出和错误

result = subprocess.run(command, capture_output=True, text=True)

打印标准输出和错误信息

print("stdout:", result.stdout)
print("stderr:", result.stderr)

the error messeage:
stdout:
stderr:
2025-02-25 22:10:17,997 - pyscenic.cli.pyscenic - INFO - Creating modules.

2025-02-25 22:10:18,163 - pyscenic.cli.pyscenic - INFO - Loading expression matrix.

2025-02-25 22:10:18,263 - pyscenic.utils - INFO - Calculating Pearson correlations.

2025-02-25 22:10:18,323 - pyscenic.utils - WARNING - Note on correlation calculation: the default behaviour for calculating the correlations has changed after pySCENIC verion 0.9.16. Previously, the default was to calculate the correlation between a TF and target gene using only cells with non-zero expression values (mask_dropouts=True). The current default is now to use all cells 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_adjacencies function, or '--mask_dropouts' from the CLI.
Dropout masking is currently set to [False].

2025-02-25 22:10:22,401 - pyscenic.utils - INFO - Creating modules.

2025-02-25 22:10:39,796 - pyscenic.cli.pyscenic - INFO - Loading databases.

2025-02-25 22:10:39,931 - pyscenic.cli.pyscenic - INFO - Calculating regulons.
Traceback (most recent call last):
File "E:\Ana\envs\pyscenic\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "E:\Ana\envs\pyscenic\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "E:\Ana\envs\pyscenic\Scripts\pyscenic.exe_main
.py", line 7, in
File "E:\Ana\envs\pyscenic\lib\site-packages\pyscenic\cli\pyscenic.py", line 713, in main
args.func(args)
File "E:\Ana\envs\pyscenic\lib\site-packages\pyscenic\cli\pyscenic.py", line 236, in prune_targets_command
df_motifs = calc_func(
File "E:\Ana\envs\pyscenic\lib\site-packages\pyscenic\prune.py", line 424, in prune2df
return _distributed_calc(
File "E:\Ana\envs\pyscenic\lib\site-packages\pyscenic\prune.py", line 351, in _distributed_calc
return create_graph().compute(
File "E:\Ana\envs\pyscenic\lib\site-packages\pyscenic\prune.py", line 340, in create_graph
return aggregate_func(
File "E:\Ana\envs\pyscenic\lib\site-packages\dask_expr\io_delayed.py", line 114, in from_delayed
if len(dfs) == 0:
TypeError: object of type 'generator' has no len()

thanks!

@wuxiangning wuxiangning added the bug Something isn't working label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant