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

Metaspades fails with > 1 TB RAM because of task.memory format #363

Open
nkleinbo opened this issue Jul 30, 2024 · 0 comments
Open

Metaspades fails with > 1 TB RAM because of task.memory format #363

nkleinbo opened this issue Jul 30, 2024 · 0 comments

Comments

@nkleinbo
Copy link
Collaborator

RAM values for task.memory > 1000 GB get converted to TB, so for example 1300 GB gets converted to 1.3 TB. metaspades expects the memory parameter in GB and fails when given a non integer value.

metaspades.sh (and metaspades_hybrid.sh) could be fixed with the following code:

MEMORY=$(echo !{task.memory} | awk '{val=$1; unit=$2; if (unit == "TB") printf "%.0f\n", val*1000; else if (unit == "GB") printf "%.0f\n", val}')
spades.py -t !{task.cpus} --memory ${MEMORY} --meta -o ${METASPADES_OUTPUT_DIR} --12 interleaved.fq.gz !{params.steps.assembly.metaspades.additionalParams}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant