WDL - 开发应用环境配置

工具插件

Vim WDL 插件

broadinstitute官方提供了在Vim环境下的WDL插件,提供基础的关键词、语法高亮等功能。其安装方式,可参考 https://github.com/broadinstitute/vim-wdl

VScode WDL 插件

VScode也提供了WDL语言的插件。用户可直接通过VScode插件管理进行安装。

WDL 语法校验工具

WOMtool 可以对WDL脚本进行语法校验,其网站为 https://cromwell.readthedocs.io/en/stable/WOMtool/

1
2
# 通过conda安装
conda install -c "bioconda/label/cf201901" womtool

CWL 转化 WDL

目前,除了WDL之外,也有相当一部分生物信息流程是以CWL语言编写的。用户可以采用dxCompiler将CWL脚本转化为WDL脚本。https://github.com/dnanexus/dxCompiler

调度引擎

cromwell

1
2
# 通过conda安装
conda install -c "bioconda/label/cf201901" cromwell

widdler

widdler GitHub
Widdler is a command-line tool for executing WDL workflows on Cromwell servers.
Features include:

  • Workflow execution: Execute a workflow on a specified Cromwell server.
  • Workflow restart: Restart a previously executed workflow.
  • Workflow queries: Get the status, metadata, or logs for a specific workflow.
  • Workflow result explanation: Get more detailed information on fails at the command line.
  • Workflow monitoring: Monitor a specific workflow or set of user-specific workflows to completion.
  • Workflow abortion: Abort a running workflow.
  • JSON validation: Validate a JSON input file against the WDL file intended for use.

一个demo示例

helloword.wdl

helloword.wdl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
task echo {
String out

command {
echo Hello World! > ${out}
}

output {
File outFile = "${out}"
}
}

workflow wf_echo {
call echo
output {
echo.outFile
}
}

执行操作

1
2
3
4
5
6
7
8
9
10
11
# 生成配置文件(json格式)
womtool inputs helloword.wdl > helloword.wdl.input.json

# 编辑配置文件
vi helloword.wdl.input.json
# {
# "wf_echo.echo.out": "Demo-Test"
# }

# 运行任务
cromwell run helloword.wdl -i helloword.wdl.input.json

-------------本文结束感谢您的阅读-------------