Isabel Haubro-Suppanz
06/19/2026, 8:27 AMERROR ~ Error executing process > 'FROMSEQ:PREPROCESS_BOSS:truncateFq (1)'
Caused by: Cannot invoke method values() on null object
This is confusing to me because the truncateFq process takes just one input (a fastq file) and uses cut to cut every line to a length of 400. The input fastq file now comes from a different process than before but I looked at the fastq file in question and it looks perfectly normal. I'll add the actual processes in a thread.Isabel Haubro-Suppanz
06/19/2026, 8:28 AMworkflow FROMSEQ{
main:
// Get genome with variants from benchmark vcf set
input_ref = Channel.of(params.link_ref)
input_reads = Channel.of(params.reads)
// Download ref, Might have to combine ref
ref_genome = getUnzipComb(input_ref)
// Download reads, Might have to gunzip reads
reads = getGunzipReads(input_reads)
// Preprocess genome for sequence simulation
preprocessed = PREPROCESS_BOSS(reads, ref_genome)
...
}
Essentially, I download a reference and reads and then feed them into my preprocessing workflow.Isabel Haubro-Suppanz
06/19/2026, 8:29 AMprocess getGunzipReads {
input:
val link
output:
path '*.fastq'
script:
"""
wget ${link}
gunzip *.gz
"""
}
Maybe not the most elegant, but the output looks as I would expect.Isabel Haubro-Suppanz
06/19/2026, 8:31 AMworkflow PREPROCESS_BOSS{
take:
aligned_fastq
ref
main:
// Prepare input for BRsim
// Truncate fq Step 1 of prepare input for BRsim
trunc_fq = truncateFq(aligned_fastq)
...
}Isabel Haubro-Suppanz
06/19/2026, 8:31 AM// Truncate fq Step 1 of prepare input for BRsim
process truncateFq {
input:
path aligned_fastq
output:
path "*_trunc.fq", emit:trunc_fq
path aligned_fastq, emit:full_fq
script:
"""
cut -c -${<http://params.mu|params.mu>} ${aligned_fastq} > ${aligned_fastq.getSimpleName()}_trunc.fq
"""
}Isabel Haubro-Suppanz
06/19/2026, 8:32 AMNiklas Schandry
06/19/2026, 9:24 AM${<http://params.mu|params.mu>} is actually allowed in a script block, at least in nf-core modules I think params need to be converted into an input.
Does your truncateFq receive a correct input, i..e have you dumped the input channel and checked if it is ok?Isabel Haubro-Suppanz
06/19/2026, 9:30 AMtruncateFq and see if the next process (a mapping step) that just used that read fastq file would run successfully and that finished without complaints, so my understanding that the fastq file is valid seems supported. This makes it even more important to check whether the right file is fed to truncateFq . Thanks so much!Isabel Haubro-Suppanz
06/19/2026, 9:36 AM.view() on the channel that is fed into truncateFq and it is the correct file I would expect (ERR3152366.fastq). If I use head on that file I get output that looks like a fastq file.Niklas Schandry
06/19/2026, 9:37 AM{<http://params.mu|params.mu>} for testing?Isabel Haubro-Suppanz
06/19/2026, 9:37 AMNiklas Schandry
06/19/2026, 9:38 AMmuIsabel Haubro-Suppanz
06/19/2026, 9:44 AMworkflow PREPROCESS_BOSS{
take:
aligned_fastq
ref
main:
// Prepare input for BRsim
// Truncate fq Step 1 of prepare input for BRsim
mu_ch = channel.of(<http://params.mu|params.mu>)
mu_ch.view()
trunc_fq = truncateFq(aligned_fastq, mu_ch)
and truncateFq to this:
process truncateFq {
input:
path aligned_fastq
val mu
output:
path "*_trunc.fq", emit:trunc_fq
path aligned_fastq, emit:full_fq
script:
"""
cut -c -${mu} ${aligned_fastq} > ${aligned_fastq.getSimpleName()}_trunc.fq
"""
}
mu_ch.view() returns the expected 400, so the parameter is defined, but I still get an error when I run it, this time a longer one though.Niklas Schandry
06/19/2026, 9:45 AMIsabel Haubro-Suppanz
06/19/2026, 9:45 AMException in thread "Task submitter" java.lang.NullPointerException: Cannot invoke method values() on null object
at org.codehaus.groovy.runtime.NullObject.invokeMethod(NullObject.java:113)
at org.codehaus.groovy.vmplugin.v8.IndyGuardsFiltersAndSignatures.invokeGroovyObjectInvoker(IndyGuardsFiltersAndSignatures.java:151)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at Script27A0DD985F3BE2B20E09F5475A27A919$_run_closure1$_closure33$_closure96.doCall(Script27A0DD985F3BE2B20E09F5475A27A919:236)
at Script27A0DD985F3BE2B20E09F5475A27A919$_run_closure1$_closure33$_closure96.doCall(Script27A0DD985F3BE2B20E09F5475A27A919)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:280)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
at groovy.lang.Closure.call(Closure.java:433)
at groovy.lang.Closure.call(Closure.java:412)
at nextflow.processor.LazyMap.resolveImpl(TaskConfig.groovy:698)
at nextflow.processor.LazyMap.resolveImpl(TaskConfig.groovy)
at nextflow.processor.LazyMap.resolve(TaskConfig.groovy:659)
at nextflow.processor.LazyMap.getValue(TaskConfig.groovy:726)
at nextflow.processor.LazyMap.get(TaskConfig.groovy:721)
at nextflow.processor.TaskConfig.get(TaskConfig.groovy:153)
at nextflow.processor.TaskConfig.getMemory0(TaskConfig.groovy:249)
at nextflow.processor.TaskConfig.getMemory(TaskConfig.groovy:266)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:321)
at nextflow.processor.TaskHandler.getTraceRecord(TaskHandler.groovy:218)
at nextflow.executor.GridTaskHandler.getTraceRecord(GridTaskHandler.groovy:533)
at nextflow.processor.TaskPollingMonitor.handleException(TaskPollingMonitor.groovy:630)
at nextflow.processor.TaskPollingMonitor.submitPendingTasks(TaskPollingMonitor.groovy:612)
at nextflow.processor.TaskPollingMonitor.submitLoop(TaskPollingMonitor.groovy:420)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:343)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:328)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1333)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethodClosure(MetaClassImpl.java:1017)
at groovy.lang.MetaClassImpl.doInvokeMethod(MetaClassImpl.java:1207)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1088)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1007)
ERROR ~ Error executing process > 'FROMSEQ:PREPROCESS_BOSS:truncateFq (1)'
Caused by:
Cannot invoke method values() on null object
-- Check '.nextflow.log' file for details
I don't really understand what this meansIsabel Haubro-Suppanz
06/19/2026, 9:46 AMNiklas Schandry
06/19/2026, 9:48 AMNiklas Schandry
06/19/2026, 9:49 AMIsabel Haubro-Suppanz
06/19/2026, 9:50 AMIsabel Haubro-Suppanz
06/19/2026, 10:21 AM