Skip to content

Commit

Permalink
Merge pull request #442 from nf-core/busco-warn-removal [skip ci]
Browse files Browse the repository at this point in the history
Remove BUSCO warning about no matches found
  • Loading branch information
jfy133 authored May 11, 2023
2 parents d10eab0 + ad919cb commit 9df6b06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 29 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#428](https://github.com/nf-core/mag/pull/428) - Update to nf-core 2.8 `TEMPLATE` (by @jfy133)
- [#429](https://github.com/nf-core/mag/pull/429) - Replaced hardcoded CheckM database auto-download URL to a parameter (reported by @erikrikarddaniel, fix by @jfy133)
- [#441](https://github.com/nf-core/mag/pull/441) - Deactivated CONCOCT in AWS 'full test' due to very long runtime (fix by @jfy133).
- [#442](https://github.com/nf-core/mag/pull/442) - Remove warning when BUSCO finds no genes in bins, as this can be expected in some datasets (reported by @Lumimar, fix by @jfy133).

### `Fixed`

Expand Down
30 changes: 1 addition & 29 deletions lib/NfcoreTemplate.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,7 @@ class NfcoreTemplate {

// Set up the e-mail variables
def subject = "[$workflow.manifest.name] Successful: $workflow.runName"
if (busco_failed_bins.size() > 0) {
subject = "[$workflow.manifest.name] Partially successful: For ${busco_failed_bins.size()} bin(s) the BUSCO analysis failed because no genes where found or placements failed: $workflow.runName"
}

if (!workflow.success) {
subject = "[$workflow.manifest.name] FAILED: $workflow.runName"
}
Expand Down Expand Up @@ -231,32 +229,6 @@ class NfcoreTemplate {
//
public static void summary(workflow, params, log, busco_failed_bins = [:]) {
Map colors = logColours(params.monochrome_logs)

if (busco_failed_bins.size() > 0) {
def failed_bins_no_genes = ''
def failed_bins_placements_failed = ''
def count_no_genes = 0
def count_placements_failed = 0
for (bin in busco_failed_bins) {
if (bin.value == "No genes"){
count_no_genes += 1
failed_bins_no_genes += " ${bin.key}\n"
}
if (bin.value == "Placements failed"){
count_placements_failed += 1
failed_bins_placements_failed += " ${bin.key}\n"
}
}
if (params.busco_reference)
log.info "-${colors.purple}[$workflow.manifest.name]${colors.yellow} For ${busco_failed_bins.size()} bin(s) BUSCO did not find any matching genes:\n${failed_bins_no_genes}See ${params.outdir}/GenomeBinning/QC/BUSCO/[bin]_busco.log for further information.${colors.reset}-"
else {
if (count_no_genes > 0)
log.info "-${colors.purple}[$workflow.manifest.name]${colors.yellow} For ${count_no_genes} bin(s) the BUSCO analysis failed because no BUSCO genes could be found:\n${failed_bins_no_genes}See ${params.outdir}/GenomeBinning/QC/BUSCO/[bin]_busco.err and ${params.outdir}/GenomeBinning/QC/BUSCO/[bin]_busco.log for further information.${colors.reset}-"
if (count_placements_failed > 0)
log.info "-${colors.purple}[$workflow.manifest.name]${colors.yellow} For ${count_placements_failed} bin(s) the BUSCO analysis using automated lineage selection failed due to failed placements:\n${failed_bins_placements_failed}See ${params.outdir}/GenomeBinning/QC/BUSCO/[bin]_busco.err and ${params.outdir}/GenomeBinning/QC/BUSCO/[bin]_busco.log for further information. Results for selected domain are still used.${colors.reset}-"
}
}

if (workflow.success) {
if (workflow.stats.ignoredCount == 0) {
log.info "-${colors.purple}[$workflow.manifest.name]${colors.green} Pipeline completed successfully${colors.reset}-"
Expand Down

0 comments on commit 9df6b06

Please sign in to comment.