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

Shell error in antismash_overview_gather rule: Argument list too long #229

Closed
OmkarSaMo opened this issue Feb 22, 2023 · 8 comments
Closed
Labels
bug Something isn't working

Comments

@OmkarSaMo
Copy link
Contributor

In a large project with close to 70 k BGCs the following issue appeared as the argument list for shell command was too long.

/datadrive/data2/bgcflow/.snakemake/shell_tmp.pvmw0yn0/script.sh: line 2: /datadrive/data2/bgcflow/.snakemake/conda/18ddcd54edd3f107fecb89d7a50d830f_/bin/python: Argument list too long

@OmkarSaMo OmkarSaMo added the bug Something isn't working label Feb 22, 2023
@OmkarSaMo
Copy link
Contributor Author

OmkarSaMo commented Feb 22, 2023

Temporary solution that may work is to increase the argument size limit

https://www.veritech.net/argument-list-long-simple-solution/

ulimit -s 665536

However this solution did not work in my example

@OmkarSaMo
Copy link
Contributor Author

@matinnuhamunada - is this issue easy to resolve? It's very important to find some solution in large-scale run. Do you have temporary solution as well?

@matinnuhamunada
Copy link
Collaborator

The solution is to use either a .txt file as input or pure python using the run instead of shell

@matinnuhamunada matinnuhamunada mentioned this issue Jul 2, 2023
15 tasks
@matinnuhamunada
Copy link
Collaborator

Can you check if 15879d9 fixes the problem?

Bash scripts written "safely" avoid any command $LONG_ARGUMENT_LIST, and instead use pipes when the argument list is unbounded, e.g. with constructs such as echo $LONG_ARGUMENT_LIST | xargs command. The latter works safely because echo is a bash "builtin", so no external command is run and the ARG_MAX limit is not relevant.

Inspired from:
snakemake/snakemake#854

@OmkarSaMo
Copy link
Contributor Author

OmkarSaMo commented Jul 10, 2023

@matinnuhamunada - Still got an error on the large dataset with v0.7.0.

However this time the error was with the rule antismash_summary. The rule antismash_overview_gather worked without any issues.

/datadrive/bgcflow/.snakemake/shell_tmp.41z66epq/script.sh: line 2: /datadrive/bgcflow/.snakemake/conda/5278299a2f85ccdaa9384b194969e4bd_/bin/python: Argument list too long

@matinnuhamunada
Copy link
Collaborator

Will be fixed in 0.7.1

@matinnuhamunada
Copy link
Collaborator

Fix in 144ad89

@OmkarSaMo
Copy link
Contributor Author

Thanks a lot for the fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants