,
http://www.Sina.com/(工作流描述语言) http://www.Sina.com/(anexecutionenginethatcanrunwdlscripts )现在是
因为我在这里使用sublime text3,所以我要设置支持新wdl的高光。 基于包控制下载包控制包。 在sublime text中安装首选项软件包控制安装软件包- wdl syntax。
wdlbasestructure 3358 www.Sina.com/: workflow,task and call
工作流程位于顶层,在呼叫中运行任务。 tasks是在工作流模块之外定义的。 工作流myworkflowname { call task _ a call task _ b } task _ a { . } task task _ b { . } core task-level components 3333
task的核心成分:执行command,output明确表示哪个部分的指令构成输出。 task task _ a { command { . } output { . } add variables有两种不同级别的variables,一种存在于task中,另一种存在于整个工作流中。 变量也可以从一个任务传递到下一个任务。
-添加任务-级别可变
任务任务_ a { filereffileinstringidcommand } do _ stuffr=$ { ref } I=$ { in } o=$ { id }.ext } output { file out=' adding workflow-levelvariablesworkflowmyworkflowname { filemy _ reffilemy _ inputstringnamecalltask _ ion call task _ b { input : ref=my _ ref, in=task _ a.out } task task _ a { . } task task _ b { . } adding plumbing 3358 www.Sina.com/linearorsimplebranching switchbetweenalternatepathwaysanditerateoversetsofdata,eitherinseriesorinparallel.http://www.Sina
-线性通道
在呼叫中开始定义上一个结果
call stepb { input 3360 in=stepa.out } callstepc { input : in=stepb.out }多输入/多输出
callstepc { input : in1=stepb.out 1,in2=stepB.out2} Branch Merge
call stepb { input 3360 in=stepa.out } callstepc { input : in=stepb.out } callstepd { input 3360 in1=input,input
由于Parallelism是并行的,因此任务可以更快地进行,而不是按顺序进行。 我们使用基于wdl标准库的scatter生成可平行任务(Input,array列),并输出结果) (array也是)。 “Scatter”流程是explicit,“gather”流程不是implicit。 array [ file ] inputfilessactter (onefileininputfiles ) callstepa ) input : in=one file (call stepb ) input3360files
如果有复制路径任务,可以使用任务隔离来避免重复粘贴命令。 callstepaasfirstsample { input : in=first input } callstepaassecondsample { input 3360 in=secondinput } call stepb { input 3360
$ Java-jarwdltool.jarvalidatemyworkflow.wdl示例: errorifacallreferencesataskthatdoesn’t exist 3360
$ Java-jarwdltool.jarvalidatemyworkflow.wdl error : callreferencesataks (bad PS ) thatdoesn'texist ) line22,col 8)
- Generating the template JSON
可以使用wdl工具inputs函数。
Java-jarwdltool.jarinputsmyworkflow.wdlmyworkflow _ inputs.JSON的结果:
{ ' workflow name.taskname.variablename ' : ' variable type ' } customizingtheinputsfileforaparticularrun
请注意,variable type在最初得到的template中只是提醒变量的类型,在实际使用中将其重命名为相应的文件或名称。 但是,为了不返回脚本看到是哪个变量,也命名比较容易识别。 例如,{ ' myworkflowname.stepa.input _ file ' : ' file ' ' myworkflowname.stepa.sample _ name ' : ' string '
{ ' myworkflowname.stepa.input _ file ' : '~/path/to/input.bam ' ' myworkflowname.stepa.sample _ name '
使用Cromwell。 Cromwell是用开源Java编写的支持WDL的执行工具。 可以在三个平台上支持WDL的运行:本地计算机、本地服务器群集和云平台。 需要java 8
基本命令: Java-jar Cromwell.jaractionparametersrunningwdloncromwelllocallyjava-jar Cromwell.jarrunmyworkflow.wdl-inputing