Skip to content

Commit

Permalink
Merge pull request #470 from nf-core/skip-binning-prep
Browse files Browse the repository at this point in the history
Skip binning prep when no binning/aDNA
  • Loading branch information
jfy133 authored Jul 6, 2023
2 parents 0906f13 + 54869cf commit da775f8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#439](https://github.com/nf-core/mag/pull/445) - Fix bug in assembly input (by @prototaxites)
- [#447](https://github.com/nf-core/mag/pull/447) - Remove `default: None` from parameter schema (by @drpatelh)
- [#449](https://github.com/nf-core/mag/pull/447) - Fix results file overwriting in Ancient DNA workflow (reported by @alexhbnr, fix by @jfy133)
- [#470](https://github.com/nf-core/mag/pull/470) - Fix binning preparation from running even when binning was requested to be skipped (reported by @prototaxites, fix by @jfy133)

### `Dependencies`

Expand Down
23 changes: 12 additions & 11 deletions workflows/mag.nf
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,13 @@ workflow MAG {
ch_busco_summary = Channel.empty()
ch_checkm_summary = Channel.empty()

BINNING_PREPARATION (
ch_assemblies,
ch_short_reads
)
if ( !params.skip_binning || params.ancient_dna ) {
BINNING_PREPARATION (
ch_assemblies,
ch_short_reads
)
ch_versions = ch_versions.mix(BINNING_PREPARATION.out.bowtie2_version.first())
}

/*
================================================================================
Expand Down Expand Up @@ -655,6 +658,7 @@ workflow MAG {
ch_short_reads
)
}
ch_versions = ch_versions.mix(BINNING.out.versions)

if ( params.bin_domain_classification ) {

Expand Down Expand Up @@ -686,9 +690,6 @@ workflow MAG {
}
}

ch_versions = ch_versions.mix(BINNING_PREPARATION.out.bowtie2_version.first())
ch_versions = ch_versions.mix(BINNING.out.versions)

/*
* DAS Tool: binning refinement
*/
Expand All @@ -713,10 +714,8 @@ workflow MAG {
}

BINNING_REFINEMENT ( ch_contigs_for_binrefinement, ch_prokarya_bins_dastool )

ch_refined_bins = ch_eukarya_bins_dastool.mix(BINNING_REFINEMENT.out.refined_bins)
ch_refined_unbins = BINNING_REFINEMENT.out.refined_unbins

ch_versions = ch_versions.mix(BINNING_REFINEMENT.out.versions)

if ( params.postbinning_input == 'raw_bins_only' ) {
Expand Down Expand Up @@ -943,13 +942,15 @@ workflow MAG {
}
}

ch_multiqc_files = ch_multiqc_files.mix(BINNING_PREPARATION.out.bowtie2_assembly_multiqc.collect().ifEmpty([]))
if ( !params.skip_binning || params.ancient_dna ) {
ch_multiqc_files = ch_multiqc_files.mix(BINNING_PREPARATION.out.bowtie2_assembly_multiqc.collect().ifEmpty([]))
}

if (!params.skip_binning && !params.skip_prokka){
ch_multiqc_files = ch_multiqc_files.mix(PROKKA.out.txt.collect{it[1]}.ifEmpty([]))
}

if (!params.skip_binqc && params.binqc_tool == 'busco'){
if (!params.skip_binning && !params.skip_binqc && params.binqc_tool == 'busco'){
ch_multiqc_files = ch_multiqc_files.mix(BUSCO_QC.out.multiqc.collect().ifEmpty([]))
}

Expand Down

0 comments on commit da775f8

Please sign in to comment.