diff --git a/modules/nf-core/evigene/tr2aacds/main.nf b/modules/nf-core/evigene/tr2aacds/main.nf index 3e68b31ea896..c736893d70a7 100644 --- a/modules/nf-core/evigene/tr2aacds/main.nf +++ b/modules/nf-core/evigene/tr2aacds/main.nf @@ -31,6 +31,14 @@ process EVIGENE_TR2AACDS { def simple_name = fasta.simpleName """ + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u + fi + \$EVIGENEHOME/scripts/prot/tr2aacds.pl \\ $args \\ -NCPU=$task.cpus \\ @@ -61,6 +69,14 @@ process EVIGENE_TR2AACDS { log.info '[evigene] Available memory not known - defaulting to 7GB. Specify process memory requirements to change this.' } """ + # Nextflow changes the container --entrypoint to /bin/bash (container default entrypoint: /usr/local/env-execute) + # Check for container variable initialisation script and source it. + if [ -f "/usr/local/env-activate.sh" ]; then + set +u # Otherwise, errors out because of various unbound variables + . "/usr/local/env-activate.sh" + set -u + fi + mkdir dropset touch dropset/${prefix}.drop.aa touch dropset/${prefix}.drop.cds diff --git a/modules/nf-core/evigene/tr2aacds/tests/main.nf.test b/modules/nf-core/evigene/tr2aacds/tests/main.nf.test index 5ab9812a33ec..78bd874006eb 100644 --- a/modules/nf-core/evigene/tr2aacds/tests/main.nf.test +++ b/modules/nf-core/evigene/tr2aacds/tests/main.nf.test @@ -27,7 +27,7 @@ nextflow_process { { assert process.success }, { assert snapshot( process.out.dropset[0][1], - file(process.out.okayset[0][1]).listFiles().collect { it.name }, + file(process.out.okayset[0][1]).listFiles().collect { it.name }.toSorted(), process.out.versions, ).match() } diff --git a/modules/nf-core/evigene/tr2aacds/tests/main.nf.test.snap b/modules/nf-core/evigene/tr2aacds/tests/main.nf.test.snap index c77f2a13c6aa..2aa3ea0414f0 100644 --- a/modules/nf-core/evigene/tr2aacds/tests/main.nf.test.snap +++ b/modules/nf-core/evigene/tr2aacds/tests/main.nf.test.snap @@ -94,18 +94,18 @@ "test.drop.tr:md5,5f38aa1a7e7adb09ce34c0bd74727d67" ], [ - "test.pubids", "test.ann.txt", - "test.pubids.realt.log", - "test.mainalt.tab", - "test.okay.aa", - "test.okay.mrna", "test.cull.aa", + "test.cull.cds", "test.cull.mrna", "test.genesum.txt", - "test.cull.cds", + "test.mainalt.tab", + "test.okay.aa", "test.okay.cds", - "test.pubids.old" + "test.okay.mrna", + "test.pubids", + "test.pubids.old", + "test.pubids.realt.log" ], [ "versions.yml:md5,57e8000ce92f5f8d590e7baffa762e84" @@ -115,6 +115,6 @@ "nf-test": "0.8.4", "nextflow": "24.04.2" }, - "timestamp": "2024-06-30T13:32:04.295304" + "timestamp": "2024-06-30T13:46:54.373144" } } \ No newline at end of file