-
Notifications
You must be signed in to change notification settings - Fork 964
FASTQC: multiqc_files topic #9964
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
base: master
Are you sure you want to change the base?
Changes from all commits
290946e
5a0bb56
7edc153
c253c0e
e050081
7608184
ac7e6b4
91288f3
51a57b1
1d7cffb
b6094a9
ad5c001
28c7e29
55882bc
5d3739f
1c0ebc8
71c514b
2a0f0f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,15 +22,17 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| // NOTE The report contains the date inside it, which means that the md5sum is stable per day, but not longer than that. So you can't md5sum it. | ||
| // looks like this: <div id="header_filename">Mon 2 Oct 2023<br/>test.gz</div> | ||
| // https://github.com/nf-core/modules/pull/3903#issuecomment-1743620039 | ||
| { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, | ||
| { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i prefer the shorter version tbh
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would agree, but the snapshot is much more concise with this.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i don't see much difference in the snapshot. what do you mean exactly?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We now only have the file, not the meta map, the process and the tool name (which is the structure we choose for the multiqc_files topic).
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -50,15 +52,15 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, | ||
| { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, | ||
| { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, | ||
| { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1][0]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][1][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3][0]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][3][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -77,12 +79,14 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, | ||
| { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -101,12 +105,14 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.html[0][1] ==~ ".*/test_fastqc.html" }, | ||
| { assert process.out.zip[0][1] ==~ ".*/test_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -128,21 +134,17 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.html[0][1][0] ==~ ".*/test_1_fastqc.html" }, | ||
| { assert process.out.html[0][1][1] ==~ ".*/test_2_fastqc.html" }, | ||
| { assert process.out.html[0][1][2] ==~ ".*/test_3_fastqc.html" }, | ||
| { assert process.out.html[0][1][3] ==~ ".*/test_4_fastqc.html" }, | ||
| { assert process.out.zip[0][1][0] ==~ ".*/test_1_fastqc.zip" }, | ||
| { assert process.out.zip[0][1][1] ==~ ".*/test_2_fastqc.zip" }, | ||
| { assert process.out.zip[0][1][2] ==~ ".*/test_3_fastqc.zip" }, | ||
| { assert process.out.zip[0][1][3] ==~ ".*/test_4_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1][0]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][1][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][1][2]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][1][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3][0]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][3][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][3][2]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert path(process.out.html[0][3][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -161,12 +163,14 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert process.out.html[0][1] ==~ ".*/mysample_fastqc.html" }, | ||
| { assert process.out.zip[0][1] ==~ ".*/mysample_fastqc.zip" }, | ||
| { assert path(process.out.html[0][1]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot(sanitizeOutput(process.out).findAll { key, val -> key != 'html' && key != 'zip' }).match() } | ||
| { assert path(process.out.html[0][3]).text.contains("<tr><td>File type</td><td>Conventional base calls</td></tr>") }, | ||
| { assert snapshot( | ||
| process.out.html.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.zip.collect().flatten().findAll { !(it instanceof Map) && it.startsWith("/") }.collect { file(it).name }, | ||
| process.out.findAll { key, val -> key.startsWith("versions") } | ||
| ).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -186,9 +190,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -209,9 +213,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -231,9 +235,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -253,9 +257,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -278,9 +282,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
@@ -300,9 +304,9 @@ nextflow_process { | |
| } | ||
|
|
||
| then { | ||
| assert process.success | ||
| assertAll ( | ||
| { assert process.success }, | ||
| { assert snapshot(process.out).match() } | ||
| { assert snapshot(sanitizeOutput(process.out)).match() } | ||
| ) | ||
| } | ||
| } | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why can't we just do this? Why do we need the extra pieces like the versions topic?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I need the
val('fastqc')to know which tool this topic is coming from in order to publish it or not, and to choose where, and we agreed on slack when I was doing this for ensemblvep and snpeff that maybe having the task.process could be useful too.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think maybe we need to separate:
I think the basis for making publishing decisions from topics is wobbly right now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it works well:
https://github.com/maxulysse/nf-core_rnavar/blob/topics_again_again/main.nf#L202-L216
for me, if I can put these reports into a topics for multiQC, then it's much more simpler if I use the same for publishing while I'm at it.
And we can filter out if we don't want to publish reports coming from tools/process...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think I'll be controlling publishing separately, I don't think we should be conflating these things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But could I as a lazy bioinformatician just conflate all these things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pinin4fjords what is wobbly at the moment with topics and publishing?Looking at the rnavar PR it does look very clean, so I am inclined to use it, but not if my files don't end up where they need to be
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sneaking topic-based publishing in via the back door of the MultiQC topic is the wrong precedent to set, IMHO.
I actually think topics would be a great mechanism for publishing. The problem is that modules shouldn't know how their calling workflows will publish their outputs, so topic-based publishing really needs to be initiated from the workflow side. That's why I asked @bentsherman for a channel-to-topic operator (nextflow-io/nextflow#6756), though I'm not sure it's going to happen.
MultiQC is a bit of an exception here, because we do know how calling workflows will use those files - they'll go to MultiQC. But overloading that topic with publishing metadata unrelated to the MultiQC run itself isn't the right approach to my mind.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe when you move to typed processes it could become cleaner:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bentsherman I now know what I need to do