From f1fc7fc38eb65782cdf2d05bc4d56a11ec8922a8 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Tue, 24 May 2022 15:15:07 -0400 Subject: [PATCH 1/4] adding upzip --- modules/gamma/{ => gamma}/main.nf | 15 ++++++++-- modules/gamma/{ => gamma}/meta.yml | 0 tests/modules/gamma/gamma/main.nf | 29 +++++++++++++++++++ .../modules/gamma/{ => gamma}/nextflow.config | 0 tests/modules/gamma/gamma/test.yml | 29 +++++++++++++++++++ tests/modules/gamma/main.nf | 17 ----------- tests/modules/gamma/test.yml | 13 --------- 7 files changed, 71 insertions(+), 32 deletions(-) rename modules/gamma/{ => gamma}/main.nf (83%) rename modules/gamma/{ => gamma}/meta.yml (100%) create mode 100644 tests/modules/gamma/gamma/main.nf rename tests/modules/gamma/{ => gamma}/nextflow.config (100%) create mode 100644 tests/modules/gamma/gamma/test.yml delete mode 100644 tests/modules/gamma/main.nf delete mode 100644 tests/modules/gamma/test.yml diff --git a/modules/gamma/main.nf b/modules/gamma/gamma/main.nf similarity index 83% rename from modules/gamma/main.nf rename to modules/gamma/gamma/main.nf index e176ee68..51a5f6c8 100644 --- a/modules/gamma/main.nf +++ b/modules/gamma/gamma/main.nf @@ -26,13 +26,24 @@ process GAMMA { script: def args = task.ext.args ?: '' def prefix = task.ext.prefix ?: "${meta.id}" + """ - GAMMA.py \\ + if [[ ${fasta} == *.gz ]] + then + FNAME=\$(basename ${fasta} .gz) + gunzip -f ${fasta} + GAMMA.py \\ + $args \\ + "\${FNAME}" \\ + $db \\ + $prefix + else + GAMMA.py \\ $args \\ $fasta \\ $db \\ $prefix - + fi cat <<-END_VERSIONS > versions.yml "${task.process}": gamma: $VERSION diff --git a/modules/gamma/meta.yml b/modules/gamma/gamma/meta.yml similarity index 100% rename from modules/gamma/meta.yml rename to modules/gamma/gamma/meta.yml diff --git a/tests/modules/gamma/gamma/main.nf b/tests/modules/gamma/gamma/main.nf new file mode 100644 index 00000000..070a3bf1 --- /dev/null +++ b/tests/modules/gamma/gamma/main.nf @@ -0,0 +1,29 @@ +#!/usr/bin/env nextflow + +nextflow.enable.dsl = 2 + +include { GAMMA } from '../../../../modules/gamma/gamma/main.nf' + +workflow test_unzip { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['bacteroides_fragilis']['illumina']['test1_contigs_fa_gz'], checkIfExists: true), + ] + + db = [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/ResGANNCBI_20210507_srst2.fasta", checkIfExists: true), ] + + GAMMA ( input, db ) +} + +workflow test_gamma { + + input = [ + [ id:'test', single_end:false ], // meta map + file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) + ] + + db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] + + GAMMA ( input, db ) +} diff --git a/tests/modules/gamma/nextflow.config b/tests/modules/gamma/gamma/nextflow.config similarity index 100% rename from tests/modules/gamma/nextflow.config rename to tests/modules/gamma/gamma/nextflow.config diff --git a/tests/modules/gamma/gamma/test.yml b/tests/modules/gamma/gamma/test.yml new file mode 100644 index 00000000..308d890f --- /dev/null +++ b/tests/modules/gamma/gamma/test.yml @@ -0,0 +1,29 @@ +- name: gamma gamma test_unzip + command: nextflow run tests/modules/gamma/gamma -entry test_unzip -c tests/config/nextflow.config + tags: + - gamma/gamma + - gamma + files: + - path: /tmp/tmppm1ybfln/gamma/test.fasta + md5sum: 5b3b831d863fffaa3410a9ee7bfa12ce + - path: /tmp/tmppm1ybfln/gamma/test.gamma + md5sum: 46165a89e10b7315d3a9b0aa6c561626 + - path: /tmp/tmppm1ybfln/gamma/test.psl + md5sum: f489ce4602ddbcb692d5781ee3fbf449 + - path: /tmp/tmppm1ybfln/gamma/versions.yml + md5sum: ad23c3ec60663598543cbe8bc74bc4ab + +- name: gamma gamma test_gamma + command: nextflow run tests/modules/gamma/gamma -entry test_gamma -c tests/config/nextflow.config + tags: + - gamma/gamma + - gamma + files: + - path: /tmp/tmpw3chm6da/gamma/test.fasta + md5sum: df37b48466181311e0a679f3c5878484 + - path: /tmp/tmpw3chm6da/gamma/test.gamma + md5sum: 3256708fa517a65ed01d99e0e3c762ae + - path: /tmp/tmpw3chm6da/gamma/test.psl + md5sum: 162a2757ed3b167ae1e0cdb24213f940 + - path: /tmp/tmpw3chm6da/gamma/versions.yml + md5sum: 3fefb5b46c94993362243c5f9a472057 diff --git a/tests/modules/gamma/main.nf b/tests/modules/gamma/main.nf deleted file mode 100644 index f9477706..00000000 --- a/tests/modules/gamma/main.nf +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env nextflow - -nextflow.enable.dsl = 2 - -include { GAMMA } from '../../../modules/gamma/main.nf' - -workflow test_gamma { - - input = [ - [ id:'test', single_end:false ], // meta map - file(params.test_data['sarscov2']['genome']['genome_fasta'], checkIfExists: true) - ] - - db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - - GAMMA ( input, db ) -} diff --git a/tests/modules/gamma/test.yml b/tests/modules/gamma/test.yml deleted file mode 100644 index 1b493b49..00000000 --- a/tests/modules/gamma/test.yml +++ /dev/null @@ -1,13 +0,0 @@ -- name: gamma test_gamma - command: nextflow run tests/modules/gamma -entry test_gamma -c tests/config/nextflow.config - tags: - - gamma - files: - - path: output/gamma/test.fasta - md5sum: df37b48466181311e0a679f3c5878484 - - path: output/gamma/test.gamma - md5sum: 3256708fa517a65ed01d99e0e3c762ae - - path: output/gamma/test.psl - md5sum: 162a2757ed3b167ae1e0cdb24213f940 - - path: output/gamma/versions.yml - md5sum: 3fefb5b46c94993362243c5f9a472057 From b8aaea7429e74cb23acff21b03ba3814d7905ed1 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Tue, 24 May 2022 16:27:00 -0400 Subject: [PATCH 2/4] updating paths in test.yml --- modules/gamma/gamma/main.nf | 2 +- modules/gamma/gamma/meta.yml | 3 ++- tests/modules/gamma/gamma/main.nf | 6 +++--- tests/modules/gamma/gamma/test.yml | 20 ++++++++++---------- 4 files changed, 16 insertions(+), 15 deletions(-) diff --git a/modules/gamma/gamma/main.nf b/modules/gamma/gamma/main.nf index 51a5f6c8..fddced62 100644 --- a/modules/gamma/gamma/main.nf +++ b/modules/gamma/gamma/main.nf @@ -1,6 +1,6 @@ def VERSION = '2.1' // Version information not provided by tool on CLI -process GAMMA { +process GAMMA_GAMMA { tag "$meta.id" label 'process_low' diff --git a/modules/gamma/gamma/meta.yml b/modules/gamma/gamma/meta.yml index 316b685b..d9e272e2 100644 --- a/modules/gamma/gamma/meta.yml +++ b/modules/gamma/gamma/meta.yml @@ -1,4 +1,4 @@ -name: "gamma" +name: "gamma_gamma" description: Gene Allele Mutation Microbial Assessment keywords: - gamma @@ -61,3 +61,4 @@ output: authors: - "@sateeshperi" - "@rastanton" + - "@jvhagey" diff --git a/tests/modules/gamma/gamma/main.nf b/tests/modules/gamma/gamma/main.nf index 070a3bf1..97e58be7 100644 --- a/tests/modules/gamma/gamma/main.nf +++ b/tests/modules/gamma/gamma/main.nf @@ -2,7 +2,7 @@ nextflow.enable.dsl = 2 -include { GAMMA } from '../../../../modules/gamma/gamma/main.nf' +include { GAMMA_GAMMA } from '../../../../modules/gamma/gamma/main.nf' workflow test_unzip { @@ -13,7 +13,7 @@ workflow test_unzip { db = [ file("https://raw.githubusercontent.com/nf-core/test-datasets/modules/data/delete_me/srst2/ResGANNCBI_20210507_srst2.fasta", checkIfExists: true), ] - GAMMA ( input, db ) + GAMMA_GAMMA ( input, db ) } workflow test_gamma { @@ -25,5 +25,5 @@ workflow test_gamma { db = [ file(params.test_data['sarscov2']['genome']['transcriptome_fasta'], checkIfExists: true) ] - GAMMA ( input, db ) + GAMMA_GAMMA ( input, db ) } diff --git a/tests/modules/gamma/gamma/test.yml b/tests/modules/gamma/gamma/test.yml index 308d890f..2c649105 100644 --- a/tests/modules/gamma/gamma/test.yml +++ b/tests/modules/gamma/gamma/test.yml @@ -4,14 +4,14 @@ - gamma/gamma - gamma files: - - path: /tmp/tmppm1ybfln/gamma/test.fasta + - path: output/gamma/gamma/test.fasta md5sum: 5b3b831d863fffaa3410a9ee7bfa12ce - - path: /tmp/tmppm1ybfln/gamma/test.gamma + - path: output/gamma/gamma/test.gamma md5sum: 46165a89e10b7315d3a9b0aa6c561626 - - path: /tmp/tmppm1ybfln/gamma/test.psl + - path: output/gamma/gamma/test.psl md5sum: f489ce4602ddbcb692d5781ee3fbf449 - - path: /tmp/tmppm1ybfln/gamma/versions.yml - md5sum: ad23c3ec60663598543cbe8bc74bc4ab + - path: output/gamma/gamma/versions.yml + md5sum: 8baafec7b3b87f788f69e30d317c9722 - name: gamma gamma test_gamma command: nextflow run tests/modules/gamma/gamma -entry test_gamma -c tests/config/nextflow.config @@ -19,11 +19,11 @@ - gamma/gamma - gamma files: - - path: /tmp/tmpw3chm6da/gamma/test.fasta + - path: output/gamma/gamma/test.fasta md5sum: df37b48466181311e0a679f3c5878484 - - path: /tmp/tmpw3chm6da/gamma/test.gamma + - path: output/gamma/gamma/test.gamma md5sum: 3256708fa517a65ed01d99e0e3c762ae - - path: /tmp/tmpw3chm6da/gamma/test.psl + - path: output/gamma/gamma/test.psl md5sum: 162a2757ed3b167ae1e0cdb24213f940 - - path: /tmp/tmpw3chm6da/gamma/versions.yml - md5sum: 3fefb5b46c94993362243c5f9a472057 + - path: output/gamma/gamma/versions.yml + md5sum: b75c2871d8cac2f8ac67c0fbd22babd6 From bb999395aa4d03d02336794c655cfcdf34855b05 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Tue, 24 May 2022 19:19:38 -0400 Subject: [PATCH 3/4] fixed pytest_modules.yml --- tests/config/pytest_modules.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/config/pytest_modules.yml b/tests/config/pytest_modules.yml index 2063d691..80711bae 100644 --- a/tests/config/pytest_modules.yml +++ b/tests/config/pytest_modules.yml @@ -707,9 +707,9 @@ freebayes: - modules/freebayes/** - tests/modules/freebayes/** -gamma: - - modules/gamma/** - - tests/modules/gamma/** +gamma/gamma: + - modules/gamma/gamma/** + - tests/modules/gamma/gamma/** gatk4/applybqsr: - modules/gatk4/applybqsr/** From 127665d27ba5512bfe1596f86c2b11a197556233 Mon Sep 17 00:00:00 2001 From: jvhagey Date: Tue, 24 May 2022 19:27:09 -0400 Subject: [PATCH 4/4] fixed test.yml --- tests/modules/gamma/gamma/test.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/modules/gamma/gamma/test.yml b/tests/modules/gamma/gamma/test.yml index 2c649105..163eda5f 100644 --- a/tests/modules/gamma/gamma/test.yml +++ b/tests/modules/gamma/gamma/test.yml @@ -4,13 +4,13 @@ - gamma/gamma - gamma files: - - path: output/gamma/gamma/test.fasta + - path: output/gamma/test.fasta md5sum: 5b3b831d863fffaa3410a9ee7bfa12ce - - path: output/gamma/gamma/test.gamma + - path: output/gamma/test.gamma md5sum: 46165a89e10b7315d3a9b0aa6c561626 - - path: output/gamma/gamma/test.psl + - path: output/gamma/test.psl md5sum: f489ce4602ddbcb692d5781ee3fbf449 - - path: output/gamma/gamma/versions.yml + - path: output/gamma/versions.yml md5sum: 8baafec7b3b87f788f69e30d317c9722 - name: gamma gamma test_gamma @@ -19,11 +19,11 @@ - gamma/gamma - gamma files: - - path: output/gamma/gamma/test.fasta + - path: output/gamma/test.fasta md5sum: df37b48466181311e0a679f3c5878484 - - path: output/gamma/gamma/test.gamma + - path: output/gamma/test.gamma md5sum: 3256708fa517a65ed01d99e0e3c762ae - - path: output/gamma/gamma/test.psl + - path: output/gamma/test.psl md5sum: 162a2757ed3b167ae1e0cdb24213f940 - - path: output/gamma/gamma/versions.yml + - path: output/gamma/versions.yml md5sum: b75c2871d8cac2f8ac67c0fbd22babd6