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

Workflow fails on Snakemake 8.x #1114

Closed
ggonnella opened this issue Jun 12, 2024 · 4 comments
Closed

Workflow fails on Snakemake 8.x #1114

ggonnella opened this issue Jun 12, 2024 · 4 comments
Assignees
Labels
revisit sometime Useful to address but no bandwidth at the moment

Comments

@ggonnella
Copy link

ggonnella commented Jun 12, 2024

Current Behavior

InputFunctionException in rule colors in file /home/erik/ncov/workflow/snakemake_rules/main_workflow.smk, line 1097:
Error:
  TypeError: unsupported operand type(s) for /: 'method' and 'int'
Wildcards:
  build_name=Cambodian_build
Traceback:
  File "/home/erik/ncov/workflow/snakemake_rules/main_workflow.smk", line 1114, in <lambda> (rule colors, line 2221, /home/erik/ncov/workflow/snakemake_rules/main_workflow.smk)

Expected behavior
No errors

Your environment: if running Nextstrain locally

  • Operating system: Linux
  • Browser: Chrome
  • Version (e.g. auspice 2.7.0): auspice 2.54.1; nextclade2 2.14.0; nextalign 2.14.0; pangolin 1.1.5; pangolearn 2022.03.22

Additional context
After updating to the latest version of the pipeline (we run it in "ambient" mode), the error appears, when we are running nextstrain build. The latest version we had installed was in last December. Can you give an indication what could be the problem?

@ggonnella ggonnella added the bug Something isn't working label Jun 12, 2024
@victorlin victorlin self-assigned this Jun 12, 2024
@victorlin
Copy link
Member

Hi @ggonnella,

The relevant line in the workflow is this one:

mem_mb=lambda wildcards, input: 5 * int(input.metadata.size / 1024 / 1024)

My guess is that you are using Snakemake 8.x. snakemake/snakemake@353a71c seems to have changed the representation of _IOFile.size from a value to a function (a.k.a. 'method' in your error message), which is something that would cause your error.

It's not stated anywhere in this repository, but this workflow currently does not support Snakemake 8.x and is only routinely run on Snakemake 7.32.3.

The easiest solution here would be for you to use a compatible Snakemake version. You could downgrade to version 7.x in your ambient environment or use one of Nextstrain's managed runtimes.

@jameshadfield jameshadfield changed the title TypeError when running nextstrain build Workflow fails on Snakemake 8.x Jun 12, 2024
@ggonnella
Copy link
Author

Thank you, indeed the problem was caused by the Snakemake version. I downgraded and it run correctly. Maybe it should be mentioned in the manual.

@victorlin
Copy link
Member

We don't plan to support Snakemake 8.x at the moment.

Opened a separate issue to document the compatibility requirements: #1118

@victorlin victorlin closed this as not planned Won't fix, can't repro, duplicate, stale Jun 25, 2024
@victorlin victorlin added wontfix This will not be worked on and removed bug Something isn't working labels Jun 25, 2024
@victorlin
Copy link
Member

Clarification: we don't plan to support Snakemake 8.x at the moment but could do so in the future. Timeline is unclear.

@victorlin victorlin added revisit sometime Useful to address but no bandwidth at the moment and removed wontfix This will not be worked on labels Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
revisit sometime Useful to address but no bandwidth at the moment
Projects
None yet
Development

No branches or pull requests

2 participants