I wanted to report an alleged bug I found when I c...
# cutandrun
m
I wanted to report an alleged bug I found when I came back to run the pipeline after few months not using it. I have been getting this error, no matter what set of option I used (even only declaring genome input and output) , using both both v3.2.1 and v3.2.2: "ERROR ~ Cannot invoke method optional() on null object" Check script '/root/.nextflow/assets/nf-core/cutandrun/modules/local/for_patch/trimgalore/main.nf' at line: 18 or see '.nextflow.log' file for more details This is the file referenced. https://github.com/nf-core/cutandrun/blob/3.2.1/modules/local/for_patch/trimgalore/main.nf I managed to overpass the error by editing lines 18 and 19 in my local files from :
tuple val(meta), path("*.html"), emit: html optional true
tuple val(meta), path("*.zip") , emit: zip optional true
to
tuple val(meta), path("*.html"), emit: html ,optional: true
tuple val(meta), path("*.zip") , emit: zip, optional: true
Just wanted to double check the issue ( or report the bug if that is the case).
👍 2
g
I was also getting this error while testing my Nextflow setup (I'm brand new to all this, so just installed Nextflow and Docker yesterday). These edits fixed it for me, thanks for sharing!
m
Im always here crying for help, so knowing I got to help someone makes me soooo happy 😄. Thanks!
❤️ 2
t
I have the same issue, I found that it is related to the latest nextflow update. This nextflow version works well> nextflow version 24.10.0.5928 maybe it has to do with the config file?
Copy code
process {
    WithLabel:process_high_memory {
        memory = { 100.GB * task.attempt }
    }
  resourceLimits = [
    cpus: 24,
    memory: 300.GB
  ]
}

// Set bash options
 process.shell = [
     "bash",
     "-C",         // No clobber - prevent output redirection from overwriting files.
     "-e",         // Exit if a tool returns a non-zero status/exit code
     "-u",         // Treat unset variables and parameters as an error
     "-o",         // Returns the status of the last command to exit..
     "pipefail"    //   ..with a non-zero status or zero if all successfully execute
 ]

process {
    shell = 'bash -ueo pipefail'
    executor = "slurm"
    queue = "smp"
    maxRetries     = 3
    clusterOptions = "--account=ag"
    // Get user environment and assign account
    //cache          = "lenient"
    //afterScript    = "sleep 60"
    stageInMode    = "symlink"
    stageOutMode   = "copy"
    scratch        = '/scratch/tmp/'
    afterScript    = "sleep 60"
}

executor {
    name            = "slurm"
    queueSize       = 200
    submitRateLimit = "10/1sec"
    exitReadTimeout = "30 min"
    jobName         = {
        task.name
            .replace(
                "[",
                "("
            )
            .replace(
                "]",
                ")"
            )
            .replace(
                " ",
                "_"
            )
    }
}
❤️ 1
g
@Abhishek Thakkar this looks like the same error message you're getting
❤️ 1