Hi
Please find below a nf script and a config file.
I have run them on two computers. Both computers have nextflow (v 22.04.5) and docker installed. However, one computer shows an error message. Please see the screenshot attached. I checked the log file, and it has just one “command not found”.
I was wondering if you could point out what is missing in this computer. Thanks.
nextflow script
#!/usr/bin/env nextflow
//data_location
params.outdir = './results'
params.in = "$PWD/*.fastq"
datasetA = Channel
.fromPath(params.in)
.map { file -> tuple(file.baseName, file) }
// fastqc
process fastqc {
tag "${datasetIDA}"
publishDir "${params.outdir}", mode:'copy'
input:
set datasetIDA, file(x) from datasetA
output:
file ("${x.baseName}_fastqc.html") into fastqc_ch
script:
"""
fastqc -Xmx20g $x > ${x.baseName}_fastqc.html
"""
}
config file
process {
withName:fastqc { container = 'staphb/fastqc:latest' }
}
2
Answers
Here is the summary of the troubleshooting:
Nextflow error: cannot find the command.
What might cause this error?
The error indicates that the nf script can’t read the nextflow.config file although the config file is in the current directory (one of the expected paths).
What was the solution?
Nextflow_config_issue_resolved
The problem is that Docker execution is not enabled by default. When it’s disabled, Nextflow just tries to execute the process outside of the container. To enable Docker execution, add the following line to your Nextflow config:
Nextflow looks for configuration files in multiple places. Check to see if both machines are using the same set of configuration files. For example, one machine may have already set the above in its
$HOME/.nextflow/config
but this file might not exist on the other machine.Test:
Results: