
嗨,请在下面找到一个nf脚本和一个配置文件。我已经在两台电脑上运行过了。这两台计算机都安装了nextflow (v22.04.5)和docker。但是,一台计算机显示错误消息。请看所附的截图。我检查了日志文件,它只有一个“命令未找到”。我想知道你能不能指出这台电脑缺了什么。谢谢。
nextflow脚本
#!/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
"""
}配置文件
process {
withName:fastqc { container = 'staphb/fastqc:latest' }
}发布于 2022-10-03 11:25:22
问题是默认情况下没有启用码头执行。禁用Nextflow时,Nextflow只是尝试在容器之外执行进程。要启用Docker执行,请将以下行添加到Nextflow配置中:
docker.enabled = trueNextflow在多个地方查找配置文件。检查两台机器是否使用同一组配置文件。例如,一台计算机可能已经在其$HOME/.nextflow/config中设置了上述内容,但该文件可能不存在于另一台计算机上。
测试:
$ touch {A,B,C}.fastq
$ cat nextflow.config
docker.enabled = true
process {
withName: 'fastqc' {
container = 'staphb/fastqc:latest'
}
}结果:
$ nextflow run main.nf -dsl1
N E X T F L O W ~ version 22.04.4
Launching `main.nf` [jolly_brown] DSL1 - revision: 2c6f171a28
executor > local (3)
[97/7b5758] process > fastqc (B) [100%] 3 of 3 ✔
Completed at: 03-Oct-2022 21:08:43
Duration : 2m 50s
CPU hours : 0.1
Succeeded : 3发布于 2022-10-03 23:51:09
以下是故障排除的总结:
Nextflow错误:找不到命令.
是什么导致了这个错误?
错误指示nf脚本无法读取nextflow.config文件,尽管配置文件位于当前目录(预期路径之一)。
解决方案是什么?
process {
withName:fastqc {
container = 'staphb/fastqc:latest'
}
}
docker {
enabled = true
temp = 'auto'
}Nextflow_config_issue_resolved

https://stackoverflow.com/questions/73933649
复制相似问题