opain / GenoPred

Genotype-based Prediction (GenoPred)
https://opain.github.io/GenoPred/
GNU General Public License v3.0
66 stars 22 forks source link

Issues with Snakemake > 8.* #127

Open espenhgn opened 8 hours ago

espenhgn commented 8 hours ago

Hi @opain; thanks for this great resource.

I tried to retrace some steps here for fetching all dependencies for use with an offline HPC resource; and encountered some issues which I think is mainly due to the current version of Snakemake introducing some new features:

$ mamba create -n genopred -c bioconda snakemake -y
...
$ python --version
Python 3.12.7
$ snakemake --version
8.25.2
$ cd <path/to>/GenoPred/pipelines
$ echo "resdir: genopred_resources" > config_offline.yaml
$ snakemake   -c4 --profile none   --configfile=<path/to>/GenoPred/pipeline/config.yaml get_all_resources
<path/to>//GenoPred/pipeline/Snakefile:14: SyntaxWarning: invalid escape sequence '\d'
  name="[^-]+",
Config file config.yaml is extended by additional config specified via the command line.
NotImplementedError in file <path/to>//GenoPred/pipeline/Snakefile, line 9:
Remote providers have been replaced by Snakemake storage plugins. Please use the corresponding storage plugin instead (snakemake-storage-plugin-*).

Downgrading results in other (string joining?) issues:

$ snakemake --version
7.32.4
$ snakemake -c4 --profile none --configfile=<path/to>/GenoPred/pipeline/config.yaml get_all_resources
<path/to>/GenoPred/pipeline/Snakefile:14: SyntaxWarning: invalid escape sequence '\d'
  name="[^-]+",
Config file config.yaml is extended by additional config specified via the command line.
 Initial version setup detected. Updating to v 2 . 2 . 
FileNotFoundError in file <path/to>/GenoPred/pipeline/rules/dependencies.smk, line 145:
[Errno 2] No such file or directory: ' resources /last_version.txt '
  File "<path/to>/GenoPred/pipeline/Snakefile", line 18, in <module>
  File "<path/to>/GenoPred/pipeline/rules/dependencies.smk", line 158, in <module>
  File "<path/to>GenoPred/pipeline/rules/dependencies.smk", line 145, in write_last_version

Tested the above with different versions of GenoPred, v2.2.9, v.2.2.9, v2.2.11, master@2797a7a8499180919be7b96115da6882062cd917, and see the same thing.

Which version of Snakemake have you tested/developed GenoPred with?

opain commented 2 hours ago

Hi,

Thanks for raising the issue.

You should build the genopred environment using the pipeline/envs/pipeline.yaml. For example,

conda env create -f GenoPred/pipeline/envs/pipeline.yaml

You could also use mamba here of course.

This will download the required dependencies, including snakemake. This is the environment that the pipeline was tested in.

There are more instructions of how to setup the pipeline here: https://opain.github.io/GenoPred/pipeline_readme.html#Installation

Let me know if you still run into issues.

Ollie