Skip to content

Commit

Permalink
Merge pull request #130 from fmalmeida/dev
Browse files Browse the repository at this point in the history
Release v3.4.1
  • Loading branch information
fmalmeida authored Nov 14, 2024
2 parents 4c068b6 + 8c302bd commit 37f2db9
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 24 deletions.
10 changes: 10 additions & 0 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,14 @@ process {
maxRetries = 2
}

// problematic module
withName: GET_NCBI_GENOME {
errorStrategy = { task.attempt > 3 ? 'retry' : 'ignore' }
maxRetries = 2
maxErrors = '-1'
cpus = 2
memory = 4.GB
time = 2.h
}

}
7 changes: 7 additions & 0 deletions markdown/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The tracking for changes started in v2.1

## 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
* Add parameter to skip `sourmash` workflow
* Adjust file permissions in module `GET_NCBI_MODULE`

## v3.4.0 [07-July-2024]

* [[#30](https://github.com/fmalmeida/bacannot/issues/30)]
Expand Down
3 changes: 3 additions & 0 deletions modules/generic/ncbi_genome.nf
Original file line number Diff line number Diff line change
Expand Up @@ -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
"""
}
2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
61 changes: 38 additions & 23 deletions workflows/bacannot.nf
Original file line number Diff line number Diff line change
Expand Up @@ -258,29 +258,44 @@ 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
)

ch_sourmash_plot = SOURMASH_ALL.out.plot.first()
} else {
ch_sourmash_plot = []
}

//
// END: sourmash related modules
//

// IS identification
DIGIS( annotation_out_ch.genome.join(annotation_out_ch.gbk) )
Expand Down Expand Up @@ -408,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
)

//
Expand Down

0 comments on commit 37f2db9

Please sign in to comment.