diff --git a/modules/nf-core/kalign/align/main.nf b/modules/nf-core/kalign/align/main.nf index 5d575dc71ea..59998df1adc 100644 --- a/modules/nf-core/kalign/align/main.nf +++ b/modules/nf-core/kalign/align/main.nf @@ -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() { + 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 \\ diff --git a/modules/nf-core/kalign/align/meta.yml b/modules/nf-core/kalign/align/meta.yml index 8e9f5f137ee..66c5ca8af95 100644 --- a/modules/nf-core/kalign/align/meta.yml +++ b/modules/nf-core/kalign/align/meta.yml @@ -12,13 +12,13 @@ tools: tool_dev_url: "https://github.com/TimoLassmann/kalign" doi: "10.1093/bioinformatics/btz795" licence: ["GPL v3"] - identifier: "" + identifier: "biotools:kalign" input: - - meta: type: map description: | Groovy Map containing sample information - e.g. `[ id:'test']` + e.g. [ id:'test'] - fasta: type: file description: Input sequences in FASTA format. May be gzipped or uncompressed. diff --git a/modules/nf-core/kalign/align/tests/main.nf.test.snap b/modules/nf-core/kalign/align/tests/main.nf.test.snap index da6fc94c52e..cee655899ec 100644 --- a/modules/nf-core/kalign/align/tests/main.nf.test.snap +++ b/modules/nf-core/kalign/align/tests/main.nf.test.snap @@ -11,7 +11,7 @@ ] ], "1": [ - "versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe" + "versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94" ], "alignment": [ [ @@ -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": [ @@ -40,7 +44,7 @@ ] ], "1": [ - "versions.yml:md5,0764ff5c30fd8befd86baa9026493ffe" + "versions.yml:md5,b5ef6a09110c24f552fcddb1af13ff94" ], "alignment": [ [ @@ -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" } } \ No newline at end of file