diff --git a/.github/workflows/awsfulltest.yml b/.github/workflows/awsfulltest.yml
index 5d09b7e..b367767 100644
--- a/.github/workflows/awsfulltest.yml
+++ b/.github/workflows/awsfulltest.yml
@@ -28,3 +28,7 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/gwas/results-${{ github.sha }}"
}
profiles: test_full,aws_tower
+ - uses: actions/upload-artifact@v3
+ with:
+ name: Tower debug log file
+ path: tower_action_*.log
diff --git a/.github/workflows/awstest.yml b/.github/workflows/awstest.yml
index 3693922..f648faf 100644
--- a/.github/workflows/awstest.yml
+++ b/.github/workflows/awstest.yml
@@ -23,3 +23,7 @@ jobs:
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/gwas/results-test-${{ github.sha }}"
}
profiles: test,aws_tower
+ - uses: actions/upload-artifact@v3
+ with:
+ name: Tower debug log file
+ path: tower_action_*.log
diff --git a/.prettierignore b/.prettierignore
index d0e7ae5..eb74a57 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -1,4 +1,5 @@
email_template.html
+adaptivecard.json
.nextflow*
work/
data/
diff --git a/CITATION.cff b/CITATION.cff
index 4533e2f..017666c 100644
--- a/CITATION.cff
+++ b/CITATION.cff
@@ -13,8 +13,8 @@ authors:
given-names: Johannes
- family-names: Wilm
given-names: Andreas
- - family-names: Ulysse Garcia
- given-names: Maxime
+ - family-names: Garcia
+ given-names: Maxime Ulysse
- family-names: Di Tommaso
given-names: Paolo
- family-names: Nahnsen
@@ -39,8 +39,8 @@ prefered-citation:
given-names: Johannes
- family-names: Wilm
given-names: Andreas
- - family-names: Ulysse Garcia
- given-names: Maxime
+ - family-names: Garcia
+ given-names: Maxime Ulysse
- family-names: Di Tommaso
given-names: Paolo
- family-names: Nahnsen
diff --git a/assets/adaptivecard.json b/assets/adaptivecard.json
new file mode 100644
index 0000000..53766c0
--- /dev/null
+++ b/assets/adaptivecard.json
@@ -0,0 +1,67 @@
+{
+ "type": "message",
+ "attachments": [
+ {
+ "contentType": "application/vnd.microsoft.card.adaptive",
+ "contentUrl": null,
+ "content": {
+ "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
+ "msteams": {
+ "width": "Full"
+ },
+ "type": "AdaptiveCard",
+ "version": "1.2",
+ "body": [
+ {
+ "type": "TextBlock",
+ "size": "Large",
+ "weight": "Bolder",
+ "color": "<% if (success) { %>Good<% } else { %>Attention<%} %>",
+ "text": "nf-core/gwas v${version} - ${runName}",
+ "wrap": true
+ },
+ {
+ "type": "TextBlock",
+ "spacing": "None",
+ "text": "Completed at ${dateComplete} (duration: ${duration})",
+ "isSubtle": true,
+ "wrap": true
+ },
+ {
+ "type": "TextBlock",
+ "text": "<% if (success) { %>Pipeline completed successfully!<% } else { %>Pipeline completed with errors. The full error message was: ${errorReport}.<% } %>",
+ "wrap": true
+ },
+ {
+ "type": "TextBlock",
+ "text": "The command used to launch the workflow was as follows:",
+ "wrap": true
+ },
+ {
+ "type": "TextBlock",
+ "text": "${commandLine}",
+ "isSubtle": true,
+ "wrap": true
+ }
+ ],
+ "actions": [
+ {
+ "type": "Action.ShowCard",
+ "title": "Pipeline Configuration",
+ "card": {
+ "type": "AdaptiveCard",
+ "\$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
+ "body": [
+ {
+ "type": "FactSet",
+ "facts": [<% out << summary.collect{ k,v -> "{\"title\": \"$k\", \"value\" : \"$v\"}"}.join(",\n") %>
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+}
diff --git a/assets/methods_description_template.yml b/assets/methods_description_template.yml
new file mode 100644
index 0000000..90ade04
--- /dev/null
+++ b/assets/methods_description_template.yml
@@ -0,0 +1,25 @@
+id: "nf-core-gwas-methods-description"
+description: "Suggested text and references to use when describing pipeline usage within the methods section of a publication."
+section_name: "nf-core/gwas Methods Description"
+section_href: "https://github.com/nf-core/gwas"
+plot_type: "html"
+## TODO nf-core: Update the HTML below to your prefered methods description, e.g. add publication citation for this pipeline
+## You inject any metadata in the Nextflow '${workflow}' object
+data: |
+
Methods
+ Data was processed using nf-core/gwas v${workflow.manifest.version} ${doi_text} of the nf-core collection of workflows (Ewels et al., 2020).
+ The pipeline was executed with Nextflow v${workflow.nextflow.version} (Di Tommaso et al., 2017) with the following command:
+ ${workflow.commandLine}
+ References
+
+ - Di Tommaso, P., Chatzou, M., Floden, E. W., Barja, P. P., Palumbo, E., & Notredame, C. (2017). Nextflow enables reproducible computational workflows. Nature Biotechnology, 35(4), 316-319. https://doi.org/10.1038/nbt.3820
+ - Ewels, P. A., Peltzer, A., Fillinger, S., Patel, H., Alneberg, J., Wilm, A., Garcia, M. U., Di Tommaso, P., & Nahnsen, S. (2020). The nf-core framework for community-curated bioinformatics pipelines. Nature Biotechnology, 38(3), 276-278. https://doi.org/10.1038/s41587-020-0439-x
+
+
+
Notes:
+
+ ${nodoi_text}
+ - The command above does not include parameters contained in any configs or profiles that may have been used. Ensure the config file is also uploaded with your publication!
+ - You should also cite all software used within this run. Check the "Software Versions" of this report to get version information.
+
+
diff --git a/assets/multiqc_config.yml b/assets/multiqc_config.yml
index 8e3285b..c2a7932 100644
--- a/assets/multiqc_config.yml
+++ b/assets/multiqc_config.yml
@@ -3,9 +3,11 @@ report_comment: >
analysis pipeline. For information about how to interpret these results, please see the
documentation.
report_section_order:
- software_versions:
+ "nf-core-gwas-methods-description":
order: -1000
- "nf-core-gwas-summary":
+ software_versions:
order: -1001
+ "nf-core-gwas-summary":
+ order: -1002
export_plots: true
diff --git a/docs/usage.md b/docs/usage.md
index c20ce2f..11a5ded 100644
--- a/docs/usage.md
+++ b/docs/usage.md
@@ -237,6 +237,14 @@ See the main [Nextflow documentation](https://www.nextflow.io/docs/latest/config
If you have any questions or issues please send us a message on [Slack](https://nf-co.re/join/slack) on the [`#configs` channel](https://nfcore.slack.com/channels/configs).
+## Azure Resource Requests
+
+To be used with the `azurebatch` profile by specifying the `-profile azurebatch`.
+We recommend providing a compute `params.vm_type` of `Standard_D16_v3` VMs by default but these options can be changed if required.
+
+Note that the choice of VM size depends on your quota and the overall workload during the analysis.
+For a thorough list, please refer the [Azure Sizes for virtual machines in Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/sizes).
+
## Running in the background
Nextflow handles job submissions and supervises the running jobs. The Nextflow process must run until the pipeline is finished.
diff --git a/lib/NfcoreTemplate.groovy b/lib/NfcoreTemplate.groovy
index 2fc0a9b..27feb00 100755
--- a/lib/NfcoreTemplate.groovy
+++ b/lib/NfcoreTemplate.groovy
@@ -145,6 +145,61 @@ class NfcoreTemplate {
output_tf.withWriter { w -> w << email_txt }
}
+ //
+ // Construct and send adaptive card
+ // https://adaptivecards.io
+ //
+ public static void adaptivecard(workflow, params, summary_params, projectDir, log) {
+ def hook_url = params.hook_url
+
+ def summary = [:]
+ for (group in summary_params.keySet()) {
+ summary << summary_params[group]
+ }
+
+ def misc_fields = [:]
+ misc_fields['start'] = workflow.start
+ misc_fields['complete'] = workflow.complete
+ misc_fields['scriptfile'] = workflow.scriptFile
+ misc_fields['scriptid'] = workflow.scriptId
+ if (workflow.repository) misc_fields['repository'] = workflow.repository
+ if (workflow.commitId) misc_fields['commitid'] = workflow.commitId
+ if (workflow.revision) misc_fields['revision'] = workflow.revision
+ misc_fields['nxf_version'] = workflow.nextflow.version
+ misc_fields['nxf_build'] = workflow.nextflow.build
+ misc_fields['nxf_timestamp'] = workflow.nextflow.timestamp
+
+ def msg_fields = [:]
+ msg_fields['version'] = workflow.manifest.version
+ msg_fields['runName'] = workflow.runName
+ msg_fields['success'] = workflow.success
+ msg_fields['dateComplete'] = workflow.complete
+ msg_fields['duration'] = workflow.duration
+ msg_fields['exitStatus'] = workflow.exitStatus
+ msg_fields['errorMessage'] = (workflow.errorMessage ?: 'None')
+ msg_fields['errorReport'] = (workflow.errorReport ?: 'None')
+ msg_fields['commandLine'] = workflow.commandLine
+ msg_fields['projectDir'] = workflow.projectDir
+ msg_fields['summary'] = summary << misc_fields
+
+ // Render the JSON template
+ def engine = new groovy.text.GStringTemplateEngine()
+ def hf = new File("$projectDir/assets/adaptivecard.json")
+ def json_template = engine.createTemplate(hf).make(msg_fields)
+ def json_message = json_template.toString()
+
+ // POST
+ def post = new URL(hook_url).openConnection();
+ post.setRequestMethod("POST")
+ post.setDoOutput(true)
+ post.setRequestProperty("Content-Type", "application/json")
+ post.getOutputStream().write(json_message.getBytes("UTF-8"));
+ def postRC = post.getResponseCode();
+ if (! postRC.equals(200)) {
+ log.warn(post.getErrorStream().getText());
+ }
+ }
+
//
// Print pipeline summary on completion
//
diff --git a/lib/Utils.groovy b/lib/Utils.groovy
old mode 100755
new mode 100644
index 28567bd..8d030f4
--- a/lib/Utils.groovy
+++ b/lib/Utils.groovy
@@ -21,19 +21,26 @@ class Utils {
}
// Check that all channels are present
- def required_channels = ['conda-forge', 'bioconda', 'defaults']
- def conda_check_failed = !required_channels.every { ch -> ch in channels }
+ // This channel list is ordered by required channel priority.
+ def required_channels_in_order = ['conda-forge', 'bioconda', 'defaults']
+ def channels_missing = ((required_channels_in_order as Set) - (channels as Set)) as Boolean
// Check that they are in the right order
- conda_check_failed |= !(channels.indexOf('conda-forge') < channels.indexOf('bioconda'))
- conda_check_failed |= !(channels.indexOf('bioconda') < channels.indexOf('defaults'))
+ def channel_priority_violation = false
+ def n = required_channels_in_order.size()
+ for (int i = 0; i < n - 1; i++) {
+ channel_priority_violation |= !(channels.indexOf(required_channels_in_order[i]) < channels.indexOf(required_channels_in_order[i+1]))
+ }
- if (conda_check_failed) {
+ if (channels_missing | channel_priority_violation) {
log.warn "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n" +
" There is a problem with your Conda configuration!\n\n" +
" You will need to set-up the conda-forge and bioconda channels correctly.\n" +
- " Please refer to https://bioconda.github.io/user/install.html#set-up-channels\n" +
- " NB: The order of the channels matters!\n" +
+ " Please refer to https://bioconda.github.io/\n" +
+ " The observed channel order is \n" +
+ " ${channels}\n" +
+ " but the following channel order is required:\n" +
+ " ${required_channels_in_order}\n" +
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
}
}
diff --git a/lib/WorkflowGwas.groovy b/lib/WorkflowGwas.groovy
index 1ca83a3..d7b07e3 100755
--- a/lib/WorkflowGwas.groovy
+++ b/lib/WorkflowGwas.groovy
@@ -2,6 +2,8 @@
// This file holds several functions specific to the workflow/gwas.nf in the nf-core/gwas pipeline
//
+import groovy.text.SimpleTemplateEngine
+
class WorkflowGwas {
//
@@ -42,6 +44,23 @@ class WorkflowGwas {
yaml_file_text += "data: |\n"
yaml_file_text += "${summary_section}"
return yaml_file_text
+ }
+
+ public static String methodsDescriptionText(run_workflow, mqc_methods_yaml) {
+ // Convert to a named map so can be used as with familar NXF ${workflow} variable syntax in the MultiQC YML file
+ def meta = [:]
+ meta.workflow = run_workflow.toMap()
+ meta["manifest_map"] = run_workflow.manifest.toMap()
+
+ meta["doi_text"] = meta.manifest_map.doi ? "(doi: ${meta.manifest_map.doi})" : ""
+ meta["nodoi_text"] = meta.manifest_map.doi ? "": "If available, make sure to update the text to include the Zenodo DOI of version of the pipeline used. "
+
+ def methods_text = mqc_methods_yaml.text
+
+ def engine = new SimpleTemplateEngine()
+ def description_html = engine.createTemplate(methods_text).make(meta)
+
+ return description_html
}//
// Exit pipeline if incorrect --genome key provided
//
diff --git a/main.nf b/main.nf
index ad562d4..4ed43a2 100644
--- a/main.nf
+++ b/main.nf
@@ -4,7 +4,8 @@
nf-core/gwas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/nf-core/gwas
-Website: https://nf-co.re/gwas
+
+ Website: https://nf-co.re/gwas
Slack : https://nfcore.slack.com/channels/gwas
----------------------------------------------------------------------------------------
*/
diff --git a/modules.json b/modules.json
index 9c0337b..0de2e5c 100644
--- a/modules.json
+++ b/modules.json
@@ -1,38 +1,24 @@
{
- "name": "nf-core/gwas",
- "homePage": "https://github.com/nf-core/gwas",
- "repos": {
- "nf-core/modules": {
- "git_url": "https://github.com/nf-core/modules.git",
- "modules": {
- "bcftools/merge": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "custom/dumpsoftwareversions": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "fastqc": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "multiqc": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "tabix/bgzip": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "tabix/tabix": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- },
- "vcftools": {
- "git_sha": "e745e167c1020928ef20ea1397b6b4d230681b4d",
- "branch": "master"
- }
- }
- }
-}
+ "name":"nf-core/gwas",
+ "homePage":"https://github.com/nf-core/gwas",
+ "repos":{
+ "https://github.com/nf-core/modules.git":{
+ "modules":{
+ "nf-core":{
+ "custom/dumpsoftwareversions":{
+ "branch":"master",
+ "git_sha":"5e34754d42cd2d5d248ca8673c0a53cdf5624905"
+ },
+ "fastqc":{
+ "branch":"master",
+ "git_sha":"5e34754d42cd2d5d248ca8673c0a53cdf5624905"
+ },
+ "multiqc":{
+ "branch":"master",
+ "git_sha":"5e34754d42cd2d5d248ca8673c0a53cdf5624905"
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf b/modules/nf-core/custom/dumpsoftwareversions/main.nf
similarity index 79%
rename from modules/nf-core/modules/custom/dumpsoftwareversions/main.nf
rename to modules/nf-core/custom/dumpsoftwareversions/main.nf
index 327d510..cebb6e0 100644
--- a/modules/nf-core/modules/custom/dumpsoftwareversions/main.nf
+++ b/modules/nf-core/custom/dumpsoftwareversions/main.nf
@@ -1,11 +1,11 @@
process CUSTOM_DUMPSOFTWAREVERSIONS {
- label 'process_low'
+ label 'process_single'
// Requires `pyyaml` which does not have a dedicated container but is in the MultiQC container
- conda (params.enable_conda ? "bioconda::multiqc=1.11" : null)
+ conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/multiqc:1.11--pyhdfd78af_0' :
- 'quay.io/biocontainers/multiqc:1.11--pyhdfd78af_0' }"
+ 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
+ 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
input:
path versions
diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/meta.yml b/modules/nf-core/custom/dumpsoftwareversions/meta.yml
similarity index 100%
rename from modules/nf-core/modules/custom/dumpsoftwareversions/meta.yml
rename to modules/nf-core/custom/dumpsoftwareversions/meta.yml
diff --git a/modules/nf-core/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
similarity index 100%
rename from modules/nf-core/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
rename to modules/nf-core/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py
diff --git a/modules/nf-core/modules/fastqc/main.nf b/modules/nf-core/fastqc/main.nf
similarity index 85%
rename from modules/nf-core/modules/fastqc/main.nf
rename to modules/nf-core/fastqc/main.nf
index ed6b8c5..0573036 100644
--- a/modules/nf-core/modules/fastqc/main.nf
+++ b/modules/nf-core/fastqc/main.nf
@@ -44,4 +44,16 @@ process FASTQC {
END_VERSIONS
"""
}
+
+ stub:
+ def prefix = task.ext.prefix ?: "${meta.id}"
+ """
+ touch ${prefix}.html
+ touch ${prefix}.zip
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ fastqc: \$( fastqc --version | sed -e "s/FastQC v//g" )
+ END_VERSIONS
+ """
}
diff --git a/modules/nf-core/modules/fastqc/meta.yml b/modules/nf-core/fastqc/meta.yml
similarity index 100%
rename from modules/nf-core/modules/fastqc/meta.yml
rename to modules/nf-core/fastqc/meta.yml
diff --git a/modules/nf-core/modules/multiqc/main.nf b/modules/nf-core/modules/multiqc/main.nf
deleted file mode 100644
index 1264aac..0000000
--- a/modules/nf-core/modules/multiqc/main.nf
+++ /dev/null
@@ -1,31 +0,0 @@
-process MULTIQC {
- label 'process_medium'
-
- conda (params.enable_conda ? 'bioconda::multiqc=1.12' : null)
- container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
- 'https://depot.galaxyproject.org/singularity/multiqc:1.12--pyhdfd78af_0' :
- 'quay.io/biocontainers/multiqc:1.12--pyhdfd78af_0' }"
-
- input:
- path multiqc_files
-
- output:
- path "*multiqc_report.html", emit: report
- path "*_data" , emit: data
- path "*_plots" , optional:true, emit: plots
- path "versions.yml" , emit: versions
-
- when:
- task.ext.when == null || task.ext.when
-
- script:
- def args = task.ext.args ?: ''
- """
- multiqc -f $args .
-
- cat <<-END_VERSIONS > versions.yml
- "${task.process}":
- multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
- END_VERSIONS
- """
-}
diff --git a/modules/nf-core/multiqc/main.nf b/modules/nf-core/multiqc/main.nf
new file mode 100644
index 0000000..a8159a5
--- /dev/null
+++ b/modules/nf-core/multiqc/main.nf
@@ -0,0 +1,53 @@
+process MULTIQC {
+ label 'process_single'
+
+ conda (params.enable_conda ? 'bioconda::multiqc=1.13' : null)
+ container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
+ 'https://depot.galaxyproject.org/singularity/multiqc:1.13--pyhdfd78af_0' :
+ 'quay.io/biocontainers/multiqc:1.13--pyhdfd78af_0' }"
+
+ input:
+ path multiqc_files, stageAs: "?/*"
+ path(multiqc_config)
+ path(extra_multiqc_config)
+ path(multiqc_logo)
+
+ output:
+ path "*multiqc_report.html", emit: report
+ path "*_data" , emit: data
+ path "*_plots" , optional:true, emit: plots
+ path "versions.yml" , emit: versions
+
+ when:
+ task.ext.when == null || task.ext.when
+
+ script:
+ def args = task.ext.args ?: ''
+ def config = multiqc_config ? "--config $multiqc_config" : ''
+ def extra_config = extra_multiqc_config ? "--config $extra_multiqc_config" : ''
+ """
+ multiqc \\
+ --force \\
+ $args \\
+ $config \\
+ $extra_config \\
+ .
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
+ END_VERSIONS
+ """
+
+ stub:
+ """
+ touch multiqc_data
+ touch multiqc_plots
+ touch multiqc_report.html
+
+ cat <<-END_VERSIONS > versions.yml
+ "${task.process}":
+ multiqc: \$( multiqc --version | sed -e "s/multiqc, version //g" )
+ END_VERSIONS
+ """
+}
diff --git a/modules/nf-core/modules/multiqc/meta.yml b/modules/nf-core/multiqc/meta.yml
similarity index 73%
rename from modules/nf-core/modules/multiqc/meta.yml
rename to modules/nf-core/multiqc/meta.yml
index 6fa891e..ebc29b2 100644
--- a/modules/nf-core/modules/multiqc/meta.yml
+++ b/modules/nf-core/multiqc/meta.yml
@@ -12,11 +12,25 @@ tools:
homepage: https://multiqc.info/
documentation: https://multiqc.info/docs/
licence: ["GPL-3.0-or-later"]
+
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}"
+
output:
- report:
type: file
@@ -38,3 +52,4 @@ authors:
- "@abhi18av"
- "@bunop"
- "@drpatelh"
+ - "@jfy133"
diff --git a/nextflow.config b/nextflow.config
index 89c4853..f974aee 100644
--- a/nextflow.config
+++ b/nextflow.config
@@ -76,7 +76,9 @@ params {
// MultiQC options
multiqc_config = null
multiqc_title = null
+ multiqc_logo = null
max_multiqc_email_size = '25.MB'
+ multiqc_methods_description = null
// Boilerplate options
outdir = null
@@ -86,6 +88,7 @@ params {
email_on_fail = null
plaintext_email = false
monochrome_logs = false
+ hook_url = null
help = false
validate_params = true
show_hidden_params = false
@@ -129,7 +132,6 @@ includeConfig 'conf/base.config'
// }
-
profiles {
debug { process.beforeScript = 'echo $HOSTNAME' }
conda {
@@ -280,6 +282,7 @@ manifest {
mainScript = 'main.nf'
nextflowVersion = '!>=21.10.3'
version = '1.0dev'
+ doi = ''
}
// Load modules.config for DSL2 module specific options
diff --git a/nextflow_schema.json b/nextflow_schema.json
index 6d84c91..2a03705 100644
--- a/nextflow_schema.json
+++ b/nextflow_schema.json
@@ -213,12 +213,30 @@
"fa_icon": "fas fa-palette",
"hidden": true
},
+ "hook_url": {
+ "type": "string",
+ "description": "Incoming hook URL for messaging service",
+ "fa_icon": "fas fa-people-group",
+ "help_text": "Incoming hook URL for messaging service. Currently, only MS Teams is supported.",
+ "hidden": true
+ },
"multiqc_config": {
"type": "string",
"description": "Custom config file to supply to MultiQC.",
"fa_icon": "fas fa-cog",
"hidden": true
},
+ "multiqc_logo": {
+ "type": "string",
+ "description": "Custom logo file to supply to MultiQC. File name must also be set in the MultiQC config file",
+ "fa_icon": "fas fa-image",
+ "hidden": true
+ },
+ "multiqc_methods_description": {
+ "type": "string",
+ "description": "Custom MultiQC yaml file containing HTML including a methods description.",
+ "fa_icon": "fas fa-cog"
+ },
"tracedir": {
"type": "string",
"description": "Directory to keep pipeline Nextflow logs and reports.",
diff --git a/workflows/gwas.nf b/workflows/gwas.nf
index 595e7d9..f6417a5 100644
--- a/workflows/gwas.nf
+++ b/workflows/gwas.nf
@@ -23,8 +23,10 @@ WorkflowGwas.initialise(params, log)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
-ch_multiqc_config = file("$projectDir/assets/multiqc_config.yml", checkIfExists: true)
-ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config) : Channel.empty()
+ch_multiqc_config = Channel.fromPath("$projectDir/assets/multiqc_config.yml", checkIfExists: true)
+ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath( params.multiqc_config, checkIfExists: true ) : Channel.empty()
+ch_multiqc_logo = params.multiqc_logo ? Channel.fromPath( params.multiqc_logo, checkIfExists: true ) : Channel.empty()
+ch_multiqc_custom_methods_description = params.multiqc_methods_description ? file(params.multiqc_methods_description, checkIfExists: true) : file("$projectDir/assets/methods_description_template.yml", checkIfExists: true)
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -47,9 +49,10 @@ include { QC_WF } from '../subworkflows/local/qc'
//
// MODULE: Installed directly from nf-core/modules
//
-// include { FASTQC } from '../modules/nf-core/modules/fastqc/main'
-// include { MULTIQC } from '../modules/nf-core/modules/multiqc/main'
-include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/modules/custom/dumpsoftwareversions/main'
+
+//include { FASTQC } from '../modules/nf-core/fastqc/main'
+//include { MULTIQC } from '../modules/nf-core/multiqc/main'
+include { CUSTOM_DUMPSOFTWAREVERSIONS } from '../modules/nf-core/custom/dumpsoftwareversions/main'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -106,15 +109,20 @@ workflow GWAS {
workflow_summary = WorkflowGwas.paramsSummaryMultiqc(workflow, summary_params)
ch_workflow_summary = Channel.value(workflow_summary)
+ methods_description = WorkflowGwas.methodsDescriptionText(workflow, ch_multiqc_custom_methods_description)
+ ch_methods_description = Channel.value(methods_description)
+
ch_multiqc_files = Channel.empty()
- ch_multiqc_files = ch_multiqc_files.mix(Channel.from(ch_multiqc_config))
- ch_multiqc_files = ch_multiqc_files.mix(ch_multiqc_custom_config.collect().ifEmpty([]))
ch_multiqc_files = ch_multiqc_files.mix(ch_workflow_summary.collectFile(name: 'workflow_summary_mqc.yaml'))
+ ch_multiqc_files = ch_multiqc_files.mix(ch_methods_description.collectFile(name: 'methods_description_mqc.yaml'))
ch_multiqc_files = ch_multiqc_files.mix(CUSTOM_DUMPSOFTWAREVERSIONS.out.mqc_yml.collect())
ch_multiqc_files = ch_multiqc_files.mix(FASTQC.out.zip.collect{it[1]}.ifEmpty([]))
MULTIQC (
- ch_multiqc_files.collect()
+ ch_multiqc_files.collect(),
+ ch_multiqc_config.collect().ifEmpty([]),
+ ch_multiqc_custom_config.collect().ifEmpty([]),
+ ch_multiqc_logo.collect().ifEmpty([])
)
multiqc_report = MULTIQC.out.report.toList()
ch_versions = ch_versions.mix(MULTIQC.out.versions)
@@ -132,6 +140,9 @@ workflow.onComplete {
NfcoreTemplate.email(workflow, params, summary_params, projectDir, log, multiqc_report)
}
NfcoreTemplate.summary(workflow, params, log)
+ if (params.hook_url) {
+ NfcoreTemplate.adaptivecard(workflow, params, summary_params, projectDir, log)
+ }
}
/*