snakemake-wrappers icon indicating copy to clipboard operation
snakemake-wrappers copied to clipboard

specify Python version in yaml file

Open gernophil opened this issue 3 years ago • 1 comments
trafficstars

I think it would be useful to specify a Python version in the yaml file for Python based wrappers. For example the (old) MultiQC 0.74.0 doesn't work on my conda anymore, since it installs multiqc==1.10.1 that is not compatible with Python 3.10 anymore. But Python 3.10 is installed in the environment though. For more consistent results even for new wrappers I think it might be useful to specify a compatible Python version in the yaml files. For MultiQC I can just switch to the new wrapper version, but solutions might not always be that easy.

gernophil avatar Jun 20 '22 07:06 gernophil

Agreed, that seems like a useful addition. On that note, it might also be good to specify numpy and pandas explicitly wherever relevant. I've had a lot of trouble with wrappers that implicitly pulled either of them in (via some dependency of the tools being installed for the wrapper), causing trouble when for example pandas versions mismatched between the main snakemake environment and the job environment - because apparently, snakemake internally uses some pandas pickling to send data to jobs, and there was a change in that API at some point. My solution is to overwrite the wrapper conda envs with my own versions - but it would be nicer if that was already solved via the wrappers themselves.

lczech avatar Jul 19 '22 05:07 lczech

This issue was marked as stale because it has been open for 6 months with no activity.

github-actions[bot] avatar Dec 01 '23 01:12 github-actions[bot]

This is now solved slightly differently: we automatically pin the wrappers to exact versions of all tools in the envs (including python), so that users get a frozen env just like a container. Note that not the environment.yaml contains those pinnings, but a pin file next to it, which is automatically used by snakemake if present.

johanneskoester avatar Dec 07 '23 08:12 johanneskoester