diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index b2f0bb9..7133ba1 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -79,6 +79,8 @@ If you wish to contribute a new step, please use the following coding standards: 6. Add sanity checks and validation for all relevant parameters. 7. Perform local tests to validate that the new code works as expected. 8. If applicable, add a new test command in `.github/workflow/ci.yml`. +9. Update MultiQC config `assets/multiqc_config.yml` so relevant suffixes, file name clean up and module plots are in the appropriate order. If applicable, add a [MultiQC](https://https://multiqc.info/) module. +10. Add a description of the output files and if relevant any appropriate images from the MultiQC report to `docs/output.md`. ### Default values diff --git a/assets/sendmail_template.txt b/assets/sendmail_template.txt index 36eca7f..76269b9 100644 --- a/assets/sendmail_template.txt +++ b/assets/sendmail_template.txt @@ -26,6 +26,28 @@ Content-Disposition: inline; filename="nf-core-bamtofastq_logo_light.png" join( '\n' ) %> <% +if (mqcFile){ +def mqcFileObj = new File("$mqcFile") +if (mqcFileObj.length() < mqcMaxSize){ +out << """ +--nfcoremimeboundary +Content-Type: text/html; name=\"multiqc_report\" +Content-Transfer-Encoding: base64 +Content-ID: +Content-Disposition: attachment; filename=\"${mqcFileObj.getName()}\" + +${mqcFileObj. + bytes. + encodeBase64(). + toString(). + tokenize( '\n' )*. + toList()*. + collate( 76 )*. + collect { it.join() }. + flatten(). + join( '\n' )} +""" +}} %> --nfcoremimeboundary-- diff --git a/nextflow.config b/nextflow.config index de37151..c5e25f1 100644 --- a/nextflow.config +++ b/nextflow.config @@ -24,6 +24,13 @@ params { igenomes_base = 's3://ngi-igenomes/igenomes/' igenomes_ignore = false + // 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 publish_dir_mode = 'copy' diff --git a/nextflow_schema.json b/nextflow_schema.json index 7fab152..6065ed9 100644 --- a/nextflow_schema.json +++ b/nextflow_schema.json @@ -205,6 +205,14 @@ "fa_icon": "fas fa-remove-format", "hidden": true }, + "max_multiqc_email_size": { + "type": "string", + "description": "File size limit when attaching MultiQC reports to summary emails.", + "pattern": "^\\d+(\\.\\d+)?\\.?\\s*(K|M|G|T)?B$", + "default": "25.MB", + "fa_icon": "fas fa-file-upload", + "hidden": true + }, "monochrome_logs": { "type": "boolean", "description": "Do not use coloured log outputs.",