From ba53fc3c7ce222619c6337642cd162c01b4c0106 Mon Sep 17 00:00:00 2001 From: Felipe Almeida Date: Wed, 11 Sep 2024 13:13:43 -0300 Subject: [PATCH 1/7] add explicit skip --- workflows/bacannot.nf | 55 ++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 22 deletions(-) diff --git a/workflows/bacannot.nf b/workflows/bacannot.nf index 4162d11..88eb4cf 100644 --- a/workflows/bacannot.nf +++ b/workflows/bacannot.nf @@ -258,29 +258,40 @@ workflow BACANNOT { // species identification REFSEQ_MASHER( annotation_out_ch.genome ) - SOURMASH_LCA( - dbs_ch, - annotation_out_ch.genome, - params.sourmash_scale, - params.sourmash_kmer - ) - // mashing against samples and close related genomes - GET_NCBI_GENOME( - REFSEQ_MASHER.out.results - .map { it[1] } - .splitCsv( sep: '\t', header: true ) - .map{ "${it.biosample}" } - .unique() - ) - SOURMASH_ALL( - annotation_out_ch.genome - .map{ it[1] } - .mix( GET_NCBI_GENOME.out.genomes.collect() ) - .collect(), - params.sourmash_scale, - params.sourmash_kmer - ) + // + // BEGIN: sourmash-related modules + // + if (!params.skip_sourmash) { + SOURMASH_LCA( + dbs_ch, + annotation_out_ch.genome, + params.sourmash_scale, + params.sourmash_kmer + ) + + // mashing against samples and close related genomes + GET_NCBI_GENOME( + REFSEQ_MASHER.out.results + .map { it[1] } + .splitCsv( sep: '\t', header: true ) + .map{ "${it.biosample}" } + .unique() + ) + + SOURMASH_ALL( + annotation_out_ch.genome + .map{ it[1] } + .mix( GET_NCBI_GENOME.out.genomes.collect() ) + .collect(), + params.sourmash_scale, + params.sourmash_kmer + ) + } + + // + // END: sourmash related modules + // // IS identification DIGIS( annotation_out_ch.genome.join(annotation_out_ch.gbk) ) From c405fb0b7e10972fb7aefba37a9345443f81a697 Mon Sep 17 00:00:00 2001 From: Felipe Almeida Date: Wed, 11 Sep 2024 13:14:38 -0300 Subject: [PATCH 2/7] add sourmash out channel handling --- workflows/bacannot.nf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/workflows/bacannot.nf b/workflows/bacannot.nf index 88eb4cf..f86ce6c 100644 --- a/workflows/bacannot.nf +++ b/workflows/bacannot.nf @@ -287,6 +287,10 @@ workflow BACANNOT { params.sourmash_scale, params.sourmash_kmer ) + + ch_sourmash_plot = SOURMASH_ALL.out.plot.first() + } else { + ch_sourmash_plot = [] } // @@ -419,7 +423,7 @@ workflow BACANNOT { .join( phast_output_ch, remainder: true ) .join( MERGE_ANNOTATIONS.out.digis_gff ) .join( ch_integron_finder_gff, remainder: true ), - SOURMASH_ALL.out.plot.first() // make value channel + ch_sourmash_plot ) // From fe4831438a1e2c6559767bb71f3c430bd646c502 Mon Sep 17 00:00:00 2001 From: Felipe Almeida Date: Thu, 12 Sep 2024 04:03:38 -0300 Subject: [PATCH 3/7] add a config to ignore error in GET_NCBI_GENOME --- conf/base.config | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/conf/base.config b/conf/base.config index 812cf36..6a476e9 100644 --- a/conf/base.config +++ b/conf/base.config @@ -38,4 +38,14 @@ process { maxRetries = 2 } + // problematic module + withName: GET_NCBI_GENOME { + errorStrategy = { task.attempt > 4 ? 'retry' : 'ignore' } + maxRetries = 2 + maxErrors = '-1' + cpus = 2 + memory = 4.GB + time = 2.h + } + } From 8aa769fa78a236fc89bc4b2629fd8b17a5193c3a Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Fri, 20 Sep 2024 10:59:01 +0000 Subject: [PATCH 4/7] fix attempt number --- conf/base.config | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/base.config b/conf/base.config index 6a476e9..2a67fcf 100644 --- a/conf/base.config +++ b/conf/base.config @@ -40,7 +40,7 @@ process { // problematic module withName: GET_NCBI_GENOME { - errorStrategy = { task.attempt > 4 ? 'retry' : 'ignore' } + errorStrategy = { task.attempt > 3 ? 'retry' : 'ignore' } maxRetries = 2 maxErrors = '-1' cpus = 2 From d84b21d8a03cfcefe6c7720aa76135600b50b5c2 Mon Sep 17 00:00:00 2001 From: Felipe Marques de Almeida Date: Thu, 14 Nov 2024 17:01:09 +0000 Subject: [PATCH 5/7] update version and changelog --- markdown/CHANGELOG.md | 6 ++++++ nextflow.config | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/markdown/CHANGELOG.md b/markdown/CHANGELOG.md index e0b7a8c..02183a5 100644 --- a/markdown/CHANGELOG.md +++ b/markdown/CHANGELOG.md @@ -2,6 +2,12 @@ The tracking for changes started in v2.1 +## v3.4.1 [TBD] + +* [[[#127](https://github.com/fmalmeida/bacannot/issues/127)]] + * Allow `GET_NCBI_MODULE` fail to be ignored, and adjust resources + * Add parameter to skip `sourmash` workflow + ## v3.4.0 [07-July-2024] * [[#30](https://github.com/fmalmeida/bacannot/issues/30)] diff --git a/nextflow.config b/nextflow.config index a7e3b96..cb95f4b 100644 --- a/nextflow.config +++ b/nextflow.config @@ -108,7 +108,7 @@ manifest { homePage = "https://github.com/fmalmeida/bacannot" mainScript = "main.nf" nextflowVersion = "!>=22.10.1" - version = '3.4.0' + version = '3.4.1' } // Function to ensure that resource requirements don't go beyond From 0add240c6e12b67b3a05e36c85d2fa5a723c9976 Mon Sep 17 00:00:00 2001 From: Felipe Almeida Date: Thu, 14 Nov 2024 14:00:10 -0300 Subject: [PATCH 6/7] adjust file permission --- markdown/CHANGELOG.md | 1 + modules/generic/ncbi_genome.nf | 3 +++ 2 files changed, 4 insertions(+) diff --git a/markdown/CHANGELOG.md b/markdown/CHANGELOG.md index 02183a5..67d4bc0 100644 --- a/markdown/CHANGELOG.md +++ b/markdown/CHANGELOG.md @@ -7,6 +7,7 @@ The tracking for changes started in v2.1 * [[[#127](https://github.com/fmalmeida/bacannot/issues/127)]] * Allow `GET_NCBI_MODULE` fail to be ignored, and adjust resources * Add parameter to skip `sourmash` workflow + * Adjust file permissions in module `GET_NCBI_MODULE` ## v3.4.0 [07-July-2024] diff --git a/modules/generic/ncbi_genome.nf b/modules/generic/ncbi_genome.nf index fbbf15c..d0e604c 100644 --- a/modules/generic/ncbi_genome.nf +++ b/modules/generic/ncbi_genome.nf @@ -35,5 +35,8 @@ process GET_NCBI_GENOME { name=\$( echo \$file | cut -d '_' -f 1,2 ) ; mv \$file \${name}.fna done + + # fix permissions + chmod a+rw \${name}.fna """ } From 8c302bd0588a6a3fc97b3466df738e615f56b965 Mon Sep 17 00:00:00 2001 From: Felipe Almeida Date: Thu, 14 Nov 2024 14:01:31 -0300 Subject: [PATCH 7/7] add date --- markdown/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/markdown/CHANGELOG.md b/markdown/CHANGELOG.md index 67d4bc0..94f1754 100644 --- a/markdown/CHANGELOG.md +++ b/markdown/CHANGELOG.md @@ -2,7 +2,7 @@ The tracking for changes started in v2.1 -## v3.4.1 [TBD] +## v3.4.1 [14-November-2024] * [[[#127](https://github.com/fmalmeida/bacannot/issues/127)]] * Allow `GET_NCBI_MODULE` fail to be ignored, and adjust resources