Skip to content

Commit

Permalink
Merge pull request #565 from nf-core/warn-when-gtdb-filter-empty
Browse files Browse the repository at this point in the history
Add warning GTDB-TK results will be empty if no contigs pass completeness filter
  • Loading branch information
jfy133 authored Feb 1, 2024
2 parents 5a614d9 + c49febd commit 601114d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### `Added`

- [#548](https://github.com/nf-core/mag/pull/548) - Fixes to (reported by @maxibor, @PPpissar, @muniheart, @llborcard, fix by @maxibor)
- GTDBK-TK execution
- CAT/QUAST/DEPTH bin summary file name collisions
- BUSCO database parsing
- Correct CAT name files
- [#562](https://github.com/nf-core/mag/pull/562) - Add CAT summary into the global bin_summary (by @maxibor)
- [#565](https://github.com/nf-core/mag/pull/565) - Add warning of empty GTDB-TK results if no contigs pass completeness filter (fix by @jfy133 and @maxibor)

### `Changed`

Expand Down
7 changes: 7 additions & 0 deletions subworkflows/local/gtdbtk.nf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ workflow GTDBTK {
error("Unsupported object given to --gtdb, database must be supplied as either a directory or a .tar.gz file!")
}


// Print warning why GTDB-TK summary empty if passed channel gets no files
ch_filtered_bins.passed
.count()
.map{it == 0 ? log.warn("No contigs passed GTDB-TK min. completeness filters. GTDB-TK summary will execute but results will be empty!") : ""}


GTDBTK_CLASSIFYWF (
ch_filtered_bins.passed.groupTuple(),
ch_db_for_gtdbtk,
Expand Down

0 comments on commit 601114d

Please sign in to comment.