Skip to content
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

NfcoreTemplate's email function requires multiqc_report #2272

Closed
krokicki opened this issue May 3, 2023 · 1 comment
Closed

NfcoreTemplate's email function requires multiqc_report #2272

krokicki opened this issue May 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@krokicki
Copy link
Contributor

krokicki commented May 3, 2023

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
@krokicki krokicki added the bug Something isn't working label May 3, 2023
@krokicki
Copy link
Contributor Author

Resolved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant