Skip to content

Commit c7274a8

Browse files
mribeirodantasnvnieuwkJulianFlesch
authored
Converts FASTQ to use topics for version (#9266)
* Converts FASTQ to use topics for version Fixes #9261 * Updates meta.yml file * Updates snapshot * Update modules/nf-core/fastqc/main.nf Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Update modules/nf-core/fastqc/meta.yml Co-authored-by: Nicolas Vannieuwkerke <[email protected]> * Updates snapshot * Removes .mix versions of FASTQ in subworkflows * Updates snapshots of fastqc modules and related subworkflows * Updates snapshots of fastqc * Updates fastqc snapshot * Sanitizes process.out for indexed outputs * Updates fastqc snapshot * Updates fastqc snapshot * Adds topic to the meta.yml file * Fixes syntax usage of topic * Adds new Devcontainer Setup for use with Codespaces (#8983) * Add devcontainer setup from nf-core/tools for testing. Move nf-test install to setup.sh * Add the default user again at the end * Move nf-test install to unprivileged location and add WORKDIR. Add pipefail. Remove copying unnecessary files. * Move Dockerfile * Remove docker-in-docker interfering with docker-outside-docker from parent image. Adapt Mounts to use host paths when starting sibling containers * Fix arm profile * Remove apptainer install * Remove efforts for unprivileged user * Use root user by default * update welcome message. update prompt * Remove explicitly setting NFT_WORKDIR * Add nf-test as local feature * Remove Dockerfile in favor of features * Remove env vars * Add apptainer as local feature * Fix install * Fix install script for apptainer by installing dependencies first * Fix install script for apptainer by installing dependencies first * Update local feature to have version, name, id * ftr: new devcontainer config * Remove redundant tools install * Remove local features. Already installed in parent image * Testing: Change to pulling image from controlled location for testing in codespaces. REVERT THIS * fix: set executable bit flag to run setup.sh * Change to final container image * Bumpy hostRequirements to run in more powerful instance in Codespaces * Switch to using dev tag of our nf-core/devcontainer * Fixes meta.yml file indenting + syntax * Fixes meta.yml with nf-core modules lint fastqc --fix * Removes accidental adding of .devcontainer * Fixes null version in subworkflow snapshot --------- Co-authored-by: Nicolas Vannieuwkerke <[email protected]> Co-authored-by: JulianFlesch <[email protected]>
1 parent 83a5266 commit c7274a8

File tree

11 files changed

+271
-273
lines changed

11 files changed

+271
-273
lines changed

.devcontainer/devcontainer.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

modules/nf-core/fastqc/main.nf

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ process FASTQC {
1111
tuple val(meta), path(reads)
1212

1313
output:
14-
tuple val(meta), path("*.html"), emit: html
15-
tuple val(meta), path("*.zip") , emit: zip
16-
path "versions.yml" , emit: versions
14+
tuple val(meta) , path("*.html") , emit: html
15+
tuple val(meta) , path("*.zip") , emit: zip
16+
tuple val("${task.process}"), val('fastqc'), eval('fastqc --version | sed "/FastQC v/!d; s/.*v//"'), emit: versions_fastqc, topic: versions
1717

1818
when:
1919
task.ext.when == null || task.ext.when
@@ -43,22 +43,12 @@ process FASTQC {
4343
--threads ${task.cpus} \\
4444
--memory ${fastqc_memory} \\
4545
${renamed_files}
46-
47-
cat <<-END_VERSIONS > versions.yml
48-
"${task.process}":
49-
fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' )
50-
END_VERSIONS
5146
"""
5247

5348
stub:
5449
def prefix = task.ext.prefix ?: "${meta.id}"
5550
"""
5651
touch ${prefix}.html
5752
touch ${prefix}.zip
58-
59-
cat <<-END_VERSIONS > versions.yml
60-
"${task.process}":
61-
fastqc: \$( fastqc --version | sed '/FastQC v/!d; s/.*v//' )
62-
END_VERSIONS
6353
"""
6454
}

modules/nf-core/fastqc/meta.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,27 @@ output:
5353
description: FastQC report archive
5454
pattern: "*_{fastqc.zip}"
5555
ontologies: []
56-
versions:
57-
- versions.yml:
58-
type: file
59-
description: File containing software versions
60-
pattern: "versions.yml"
61-
ontologies:
62-
- edam: http://edamontology.org/format_3750 # YAML
56+
versions_fastqc:
57+
- - ${task.process}:
58+
type: string
59+
description: The process the versions were collected from
60+
- fastqc:
61+
type: string
62+
description: The tool name
63+
- fastqc --version | sed "/FastQC v/!d; s/.*v//:
64+
type: string
65+
description: The command used to generate the version of the tool
66+
topics:
67+
- versions:
68+
- - process:
69+
type: string
70+
description: The process the versions were collected from
71+
- tool:
72+
type: string
73+
description: The tool name
74+
- version:
75+
type: string
76+
description: The version of the tool
6377
authors:
6478
- "@drpatelh"
6579
- "@grst"

modules/nf-core/fastqc/tests/main.nf.test

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ nextflow_process {
3030
{ assert process.out.html[0][1] ==~ ".*/test_fastqc.html" },
3131
{ assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" },
3232
{ assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
33-
{ assert snapshot(process.out.versions).match() }
33+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
3434
)
3535
}
3636
}
@@ -58,7 +58,7 @@ nextflow_process {
5858
{ assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" },
5959
{ assert path(process.out.html[0][1][0]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
6060
{ assert path(process.out.html[0][1][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
61-
{ assert snapshot(process.out.versions).match() }
61+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
6262
)
6363
}
6464
}
@@ -82,7 +82,7 @@ nextflow_process {
8282
{ assert process.out.html[0][1] ==~ ".*/test_fastqc.html" },
8383
{ assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" },
8484
{ assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
85-
{ assert snapshot(process.out.versions).match() }
85+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
8686
)
8787
}
8888
}
@@ -106,7 +106,7 @@ nextflow_process {
106106
{ assert process.out.html[0][1] ==~ ".*/test_fastqc.html" },
107107
{ assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" },
108108
{ assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
109-
{ assert snapshot(process.out.versions).match() }
109+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
110110
)
111111
}
112112
}
@@ -142,7 +142,7 @@ nextflow_process {
142142
{ assert path(process.out.html[0][1][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
143143
{ assert path(process.out.html[0][1][2]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
144144
{ assert path(process.out.html[0][1][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
145-
{ assert snapshot(process.out.versions).match() }
145+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
146146
)
147147
}
148148
}
@@ -166,7 +166,7 @@ nextflow_process {
166166
{ assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" },
167167
{ assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" },
168168
{ assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") },
169-
{ assert snapshot(process.out.versions).match() }
169+
{ assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() }
170170
)
171171
}
172172
}

0 commit comments

Comments
 (0)