Skip to content

Commit

Permalink
Merge pull request #76 from kbestak/multiqc_report_fix
Browse files Browse the repository at this point in the history
Fixed multiqc report
  • Loading branch information
kbestak authored Sep 15, 2024
2 parents a28da2c + 07d44b1 commit b5aee86
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 32 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ results/
testing/
testing*
*.pyc
.nf-test.log
.nf-test/
26 changes: 17 additions & 9 deletions assets/multiqc_config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
custom_logo: "$projectdir/assets/nf-core-molkart_logo_light.png"
custom_logo_url: https://github.com/nf-core/molkart/
custom_logo_title: "nf-core/molkart"

Expand All @@ -7,6 +6,10 @@ report_comment: >
analysis pipeline. For information about how to interpret these results, please see the
<a href="https://nf-co.re/molkart/dev/docs/output" target="_blank">documentation</a>.
report_section_order:
segmentation_stats:
order: 800
my_custom_content_image:
order: 800
"nf-core-molkart-methods-description":
order: -1000
software_versions:
Expand All @@ -16,16 +19,20 @@ report_section_order:

export_plots: true

run_module:
- custom_content

custom_data:
my_custom_content_image:
section_name: "Crop overview"
section_name: "Crop selection overview"
segmentation_stats:
id: "segmentation_stats"
file_format: "csv"
plot_type: "table"
section_name: "QC statistics from segmentation"
pconfig:
id: "segmentation_stats_table"
namespace: "Segmentation stats"
headers:
sample_id:
title: sample_id
Description: "Sample"
segmentation_method:
title: Segmentation method
description: "Segmentation method"
Expand Down Expand Up @@ -60,10 +67,11 @@ custom_data:
title: Number of removed large cells
description: "Total number of labels above max_area"
sp:
my_custom_content_image:
fn: "*overview.png"
segmentation_stats:
fn: "final_QC.all_samples.csv"
fn: "*spot_QC.csv"
shared: true
my_custom_content_image:
fn: "*.png"
ignore_images: false

disable_version_detection: true
1 change: 0 additions & 1 deletion conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ process {
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
container = "community.wave.seqera.io/library/multiqc:1.22.1--4886de6095538010"
}

withName: 'MOLKARTQC' {
Expand Down
5 changes: 5 additions & 0 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ params {
mindagap_loopnum = 100
clahe_pyramid_tile = 368
segmentation_method = "mesmer,cellpose"

// Only used if additionally params.create_training_subset is used
crop_size_x = 30
crop_size_y = 30
crop_amount = 2
}
2 changes: 1 addition & 1 deletion modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"multiqc": {
"branch": "master",
"git_sha": "8f2062e7b4185590fb9f43c275381a31a6544fc0",
"git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48",
"installed_by": ["modules"]
}
}
Expand Down
4 changes: 1 addition & 3 deletions modules/nf-core/multiqc/environment.yml

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

14 changes: 11 additions & 3 deletions modules/nf-core/multiqc/main.nf

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

13 changes: 13 additions & 0 deletions modules/nf-core/multiqc/meta.yml

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

8 changes: 8 additions & 0 deletions modules/nf-core/multiqc/tests/main.nf.test

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

14 changes: 7 additions & 7 deletions modules/nf-core/multiqc/tests/main.nf.test.snap

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

5 changes: 5 additions & 0 deletions modules/nf-core/multiqc/tests/nextflow.config

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

13 changes: 5 additions & 8 deletions workflows/molkart.nf
Original file line number Diff line number Diff line change
Expand Up @@ -298,19 +298,14 @@ workflow MOLKART {
//
// MODULE: MultiQC
//
//workflow_summary = WorkflowMolkart.paramsSummaryMultiqc(workflow, summary_params)
//ch_workflow_summary = Channel.value(workflow_summary)
//methods_description = WorkflowMolkart.methodsDescriptionText(workflow, ch_multiqc_custom_methods_description, params)
//ch_methods_description = Channel.value(methods_description)

ch_multiqc_config = Channel.fromPath(
"$projectDir/assets/multiqc_config.yml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ?
Channel.fromPath(params.multiqc_config, checkIfExists: true) :
Channel.empty()
ch_multiqc_logo = params.multiqc_logo ?
Channel.fromPath(params.multiqc_logo, checkIfExists: true) :
Channel.empty()
Channel.fromPath("$projectDir/assets/nf-core-molkart_logo_light.png", checkIfExists: true)

summary_params = paramsSummaryMap(
workflow, parameters_schema: "nextflow_schema.json")
Expand Down Expand Up @@ -342,14 +337,16 @@ workflow MOLKART {
} else {
ch_multiqc_files = ch_multiqc_files.mix(
MOLKARTQC.out.qc.map{it[1]}
.collectFile(name: 'final_QC.all_samples.csv', keepHeader: true, storeDir: "${params.outdir}/multiqc"))
.collectFile())
}

MULTIQC (
ch_multiqc_files.collect(),
ch_multiqc_config.toList(),
ch_multiqc_custom_config.toList(),
ch_multiqc_logo.toList()
ch_multiqc_logo.toList(),
[],
[]
)

emit:
Expand Down

0 comments on commit b5aee86

Please sign in to comment.