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

Display message when error 132 found #6675

Merged
merged 8 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions modules/nf-core/kalign/align/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ process KALIGN_ALIGN {
def prefix = task.ext.prefix ?: "${meta.id}"
def write_output = compress ? ">(pigz -cp ${task.cpus} > ${prefix}.aln.gz)" : "${prefix}.aln"
"""
error_handler() {
mahesh-panchal marked this conversation as resolved.
Show resolved Hide resolved
exit_code=\$?
if [ \$exit_code -eq 132 ]; then
echo "\n\nKALIGN failed because is incompatible with some CPU types, see https://github.com/TimoLassmann/kalign/issues/46.\n\n"
else
trap - ERR
return \$exit_code
fi
}

trap 'error_handler' ERR

unpigz -cdf $fasta | \\
kalign \\
$args \\
Expand Down
20 changes: 14 additions & 6 deletions modules/nf-core/kalign/align/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
]
],
"1": [
"versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe"
"versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94"
],
"alignment": [
[
Expand All @@ -22,11 +22,15 @@
]
],
"versions": [
"versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe"
"versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94"
]
}
],
"timestamp": "2024-03-22T16:42:01.934768"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
},
"timestamp": "2024-09-20T12:44:18.067352"
},
"SARS-CoV-2 scaffolds fasta - compressed": {
"content": [
Expand All @@ -40,7 +44,7 @@
]
],
"1": [
"versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe"
"versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94"
],
"alignment": [
[
Expand All @@ -51,10 +55,14 @@
]
],
"versions": [
"versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe"
"versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94"
]
}
],
"timestamp": "2024-03-22T16:42:07.734293"
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.3"
},
"timestamp": "2024-09-20T12:44:31.031883"
}
}
Loading