CWL User Guide 11: Advanced Inputs
Common Workflow Language User Guide: Advanced Inputs
今回は入力パラメータについて、高度な設定ができることが書かれています
この回にでてくる主なキーワード
- record
今回は、これまでとちがい、3ケースためしています。
- 1つ目は、エラーになるケース
- 2つ目は、エラーにならないケース、排他的な指定
- 3つ目は、エラーにならないケース、2つ目の少し違う形のもの
CWLファイル、record.cwl
record.cwl
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
inputs:
dependent_parameters:
type:
type: record
name: dependent_parameters
fields:
itemA:
type: string
inputBinding:
prefix: -A
itemB:
type: string
inputBinding:
prefix: -B
exclusive_parameters:
type:
- type: record
name: itemC
fields:
itemC:
type: string
inputBinding:
prefix: -C
- type: record
name: itemD
fields:
itemD:
type: string
inputBinding:
prefix: -D
outputs: []
baseCommand: echo
パラメータファイル1,record-job1.yml
record-job1.yml
dependent_parameters:
itemA: one
exclusive_parameters:
itemC: three
実行
実行方法
cwltool record.cwl record-job1.yml
実行結果1
$ cwltool record.cwl record-job2.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'record.cwl' to 'file:///home/vagrant/cwl_user_guide_work/11-records/record.cwl'
record-job2.yml:6:3: invalid field `itemD`, expected one of: 'itemC'
[job record.cwl] /tmp/tmpxn1Gb8$ echo \
-A \
one \
-B \
two \
-C \
three
-A one -B two -C three
[job record.cwl] completed success
{}
Final process status is success
パラメータファイル2
record-job2.yml
dependent_parameters:
itemA: one
itemB: two
exclusive_parameters:
itemC: three
itemD: four
実行方法2
cwltool record.cwl record-job2.yml
実行結果2
$ cwltool record.cwl record-job2.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'record.cwl' to 'file:///home/vagrant/cwl_user_guide_work/11-records/record.cwl'
record-job2.yml:6:3: invalid field `itemD`, expected one of: 'itemC'
[job record.cwl] /tmp/tmpxn1Gb8$ echo \
-A \
one \
-B \
two \
-C \
three
-A one -B two -C three
[job record.cwl] completed success
{}
Final process status is success
パラメータファイル3
record-job3.yml
dependent_parameters:
itemA: one
itemB: two
exclusive_parameters:
itemD: four
実行方法3
cwltool record.cwl record-job3.yml
実行結果3
$ cwltool record.cwl record-job3.yml
/usr/local/bin/cwltool 1.0.20171107133715
Resolved 'record.cwl' to 'file:///home/vagrant/cwl_user_guide_work/11-records/record.cwl'
[job record.cwl] /tmp/tmp5enbk2$ echo \
-A \
one \
-B \
two \
-D \
four
-A one -B two -D four
[job record.cwl] completed success
{}
Final process status is success
今回使ったファイル
cwl_user_guide_work/11-records at master · manabuishii/cwl_user_guide_work