云服务器内容精选

  • 生成G CS 流程示例 该命令将会生成以下模板,并提交基因容器语法解析器: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 version: genecontainer_0_1 inputs: memory: default: 1g type: string cpu: default: 1c type: string tool: default: bwa:0.7.12 type: string job-script: default: bwa_help.sh type: string jobid: default: bwa-help-2018-0830-171114-00d34 type: string shell: default: sh type: string workflow: bwa-help-2018-0830-171114-00d34: tool: bwa:0.7.12 type: GCS.Job resources: memory: ${memory} cpu: ${cpu} commands: - sh /obs/gcscli/bwa-help-2018-0830-171114-00d34/bwa_help.sh volumes: sample-data: mount_path: /obs mount_from: pvc: ${BCE_DATA_PVC} temp-data: mount_path: /sfs mount_from: pvc: ${BCE_SFS_PVC} ref-data: mount_path: /ref mount_from: pvc: ${BCE_REF_PVC} outputs: bwa-help-2018-0830-171114-00d34: path: - /obs/output/bwa-help-2018-0830-171114-00d34
  • 复杂依赖任务(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_1inputs: memory: default: 1g type: string cpu: default: 0.5c type: string tool: default: bwa:0.7.12 type: string shell: default: sh type: stringworkflow: 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: wholevolumes: 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} 父主题: 流程语法示例