Skip to content

Commit

Permalink
Merge pull request #349 from nf-core/maxbin-mincontig
Browse files Browse the repository at this point in the history
Add metaBAT2 mincontig warning
  • Loading branch information
jfy133 authored Nov 3, 2022
2 parents 2e05bd0 + 58bc19f commit 06439ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Fixed`

- [#345](https://github.com/nf-core/mag/pull/345) Bowtie2 mode changed to global alignment for ancient DNA mode (`--very-sensitive` mode) to prevent soft clipping at the end of reads when running in local mode.
- [#345](https://github.com/nf-core/mag/pull/345) - Bowtie2 mode changed to global alignment for ancient DNA mode (`--very-sensitive` mode) to prevent soft clipping at the end of reads when running in local mode.
- [#349](https://github.com/nf-core/mag/pull/349) - Add a warning that pipeline will reset minimum contig size to 1500 specifically MetaBAT2 process, if a user supplies below this threshold.

### `Dependencies`

Expand Down
2 changes: 1 addition & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ process {
]
ext.prefix = { "${meta.assembler}-MetaBAT2-${meta.id}" }
ext.args = [
"-m ${params.min_contig_size}",
params.min_contig_size < 1500 ? "-m 1500" : "-m ${params.min_contig_size}",
"--unbinned",
"--seed ${params.metabat_rng_seed}"
].join(' ').trim()
Expand Down
3 changes: 3 additions & 0 deletions workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ for (param in checkPathParamList) { if (param) { file(param, checkIfExists: true
// Check mandatory parameters
if (params.input) { ch_input = file(params.input) } else { exit 1, 'Input samplesheet not specified!' }

// Check MetaBAT2 inputs
if ( !params.skip_metabat2 && params.min_contig_size < 1500 ) log.warn("Specified min. contig size under minimum for MetaBAT2. MetaBAT2 will be run with 1500 (other binners not affected). You supplied: --min_contig_size ${params.min_contig_size}")

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CONFIG FILES
Expand Down

0 comments on commit 06439ca

Please sign in to comment.