Skip to content

Commit

Permalink
Merge pull request #93 from Daniel-VM/dev
Browse files Browse the repository at this point in the history
Redirect the module statistics to multiqc
  • Loading branch information
Daniel-VM committed Oct 11, 2023
2 parents 29249d2 + 7cd0e63 commit 368c6cb
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 14 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v2.1.1dev nf-core/bacass: "Navy Steel Swordfish" - 2023/10/11

Enhancement of the MultiQC report.

### `Added`

- [#93](https://github.com/nf-core/bacass/pull/93) - Add missing modules output to MultiQC.

- Fastp
- PycoQC
- Porechop
- Quast
- Kraken2
- Prokka

## v2.1.0dev nf-core/bacass: "Navy Steel Swordfish" - 2023/09/11

This version merges the nf-core template update v2.9. It also updates modules or dependencies to make them work with the new template.
Expand Down
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"nf-core": {
"fastq_trim_fastp_fastqc": {
"branch": "master",
"git_sha": "dedc0e31087f3306101c38835d051bf49789445a",
"git_sha": "bd448d5c60454640610681515538be3ec66036e4",
"installed_by": ["subworkflows"]
}
}
Expand Down
4 changes: 4 additions & 0 deletions modules/nf-core/nanoplot/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 10 additions & 1 deletion modules/nf-core/nanoplot/nanoplot.diff

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ manifest {
description = """Simple bacterial assembly and annotation"""
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '2.1.0dev'
version = '2.1.1dev'
doi = '10.5281/zenodo.2669428'
}

Expand Down
4 changes: 2 additions & 2 deletions subworkflows/nf-core/fastq_trim_fastp_fastqc/main.nf

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

41 changes: 32 additions & 9 deletions workflows/bacass.nf
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ workflow BACASS {
params.skip_fastp,
params.skip_fastqc
)
ch_fastqc_raw_multiqc = FASTQ_TRIM_FASTP_FASTQC.out.fastqc_raw_zip
ch_fastqc_trim_multiqc = FASTQ_TRIM_FASTP_FASTQC.out.fastqc_trim_zip
ch_trim_json_multiqc = FASTQ_TRIM_FASTP_FASTQC.out.trim_json
ch_versions = ch_versions.mix(FASTQ_TRIM_FASTP_FASTQC.out.versions.ifEmpty(null))

//
Expand All @@ -157,26 +160,31 @@ workflow BACASS {
NANOPLOT (
ch_longreads
)
ch_nanoplot_txt_multiqc = NANOPLOT.out.txt
ch_versions = ch_versions.mix(NANOPLOT.out.versions.ifEmpty(null))

//
// MODULE: PYCOQC, quality check for nanopore reads and Quality/Length Plots
//
// TODO: Couldn't be tested. No configuration test available (lack of fast5 file or params.skip_pycoqc=false).
ch_pycoqc_multiqc = Channel.empty()
if ( !params.skip_pycoqc ) {
PYCOQC (
ch_fast5.dump(tag: 'fast5')
)
versions = ch_versions.mix(PYCOQC.out.versions.ifEmpty(null))
ch_pycoqc_multiqc = PYCOQC.out.json
ch_versions = ch_versions.mix(PYCOQC.out.versions.ifEmpty(null))
}

//
// MODULE: PORECHOP, quality check for nanopore reads and Quality/Length Plots
//
ch_porechop_log_multiqc = Channel.empty()
if ( params.assembly_type == 'hybrid' || params.assembly_type == 'long' && !('short' in params.assembly_type) ) {
PORECHOP_PORECHOP (
ch_longreads.dump(tag: 'longreads')
)
ch_porechop_log_multiqc = PORECHOP_PORECHOP.out.log
ch_versions = ch_versions.mix( PORECHOP_PORECHOP.out.versions.ifEmpty(null) )
}

Expand Down Expand Up @@ -229,7 +237,6 @@ workflow BACASS {
//
// MODULE: Canu, genome assembly, long reads
//

if ( params.assembler == 'canu' ) {
CANU (
ch_for_assembly.map { meta, reads, lr -> tuple( meta, lr ) },
Expand Down Expand Up @@ -335,6 +342,8 @@ workflow BACASS {
//
// MODULE: Kraken2, QC for sample purity
//
ch_kraken_short_multiqc = Channel.empty()
ch_kraken_long_multiqc = Channel.empty()
if ( !params.skip_kraken2 ) {
KRAKEN2_DB_PREPARATION (
kraken2db
Expand All @@ -345,7 +354,9 @@ workflow BACASS {
false,
false
)
ch_kraken_short_multiqc = KRAKEN2.out.report
ch_versions = ch_versions.mix(KRAKEN2.out.versions.ifEmpty(null))

KRAKEN2_LONG (
ch_for_kraken2_long
.map { meta, reads ->
Expand All @@ -359,6 +370,7 @@ workflow BACASS {
false,
false
)
ch_kraken_long_multiqc = KRAKEN2_LONG.out.report
ch_versions = ch_versions.mix(KRAKEN2_LONG.out.versions.ifEmpty(null))
}

Expand All @@ -375,11 +387,13 @@ workflow BACASS {
[[:],[]],
[[:],[]]
)
ch_versions = ch_versions.mix(QUAST.out.versions.ifEmpty(null))
ch_quast_multiqc = QUAST.out.tsv
ch_versions = ch_versions.mix(QUAST.out.versions.ifEmpty(null))

//
// MODULE: PROKKA, gene annotation
//
ch_prokka_multiqc = Channel.empty()
if ( !params.skip_annotation && params.annotation_tool == 'prokka' ) {
GUNZIP ( ch_assembly )
ch_to_prokka = GUNZIP.out.gunzip
Expand All @@ -390,7 +404,8 @@ workflow BACASS {
[],
[]
)
ch_versions = ch_versions.mix(PROKKA.out.versions.ifEmpty(null))
ch_prokka_multiqc = PROKKA.out.txt.collect()
ch_versions = ch_versions.mix(PROKKA.out.versions.ifEmpty(null))
}

//
Expand Down Expand Up @@ -425,14 +440,22 @@ workflow BACASS {
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TRIM_FASTP_FASTQC.out.fastqc_raw_zip.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(FASTQ_TRIM_FASTP_FASTQC.out.trim_json.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_fastqc_raw_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_fastqc_trim_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_trim_json_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_kraken_short_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_kraken_long_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_quast_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_prokka_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_nanoplot_txt_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_porechop_log_multiqc.collect{it[1]}.ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_pycoqc_multiqc.collect{it[1]}.ifEmpty([]))

MULTIQC (
ch_multiqc_files.collect(),
ch_multiqc_config.toList(),
ch_multiqc_custom_config.toList(),
ch_multiqc_logo.toList()
ch_multiqc_config,
ch_multiqc_custom_config.collect().ifEmpty([]),
ch_multiqc_logo.collect().ifEmpty([])
)
multiqc_report = MULTIQC.out.report.toList()
}
Expand Down

0 comments on commit 368c6cb

Please sign in to comment.