karel-brinda / MiniPhy

Phylogenetic compression of extremely large genome collections [661k ↘𝟭𝟲𝗚𝗶𝗕 | BIGSIdata ↘𝟰𝟴𝗚𝗶𝗕 | AllTheBact'23 ↘𝟳𝟱𝗚𝗶𝗕]

Home Page:https://brinda.eu/mof

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snakemake.workflow.srcdir discontinued in new versions of Snakemake

karel-brinda opened this issue · comments

Extracting from #80 @shenwei356

Python versions should be limited in the range of 3.7 and 3.9. Higher versions like 3.12 caused errors like "attribute error".

There should be no issue with higher Python versions. Could you please provide the specific error message, number of line, etc?

I got this error, but didn't investigate it at all...

Traceback (most recent call last):
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/cli.py", line 1933, in args_to_api
    dag_api = workflow_api.dag(
              ^^^^^^^^^^^^^^^^^
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/api.py", line 328, in dag
    return DAGApi(
           ^^^^^^^
  File "<string>", line 6, in __init__
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/api.py", line 438, in __post_init__
    self.workflow_api._workflow.dag_settings = self.dag_settings
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/api.py", line 385, in _workflow
    workflow.include(
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/workflow.py", line 1386, in include
    exec(compile(code, snakefile.get_path_or_uri(), "exec"), self.globals)
  File "/nfs/research/zi/mhunt/2kk/Miniphy/miniphy/workflow/Snakefile", line 48, in <module>
  File "/nfs/research/zi/mhunt/Miniconda3/envs/miniphy/lib/python3.12/site-packages/snakemake/workflow.py", line 1386, in include
    exec(compile(code, snakefile.get_path_or_uri(), "exec"), self.globals)
  File "/nfs/research/zi/mhunt/2kk/Miniphy/miniphy/workflow/rules/tree.smk", line 26, in <module>
    --name-internals \\
AttributeError: module 'snakemake.workflow' has no attribute 'srcdir'
make: *** [Makefile:47: all] Error 1

This seems to be an issue of Snakemake. Maybe we should require some minimal version.

Which version do you have in this environment?

It might also be possible that they removed the srcdir function from some of the latest versions.