嗨 请在下面找到一个 nf 脚本和一个配置文件。 我已经在两台计算机上运行它们。两台计算机都安装了 nextflow (v 22.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' }
}
最佳答案
问题是 Docker execution默认情况下不启用。当它被禁用时,Nextflow 只是尝试在容器外部执行进程。要启用 Docker 执行,请将以下行添加到您的 Nextflow 配置中:
docker.enabled = true
Nextflow 查找 configuration files在多个地方。检查两台机器是否使用同一组配置文件。例如,一台计算机可能已在其 $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
关于docker - Nextflow配置文件问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/73933649/