aertslab / scenicplus

SCENIC+ is a python package to build gene regulatory networks (GRNs) using combined or separate single-cell gene expression (scRNA-seq) and single-cell chromatin accessibility (scATAC-seq) data.
Other
185 stars 29 forks source link

Missing files for `scenicplus init_snakemake --out_dir` #440

Closed pavelToman closed 2 months ago

pavelToman commented 3 months ago

Hello, I am working for University in Gent, we are using EasyBuild to provide researchers scientific software on HPC. I am working on scenicplus to be installed on HPC.

Describe the bug After installation there are missing files config.yaml and Snakefile in snakemake dir.

To Reproduce run scenicplus init_snakemake --out_dir test/

Error output

# Traceback (most recent call last):
    # File "/scratch/gent/vo/001/gvo00117/easybuild/RHEL8/cascadelake-ampere-ib/software/scenicplus/1.0a1-18072024-foss-2023a/bin/scenicplus", line 8, in <module>
    #     sys.exit(main())
    #             ^^^^^^
    # File "/scratch/gent/vo/001/gvo00117/easybuild/RHEL8/cascadelake-ampere-ib/software/scenicplus/1.0a1-18072024-foss-2023a/lib/python3.11/site-packages/scenicplus/cli/scenicplus.py", line 1137, in main
    #     args.func(args)
    # File "/scratch/gent/vo/001/gvo00117/easybuild/RHEL8/cascadelake-ampere-ib/software/scenicplus/1.0a1-18072024-foss-2023a/lib/python3.11/site-packages/scenicplus/cli/scenicplus.py", line 24, in init_snakemake
    #     init_snakemake_folder(
    # File "/scratch/gent/vo/001/gvo00117/easybuild/RHEL8/cascadelake-ampere-ib/software/scenicplus/1.0a1-18072024-foss-2023a/lib/python3.11/site-packages/scenicplus/cli/commands.py", line 46, in init_snakemake_folder
    #     shutil.copy(config_file, os.path.join(out_dir, "Snakemake", "config", "config.yaml"))
    # File "/apps/gent/RHEL8/cascadelake-ib/software/Python/3.11.3-GCCcore-12.3.0/lib/python3.11/shutil.py", line 419, in copy
    #     copyfile(src, dst, follow_symlinks=follow_symlinks)
    # File "/apps/gent/RHEL8/cascadelake-ib/software/Python/3.11.3-GCCcore-12.3.0/lib/python3.11/shutil.py", line 256, in copyfile
    #     with open(src, 'rb') as fsrc:
    #         ^^^^^^^^^^^^^^^
    # FileNotFoundError: [Errno 2] No such file or directory: 
    # '/scenicplus/1.0a1-18072024-foss-2023a/lib/python3.11/site-packages/scenicplus/snakemake/config.yaml'

Expected behavior During installation the files should be copied.

Version (please complete the following information):

Additional context Seems it is caused by the migration to pyproject.toml. There are missing something like:

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools.package-data]
'src.scenicplus.snakemake' = ["*"]

to make the non python files to be copied. I tried these but still not working.

SeppeDeWinter commented 3 months ago

Hi @pavelToman

Thank you for opening an issue. I'm not sure why it is not working for you. The solution you suggest is also the solution I would try ...

Can you share some minimal example on how you are setting up the code? For me everything is running fine in a fresh install (using conda environments).

All the best,

Seppe

pavelToman commented 3 months ago

Hello @SeppeDeWinter, in EasyBuild I can not use conda, so everything must be build/install from sources. Scenicplus is installed by pip install.

Another problem is with the version of dependencies - for some of them I can choose the version and let them be installed by pip (exts_list), but for the more complex dependencies I need use the version that is already in EasyBuild (dependencies/builddependencies).

For a details you can look at the easyconfig for scenicplus, I created. It works now :) https://github.com/easybuilders/easybuild-easyconfigs/pull/21085/files#diff-c515894f8b692c541bf867a0783639ee9c81e8e24c20a6163299fcda2cc5a53b