Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new input to multiqc module for use with --rename_samples #5973

Merged
merged 6 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions modules/nf-core/multiqc/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ process MULTIQC {
path(multiqc_config)
path(extra_multiqc_config)
path(multiqc_logo)
path(replace_names)
path(sample_names)

output:
path "*multiqc_report.html", emit: report
Expand All @@ -26,13 +28,17 @@ process MULTIQC {
def config = multiqc_config ? "--config $multiqc_config" : ''
def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : ''
def logo = multiqc_logo ? /--cl-config 'custom_logo: "${multiqc_logo}"'/ : ''
def replace = replace_names ? "--replace-names ${replace_names}" : ''
def samples = sample_names ? "--sample-names ${sample_names}" : ''
"""
multiqc \\
--force \\
$args \\
$config \\
$extra_config \\
$logo \\
$replace \\
$samples \\
.

cat <<-END_VERSIONS > versions.yml
Expand Down
13 changes: 13 additions & 0 deletions modules/nf-core/multiqc/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ input:
type: file
description: Optional logo file for MultiQC
pattern: "*.{png}"
- replace_names:
type: file
description: |
Optional two-column sample renaming file. First column a set of
patterns, second column a set of corresponding replacements. Passed via
MultiQC's `--replace-names` option.
pattern: "*.{tsv}"
- sample_names:
type: file
description: |
Optional TSV file with headers, passed to the MultiQC --sample_names
argument.
pattern: "*.{tsv}"
output:
- report:
type: file
Expand Down
6 changes: 6 additions & 0 deletions modules/nf-core/multiqc/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ nextflow_process {
input[1] = []
input[2] = []
input[3] = []
input[4] = []
input[5] = []
"""
}
}
Expand All @@ -41,6 +43,8 @@ nextflow_process {
input[1] = Channel.of(file("https://github.com/nf-core/tools/raw/dev/nf_core/pipeline-template/assets/multiqc_config.yml", checkIfExists: true))
input[2] = []
input[3] = []
input[4] = []
input[5] = []
"""
}
}
Expand All @@ -66,6 +70,8 @@ nextflow_process {
input[1] = []
input[2] = []
input[3] = []
input[4] = []
input[5] = []
"""
}
}
Expand Down
Loading