Thanks to visit codestin.com
Credit goes to github.com

Skip to content

NfcoreTemplate's email function requires multiqc_report #2272

@krokicki

Description

@krokicki

Description of the bug

The email function throws exceptions if a multiqc_report is not provided, although the function signature suggests that the parameter should be optional:

public static void email(workflow, params, summary_params, projectDir, log, multiqc_report=[]) {

For non-genomics pipelines such as microscopy, there is currently no multiqc report, so it would be nice for this parameter to be optional. Currently, if I call email like this:

NfcoreTemplate.email(workflow, params, summary_params, projectDir, log)

It produces this output:

WARN: Access to undefined parameter `max_multiqc_email_size` -- Initialise it to a default value eg. `params.max_multiqc_email_size = some_value`
ERROR ~ Failed to invoke `workflow.onComplete` event handler

 -- Check script './workflows/lightsheetrecon.nf' at line: 86 or see '.nextflow.log' file for more details

And this stack trace in the .nextflow.log file:

May-03 13:39:51.827 [main] ERROR nextflow.script.WorkflowMetadata - Failed to invoke `workflow.onComplete` event handler
java.lang.NullPointerException: Cannot invoke method toBytes() on null object
»»»»at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:91)
»»»»at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:44)
»»»»at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
»»»»at org.codehaus.groovy.runtime.callsite.NullCallSite.call(NullCallSite.java:34)
»»»»at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
»»»»at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
»»»»at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:130)
»»»»at NfcoreTemplate.email(NfcoreTemplate.groovy:132)
»»»»at NfcoreTemplate.email(NfcoreTemplate.groovy:57)
»»»»at NfcoreTemplate$email$5.call(Unknown Source)
»»»»at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
»»»»at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)

System information

  • nf-core-tools version 2.8

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions