基因容器 GCS
基因容器 GCS
- 最新动态
- 产品介绍
- 快速入门
- 用户指南
- Cromwell引擎使用指南
- 最佳实践
- 流程语法参考
- Python SDK参考
- API参考
-
CLI参考
- 命令总览
- 安装命令行工具
- 示例:使用命令行执行简单脚本
-
gcs 命令详情
- gcs version
- gcs config add
- gcs config list
- gcs get kubectl
- gcs get enviroment
- gcs set env
- gcs get sfs
- gcs set sfs
- gcs get obscli
- gcs obs upload
- gcs get workflow
- gcs create workflow
- gcs del workflow
- gcs update workflow
- gcs sub workflow
- gcs get execution
- gcs create execution
- gcs del execution
- gcs set execution
- gcs sub job
- gcs sub repjob
- gcs get tool
- gcs sub wdl
- gcs get wdl
- gcs set wdl
- get get fr
- config.ini配置说明
- 常见问题
- 视频帮助
- 文档下载
- 通用参考
本文导读
展开导读
链接复制成功!
复杂依赖任务(DAG)
如果有四个任务,a/b/c/d 我们希望首先执行 任务 a,然后执行 b/c,b/c 同时完成后,最后执行 d,如下图所示:
为了实现这个目标,需要引入 depends 字段。以任务 d为例,完成任务 d 需要首先完成任务 b/c,则depends 字段为:
depends: - target: b type: whole - target: c type: whole
完整代码如下:
version: genecontainer_0_1 inputs: memory: default: 1g type: string cpu: default: 0.5c type: string tool: default: bwa:0.7.12 type: string shell: default: sh type: string workflow: a: tool: bwa:0.7.12 type: GCS.Job resources: memory: 1g cpu: 0.5c commands: - echo "A" b: tool: bwa:0.7.12 type: GCS.Job resources: memory: 1g cpu: 0.5c commands: - echo "B" depends: - target: a type: whole c: tool: bwa:0.7.12 type: GCS.Job resources: memory: 1g cpu: 0.5c commands: - echo "C" depends: - target: a type: whole d: tool: bwa:0.7.12 type: GCS.Job resources: memory: 1g cpu: 0.5c commands: - echo "D" depends: - target: b type: whole - target: c type: whole volumes: sample-data: mount_path: /obs mount_from: pvc: ${GCS_DATA_PVC} temp-data: mount_path: /sfs mount_from: pvc: ${GCS_SFS_PVC} ref-data: mount_path: /ref mount_from: pvc: ${GCS_REF_PVC}
父主题: 流程语法示例