From aa02e39caf6d7eea1cfa468851ec3a8a4d8fa5ae Mon Sep 17 00:00:00 2001 From: Luisa Santus Date: Mon, 23 Sep 2024 19:26:18 +0000 Subject: [PATCH 1/2] update --- assets/multiqc_config.yml | 40 ++++---- modules.json | 4 +- modules/nf-core/mtmalign/align/main.nf | 10 +- .../nf-core/mtmalign/align/tests/main.nf.test | 60 +++++++----- .../mtmalign/align/tests/main.nf.test.snap | 53 +++++++++-- modules/nf-core/multiqc/main.nf | 4 +- modules/nf-core/multiqc/meta.yml | 91 ++++++++++--------- .../nf-core/multiqc/tests/main.nf.test.snap | 6 +- 8 files changed, 161 insertions(+), 107 deletions(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 427c9d46..30915f87 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -42,102 +42,102 @@ custom_table_header_config: fasta: description: "Input fasta file." hidden: False - group: "Fasta" + namespace: "Fasta" n_sequences: description: "Number of sequences in the input fasta file." hidden: False - group: "Fasta" + namespace: "Fasta" scale: "Set2" seqlength_mean: description: "Average sequence length in the input fasta file." hidden: False - group: "Fasta" + namespace: "Fasta" format: "{:,.1f}" seqlength_max: description: "Maximum sequence length in the input fasta file." hidden: True - group: "Fasta" + namespace: "Fasta" format: "{:,.1f}" seqlength_median: description: "Median sequence length in the input fasta file." hidden: True - group: "Fasta" + namespace: "Fasta" format: "{:,.1f}" sp: description: "Sum of Pairs metric." hidden: False - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" max: 100 tc: description: "Total Column metric." hidden: False - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" max: 100 EVALUATED: description: "EVALUATED metric." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" max: 100 APDB: description: "APDB metric." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" iRMSD: description: "iRMSD metric." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" TCS: description: "TCS metric." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" total_gaps: description: "Total amount of gaps." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" avg_gaps: description: "Average amount of gaps per sequence." hidden: True - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" NiRMSD: description: "NiRMSD metric." hidden: False - group: "Alignment" + namespace: "Alignment" format: "{:,.1f}" min: 0 tree: description: "Tree used in the alignment." hidden: False - group: "Alignment" + namespace: "Alignment" scale: "Paired" args_tree: description: "Arguments used to build the tree." hidden: True - group: "Alignment" + namespace: "Alignment" args_tree_clean: description: "Arguments used to build the tree." hidden: True - group: "Alignment" + namespace: "Alignment" aligner: description: "Aligner used." hidden: False - group: "Alignment" + namespace: "Alignment" scale: "Paired" args_aligner: description: "Arguments used to run the aligner." hidden: True - group: "Alignment" + namespace: "Alignment" args_aligner_clean: description: "Arguments used to run the aligner." hidden: True - group: "Alignment" + namespace: "Alignment" table_columns_placement: summary_stats: diff --git a/modules.json b/modules.json index 9dcc52ed..831b85c1 100644 --- a/modules.json +++ b/modules.json @@ -69,12 +69,12 @@ }, "mtmalign/align": { "branch": "master", - "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", + "git_sha": "4eecd9a0c06fa508ae314c06ac952c161c019679", "installed_by": ["modules"] }, "multiqc": { "branch": "master", - "git_sha": "06c8865e36741e05ad32ef70ab3fac127486af48", + "git_sha": "666652151335353eef2fcd58880bcef5bc2928e1", "installed_by": ["modules"] }, "muscle5/super5": { diff --git a/modules/nf-core/mtmalign/align/main.nf b/modules/nf-core/mtmalign/align/main.nf index 933d2c74..54c9c521 100644 --- a/modules/nf-core/mtmalign/align/main.nf +++ b/modules/nf-core/mtmalign/align/main.nf @@ -37,18 +37,16 @@ process MTMALIGN_ALIGN { mtm-align -i input_list.txt -o ${prefix}.pdb # -o does not affect the fasta naming, so move it to the new name - mv ./mTM_result/result.fasta ./mTM_result/${prefix}.aln + mv ./mTM_result/result.fasta ${prefix}.aln + mv ./mTM_result/${prefix}.pdb ${prefix}.pdb # Remove ".pdb" from the ids in the alignment file - sed -i 's/\\.pdb//g' ./mTM_result/${prefix}.aln + sed -i 's/\\.pdb//g' ${prefix}.aln # compress both output files if ${compress}; then - pigz -p ${task.cpus} ./mTM_result/${prefix}.aln ./mTM_result/${prefix}.pdb + pigz -p ${task.cpus} ${prefix}.aln ${prefix}.pdb fi - # move everything in mTM_result to the working directory - mv ./mTM_result/* . - # mtm-align -v prints the wrong version 20180725, so extract it from the cosmetic output in the help message cat <<-END_VERSIONS > versions.yml "${task.process}": diff --git a/modules/nf-core/mtmalign/align/tests/main.nf.test b/modules/nf-core/mtmalign/align/tests/main.nf.test index ada32c39..0dc8b885 100644 --- a/modules/nf-core/mtmalign/align/tests/main.nf.test +++ b/modules/nf-core/mtmalign/align/tests/main.nf.test @@ -9,19 +9,20 @@ nextflow_process { tag "mtmalign/align" tag "untar" - test("Test on seatoxin dataset - uncompressed") { - setup { + setup { - run("UNTAR") { - script "../../../../../modules/nf-core/untar/main.nf" - process { - """ - archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) - input[0] = Channel.of(tuple([id:'test'], archive)) - """ - } - } + run("UNTAR") { + script "../../../../../modules/nf-core/untar/main.nf" + process { + """ + archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) + input[0] = Channel.of(tuple([id:'test'], archive)) + """ + } } + } + + test("seatoxin - uncompressed") { when { params { @@ -49,19 +50,7 @@ nextflow_process { } } - test("Test on seatoxin dataset - compressed") { - setup { - - run("UNTAR") { - script "../../../../../modules/nf-core/untar/main.nf" - process { - """ - archive = file("https://raw.githubusercontent.com/nf-core/test-datasets/multiplesequencealign/testdata/structures/seatoxin-ref.tar.gz", checkIfExists: true) - input[0] = Channel.of(tuple([id:'test'], archive)) - """ - } - } - } + test("seatoxin - compressed") { when { params { @@ -87,4 +76,27 @@ nextflow_process { ) } } + + test("seatoxin - uncompressed - stub") { + + options '-stub' + when { + params { + } + process { + """ + input[0] = UNTAR.out.untar.map { meta,dir -> [[ id:'test' ], file(dir).listFiles().collect()]} + input[1] = false + """ + } + } + + then { + assertAll( + { assert process.success }, + { assert snapshot(process.out).match() } + ) + } + } + } \ No newline at end of file diff --git a/modules/nf-core/mtmalign/align/tests/main.nf.test.snap b/modules/nf-core/mtmalign/align/tests/main.nf.test.snap index 0eefb191..548ced89 100644 --- a/modules/nf-core/mtmalign/align/tests/main.nf.test.snap +++ b/modules/nf-core/mtmalign/align/tests/main.nf.test.snap @@ -5,10 +5,6 @@ "versions.yml:md5,7cbacec15bb9e0c8cbb27610bde74c10" ] ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, "timestamp": "2024-06-03T11:01:13.729263689" }, "versions1": { @@ -17,10 +13,51 @@ "versions.yml:md5,7cbacec15bb9e0c8cbb27610bde74c10" ] ], - "meta": { - "nf-test": "0.8.4", - "nextflow": "24.04.2" - }, "timestamp": "2024-06-03T11:01:37.28539854" + }, + "seatoxin - uncompressed - stub": { + "content": [ + { + "0": [ + [ + { + "id": "test" + }, + "test.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "1": [ + [ + { + "id": "test" + }, + "test.pdb:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "2": [ + "versions.yml:md5,7cbacec15bb9e0c8cbb27610bde74c10" + ], + "alignment": [ + [ + { + "id": "test" + }, + "test.aln:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "structure": [ + [ + { + "id": "test" + }, + "test.pdb:md5,d41d8cd98f00b204e9800998ecf8427e" + ] + ], + "versions": [ + "versions.yml:md5,7cbacec15bb9e0c8cbb27610bde74c10" + ] + } + ], + "timestamp": "2024-09-23T16:51:04.027375" } } \ No newline at end of file diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf index ceaec139..b9ccebdb 100644 --- a/modules/nf-core/multiqc/main.nf +++ b/modules/nf-core/multiqc/main.nf @@ -3,8 +3,8 @@ process MULTIQC { conda "${moduleDir}/environment.yml" container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ? - 'https://depot.galaxyproject.org/singularity/multiqc:1.24.1--pyhdfd78af_0' : - 'biocontainers/multiqc:1.24.1--pyhdfd78af_0' }" + 'https://depot.galaxyproject.org/singularity/multiqc:1.25--pyhdfd78af_0' : + 'biocontainers/multiqc:1.25--pyhdfd78af_0' }" input: path multiqc_files, stageAs: "?/*" diff --git a/modules/nf-core/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml index 382c08cb..b16c1879 100644 --- a/modules/nf-core/multiqc/meta.yml +++ b/modules/nf-core/multiqc/meta.yml @@ -1,5 +1,6 @@ name: multiqc -description: Aggregate results from bioinformatics analyses across many samples into a single report +description: Aggregate results from bioinformatics analyses across many samples into + a single report keywords: - QC - bioinformatics tools @@ -12,53 +13,59 @@ tools: homepage: https://multiqc.info/ documentation: https://multiqc.info/docs/ licence: ["GPL-3.0-or-later"] + identifier: biotools:multiqc input: - - multiqc_files: - type: file - description: | - List of reports / files recognised by MultiQC, for example the html and zip output of FastQC - - multiqc_config: - type: file - description: Optional config yml for MultiQC - pattern: "*.{yml,yaml}" - - extra_multiqc_config: - type: file - description: Second optional config yml for MultiQC. Will override common sections in multiqc_config. - pattern: "*.{yml,yaml}" - - multiqc_logo: - 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}" + - - multiqc_files: + type: file + description: | + List of reports / files recognised by MultiQC, for example the html and zip output of FastQC + - - multiqc_config: + type: file + description: Optional config yml for MultiQC + pattern: "*.{yml,yaml}" + - - extra_multiqc_config: + type: file + description: Second optional config yml for MultiQC. Will override common sections + in multiqc_config. + pattern: "*.{yml,yaml}" + - - multiqc_logo: + 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 - description: MultiQC report file - pattern: "multiqc_report.html" + - "*multiqc_report.html": + type: file + description: MultiQC report file + pattern: "multiqc_report.html" - data: - type: directory - description: MultiQC data dir - pattern: "multiqc_data" + - "*_data": + type: directory + description: MultiQC data dir + pattern: "multiqc_data" - plots: - type: file - description: Plots created by MultiQC - pattern: "*_data" + - "*_plots": + type: file + description: Plots created by MultiQC + pattern: "*_data" - versions: - type: file - description: File containing software versions - pattern: "versions.yml" + - versions.yml: + type: file + description: File containing software versions + pattern: "versions.yml" authors: - "@abhi18av" - "@bunop" diff --git a/modules/nf-core/multiqc/tests/main.nf.test.snap b/modules/nf-core/multiqc/tests/main.nf.test.snap index 83fa080c..b779e469 100644 --- a/modules/nf-core/multiqc/tests/main.nf.test.snap +++ b/modules/nf-core/multiqc/tests/main.nf.test.snap @@ -2,7 +2,7 @@ "multiqc_versions_single": { "content": [ [ - "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { @@ -17,7 +17,7 @@ "multiqc_report.html", "multiqc_data", "multiqc_plots", - "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { @@ -29,7 +29,7 @@ "multiqc_versions_config": { "content": [ [ - "versions.yml:md5,6eb13f3b11bbcbfc98ad3166420ff760" + "versions.yml:md5,8c8724363a5efe0c6f43ab34faa57efd" ] ], "meta": { From ab3005be9b4c16410c8a62b394953ecb12833cb4 Mon Sep 17 00:00:00 2001 From: Luisa Santus Date: Wed, 25 Sep 2024 08:06:14 +0000 Subject: [PATCH 2/2] update --- assets/multiqc_config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml index 30915f87..77c64a9f 100644 --- a/assets/multiqc_config.yml +++ b/assets/multiqc_config.yml @@ -35,7 +35,7 @@ custom_table_header_config: summary_stats: perc_sim: description: "Average percentage similarity between all sequences in the input fasta file." - group: "Fasta" + namespace: "Fasta" max: 100 format: "{:,.2f}" suffix: "%"