我试图在nextflow.config
管道执行期间访问文件中的变量。我想image_standard
作为字符串提供run.nf
,我想eu.gcr.io/proj_name/image1:latest
作为输出接收。我想出了一种.config
在 nextflow 脚本中获取文件内容的方法,但我不知道如何访问这个特定的属性。
这是我的nextflow.config
文件:
process {
withLabel: image_standard {
container = "eu.gcr.io/proj_name/image1:latest"
}
withLabel: image_deluxe {
container = "eu.gcr.io/proj_name/image2:latest"
}
}
这run.nf
x = workflow.configFiles[0]
Properties properties = new Properties()
File propertiesFile = new File("${x}")
propertiesFile.withInputStream {
properties.load(it)
}
log.info "${properties.process}"
仅打印该行:
{