Skip to content

Commit 37f2db9

Browse files
authored
Merge pull request #130 from fmalmeida/dev
Release v3.4.1
2 parents 4c068b6 + 8c302bd commit 37f2db9

File tree

5 files changed

+59
-24
lines changed

5 files changed

+59
-24
lines changed

conf/base.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,14 @@ process {
3838
maxRetries = 2
3939
}
4040

41+
// problematic module
42+
withName: GET_NCBI_GENOME {
43+
errorStrategy = { task.attempt > 3 ? 'retry' : 'ignore' }
44+
maxRetries = 2
45+
maxErrors = '-1'
46+
cpus = 2
47+
memory = 4.GB
48+
time = 2.h
49+
}
50+
4151
}

markdown/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
The tracking for changes started in v2.1
44

5+
## v3.4.1 [14-November-2024]
6+
7+
* [[[#127](https://github.com/fmalmeida/bacannot/issues/127)]]
8+
* Allow `GET_NCBI_MODULE` fail to be ignored, and adjust resources
9+
* Add parameter to skip `sourmash` workflow
10+
* Adjust file permissions in module `GET_NCBI_MODULE`
11+
512
## v3.4.0 [07-July-2024]
613

714
* [[#30](https://github.com/fmalmeida/bacannot/issues/30)]

modules/generic/ncbi_genome.nf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,8 @@ process GET_NCBI_GENOME {
3535
name=\$( echo \$file | cut -d '_' -f 1,2 ) ;
3636
mv \$file \${name}.fna
3737
done
38+
39+
# fix permissions
40+
chmod a+rw \${name}.fna
3841
"""
3942
}

nextflow.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ manifest {
108108
homePage = "https://github.com/fmalmeida/bacannot"
109109
mainScript = "main.nf"
110110
nextflowVersion = "!>=22.10.1"
111-
version = '3.4.0'
111+
version = '3.4.1'
112112
}
113113

114114
// Function to ensure that resource requirements don't go beyond

workflows/bacannot.nf

Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -258,29 +258,44 @@ workflow BACANNOT {
258258

259259
// species identification
260260
REFSEQ_MASHER( annotation_out_ch.genome )
261-
SOURMASH_LCA(
262-
dbs_ch,
263-
annotation_out_ch.genome,
264-
params.sourmash_scale,
265-
params.sourmash_kmer
266-
)
267261

268-
// mashing against samples and close related genomes
269-
GET_NCBI_GENOME(
270-
REFSEQ_MASHER.out.results
271-
.map { it[1] }
272-
.splitCsv( sep: '\t', header: true )
273-
.map{ "${it.biosample}" }
274-
.unique()
275-
)
276-
SOURMASH_ALL(
277-
annotation_out_ch.genome
278-
.map{ it[1] }
279-
.mix( GET_NCBI_GENOME.out.genomes.collect() )
280-
.collect(),
281-
params.sourmash_scale,
282-
params.sourmash_kmer
283-
)
262+
//
263+
// BEGIN: sourmash-related modules
264+
//
265+
if (!params.skip_sourmash) {
266+
SOURMASH_LCA(
267+
dbs_ch,
268+
annotation_out_ch.genome,
269+
params.sourmash_scale,
270+
params.sourmash_kmer
271+
)
272+
273+
// mashing against samples and close related genomes
274+
GET_NCBI_GENOME(
275+
REFSEQ_MASHER.out.results
276+
.map { it[1] }
277+
.splitCsv( sep: '\t', header: true )
278+
.map{ "${it.biosample}" }
279+
.unique()
280+
)
281+
282+
SOURMASH_ALL(
283+
annotation_out_ch.genome
284+
.map{ it[1] }
285+
.mix( GET_NCBI_GENOME.out.genomes.collect() )
286+
.collect(),
287+
params.sourmash_scale,
288+
params.sourmash_kmer
289+
)
290+
291+
ch_sourmash_plot = SOURMASH_ALL.out.plot.first()
292+
} else {
293+
ch_sourmash_plot = []
294+
}
295+
296+
//
297+
// END: sourmash related modules
298+
//
284299

285300
// IS identification
286301
DIGIS( annotation_out_ch.genome.join(annotation_out_ch.gbk) )
@@ -408,7 +423,7 @@ workflow BACANNOT {
408423
.join( phast_output_ch, remainder: true )
409424
.join( MERGE_ANNOTATIONS.out.digis_gff )
410425
.join( ch_integron_finder_gff, remainder: true ),
411-
SOURMASH_ALL.out.plot.first() // make value channel
426+
ch_sourmash_plot
412427
)
413428

414429
//

0 commit comments

Comments
 (0)