Skip to content

Commit

Permalink
implementation of multiqc report generation for the V1 report
Browse files Browse the repository at this point in the history
  • Loading branch information
Mxrcon committed Aug 29, 2024
1 parent d38d913 commit 416fd3c
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 8 deletions.
6 changes: 4 additions & 2 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@ workflow {
UTILS_MERGE_COHORT_STATS.out.merged_cohort_stats_ch,
MERGE_WF.out.major_variants_results_ch,
MINOR_VARIANTS_ANALYSIS_WF.out.minor_variants_results_ch,
STRUCTURAL_VARIANTS_ANALYSIS_WF.out.structural_variants_results_ch )

STRUCTURAL_VARIANTS_ANALYSIS_WF.out.structural_variants_results_ch,
MERGE_WF.out.snps_dists_ch
)

}
}
}
4 changes: 3 additions & 1 deletion modules/multiqc/multiqc.nf
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ process MULTIQC {
label 'cpu_4_memory_16'

input:
path(multiqc_config)
path("*")

output:
tuple path("multiqc_data"), path("multiqc_report.html")


script:
def config = multiqc_config ? "--config $multiqc_config" : ''

"""
${params.multiqc_path} .
${params.multiqc_path} $config .
"""

stub:
Expand Down
1 change: 1 addition & 0 deletions modules/snpdists/snpdists.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ process SNPDISTS {

output:
tuple val(joint_name), path("*.snp_dists.tsv")
path("*snp_dists.tsv"), emit: snp_dists_file

script:

Expand Down
3 changes: 1 addition & 2 deletions workflows/merge_wf.nf
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,5 @@ workflow MERGE_WF {

emit:
major_variants_results_ch = MAJOR_VARIANT_ANALYSIS.out.major_variants_results_ch


snps_dists_ch = PHYLOGENY_ANALYSIS__EXCOMPLEX.out.snp_dists_ch
}
14 changes: 12 additions & 2 deletions workflows/reports_wf.nf
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ workflow REPORTS_WF {
major_variants_results_ch
minor_variants_results_ch
structural_variants_results_ch
snp_distances_ch

main:
MULTIQC(reports_fastqc_ch)

ch_multiqc_files = Channel.empty()

UTILS_SUMMARIZE_RESISTANCE_RESULTS(
UTILS_SUMMARIZE_RESISTANCE_RESULTS(
merged_cohort_stats_ch,
major_variants_results_ch,
minor_variants_results_ch,
Expand All @@ -28,6 +30,14 @@ workflow REPORTS_WF {
minor_variants_results_ch,
structural_variants_results_ch
)
ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true)

ch_multiqc_files = ch_multiqc_files.mix(
reports_fastqc_ch,
merged_cohort_stats_ch,
snp_distances_ch
)

MULTIQC(ch_multiqc_config,
ch_multiqc_files.collect())
}
2 changes: 1 addition & 1 deletion workflows/subworkflows/phylogeny_analysis.nf
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ workflow PHYLOGENY_ANALYSIS {

emit:
snpsites_tree_tuple = SNPSITES.out.join(IQTREE.out.tree_tuple)

snp_dists_ch = SNPDISTS.out.snp_dists_file
}

0 comments on commit 416fd3c

Please sign in to comment.