Skip to content

Commit c3c252d

Browse files
authored
Merge pull request #898 from nf-core/kraken2-emptyfastq-fix
Kraken2 empty fastq resulting in no output file fix
2 parents 0cca15a + 881e85f commit c3c252d

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1616
- [#887](https://github.com/nf-core/eager/issues/887) Clarify what is considered 'ultra-short' reads in the help text of clip_readlength, for when you may wish to turn of length filtering during AdapterRemoval (♥ to @TCLamnidis for reporting)
1717
- [#889](https://github.com/nf-core/eager/issues/889) Remove/updated parameters from benchmarking test profiles (♥ to @TCLamnidis for reporting)
1818
- [#895](https://github.com/nf-core/eager/issues/895) Output documentation typo fix and added location of output docs in pipeline summary (♥ to @RodrigoBarquera for reporting)
19+
- [#897](https://github.com/nf-core/eager/issues/897) Fix pipeline crashing if no Kraken2 results generated (♥ to @alexandregilardet for reporting)
1920

2021
### `Dependencies`
2122

docs/output.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,7 @@ Each module has it's own output directory which sit alongside the `MultiQC/` dir
701701
* the `*.kreport` which is the old report format, without distinct minimizer count information, used by some tools such as [Pavian](https://github.com/fbreitwieser/pavian)
702702
* the `*.kraken2_report` which is the new kraken report format, with the distinct minimizer count information.
703703
* finally, the `*.kraken.out` file are the direct output of Kraken2
704+
* ⚠️ If your sample has no hits, no kraken output files will be created for that sample!
704705
* `maltextract/`: this contains a `results` directory in which contains the output from MaltExtract - typically one folder for each filter type, an error and a log file. The characteristics of each node (e.g. damage, read lengths, edit distances - each in different txt formats) can be seen in each sub-folder of the filter folders. Output can be visualised either with the [HOPS postprocessing script](https://github.com/rhuebler/HOPS) or [MEx-IPA](https://github.com/jfy133/MEx-IPA)
705706
* `consensus_sequence/`: this contains three FASTA files from VCF2Genome of a consensus sequence based on the reference FASTA with each sample's unique modifications. The main FASTA is a standard file with bases not passing the specified thresholds as Ns. The two other FASTAS (`_refmod.fasta.gz`) and (`_uncertainity.fasta.gz`) are IUPAC uncertainty codes (rather than Ns) and a special number-based uncertainty system used for other downstream tools, respectively.
706707
`merged_bams/initial`: these contain the BAM files that would go into UDG-treatment specific BAM trimming. All libraries of the sample sample, **and** same UDG-treatment type will be in these BAM files.

main.nf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3019,8 +3019,8 @@ process kraken {
30193019
path(krakendb) from ch_krakendb
30203020

30213021
output:
3022-
file "*.kraken.out" into ch_kraken_out
3023-
tuple prefix, path("*.kraken2_report") into ch_kraken_report, ch_kraken_for_multiqc
3022+
file "*.kraken.out" optional true into ch_kraken_out
3023+
tuple prefix, path("*.kraken2_report") optional true into ch_kraken_report, ch_kraken_for_multiqc
30243024

30253025
script:
30263026
prefix = fastq.baseName

0 commit comments

Comments
 (0)