1. CWL을 cromwell로 실행해 보기
작업 흐름 엔진을 이용하여 cwl 실행
cromwell의 실행 환경에 대한 참조0. CWL을 cromwell에서 실행해 보십시오.
CWL 사용First Example
cwl 샘플 만들기
다음 두 파일 만들기
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool
baseCommand: echo
inputs:
message:
type: string
inputBinding:
position: 1
outputs: []
echo-job.ymlmessage: Hello world!
cromwell에서 cwl 실행하기
cromwell에서 상기 두 파일을 지정하고 실행합니다
java -jar cromwell.jar run --type cwl --inputs YAML形式の入力ファイル ワークフローのCWL
# java -jar cromwell.jar run --type cwl --inputs echo-job.yml 1st-tool.cwl
[2018-05-30 07:30:33,70] [info] Running with database db.url = jdbc:hsqldb:mem:e2bcacde-b3d0-4af2-8e74-9f2690991ab8;shutdown=false;hsqldb.tx=mvcc
[2018-05-30 07:30:38,67] [info] Running migration RenameWorkflowOptionsInMetadata with a read batch size of 100000 and a write batch size of 100000
[2018-05-30 07:30:38,69] [info] [RenameWorkflowOptionsInMetadata] 100%
[2018-05-30 07:30:38,78] [info] Running with database db.url = jdbc:hsqldb:mem:0113123e-dba9-4387-a894-4214f36387f4;shutdown=false;hsqldb.tx=mvcc
[2018-05-30 07:30:39,32] [info] Slf4jLogger started
[2018-05-30 07:30:39,37] [info] Pre Processing Workflow...
[2018-05-30 07:30:39,58] [info] Pre-Processing /git/1st-tool.cwl
[2018-05-30 07:30:39,65] [info] Pre Processing Inputs...
Exception in thread "main" cromwell.CromwellEntryPoint$$anon$1: ERROR: Unable to submit workflow to Cromwell::
running cwltool on file /git/1st-tool.cwl failed with Cannot run program "cwltool" (in directory "/git"): error=2, No such file or directory
...
미리 처리할 수 있는 메시지를 표시하지만, cwltool이 없어서 실행할 수 없습니다# java -jar cromwell.jar --version
cromwell 32
적어도 이 버전의cromwell은 내부에서 cwltool을 이용하여 cwl을 실행하는 것을 알 수 있다cwltool 설치
cromwell 엔진만으로는 cwl을 실행할 수 없기 때문에 cwltool을 설치합니다
cwltool은python 프로그램이기 때문에python3(또는python2)도 미리 설치해야 한다
설치 절차는 다음과 같다.
# apt-get -y install python3
# apt-get -y install python3-pip
# apt-get -y install git
# git clone https://github.com/common-workflow-language/cwltool.git
# cd cwltool
# pip3 install .
# cd ../
cwltool 버전 확인# cwltool --version
/usr/local/bin/cwltool 1.0.20180528123027
cwltool 동작 확인# cwltool 1st-tool.cwl echo-job.yml
/usr/local/bin/cwltool 1.0.20180528123027
Resolved '1st-tool.cwl' to 'file:///git/1st-tool.cwl'
[job 1st-tool.cwl] /tmp/tmp5qptk9al$ echo \
'Hello world!'
Hello world!
[job 1st-tool.cwl] completed success
{}
Final process status is success
cwltool에서 샘플을 실행할 수 있음을 확인했기 때문에 다음으로cromwell에서 실행합니다# java -jar cromwell.jar run --type cwl --inputs echo-job.yml 1st-tool.cwl
[2018-05-30 07:54:48,81] [info] Running with database db.url = jdbc:hsqldb:mem:601a446a-7221-4921-aa20-33b74753bedb;shutdown=false;hsqldb.tx=mvcc
[2018-05-30 07:54:53,79] [info] Running migration RenameWorkflowOptionsInMetadata with a read batch size of 100000 and a write batch size of 100000
...
[2018-05-30 07:54:56,30] [info] Workflow heartbeat configuration:
{
"cromwellId" : "cromid-b4de34d",
"heartbeatInterval" : "2 minutes",
"ttl" : "10 minutes",
"writeBatchSize" : 10000,
"writeThreshold" : 10000
}
[2018-05-30 07:54:56,39] [info] Metadata summary refreshing every 2 seconds.
...
[2018-05-30 07:55:00,53] [info] BackgroundConfigAsyncJobExecutionActor [2fdd1b221st-tool.cwl:NA:1]: 'echo' 'Hello world!'
[2018-05-30 07:55:00,59] [info] BackgroundConfigAsyncJobExecutionActor [2fdd1b221st-tool.cwl:NA:1]: executing: /bin/bash /git/cromwell-executions/1st-tool.cwl/2fdd1b22-4f31-47cf-92f1-823560755450/call-1st-tool.cwl/execution/script
[2018-05-30 07:55:01,45] [info] BackgroundConfigAsyncJobExecutionActor [2fdd1b221st-tool.cwl:NA:1]: job id: 7914
[2018-05-30 07:55:01,45] [info] BackgroundConfigAsyncJobExecutionActor [2fdd1b221st-tool.cwl:NA:1]: Status change from - to Done
[2018-05-30 07:55:01,68] [info] WorkflowExecutionActor-2fdd1b22-4f31-47cf-92f1-823560755450 [2fdd1b22]: Workflow 1st-tool.cwl complete. Final Outputs:
{
}
[2018-05-30 07:55:01,96] [info] WorkflowManagerActor WorkflowActor-2fdd1b22-4f31-47cf-92f1-823560755450 is in a terminal state: WorkflowSucceededState
[2018-05-30 07:55:08,89] [info] SingleWorkflowRunnerActor workflow finished with status 'Succeeded'.
{
"outputs": {
},
"id": "2fdd1b22-4f31-47cf-92f1-823560755450"
}
[2018-05-30 07:55:11,53] [info] Workflow polling stopped
...
[2018-05-30 07:55:11,69] [info] Shutdown finished.
cromwell과 cwltool을 이용하여 cwl의 실행을 확인했습니다이번엔 여기까지
Reference
이 문제에 관하여(1. CWL을 cromwell로 실행해 보기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/percipere/items/9a9c694cc7ef9fd4a67a텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념 (Collection and Share based on the CC Protocol.)