Skip to content

Commit

Permalink
Merge branch 'release/1.0.17'
Browse files Browse the repository at this point in the history
  • Loading branch information
caaespin committed Aug 1, 2017
2 parents 24a35ce + 5742526 commit 35ef549
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 8 additions & 1 deletion Dockstore.cwl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ dct:creator:
requirements:
- class: DockerRequirement
dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16"
dockerPull: "quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17"
hints:
- class: ResourceRequirement
coresMin: 1
Expand Down Expand Up @@ -75,6 +76,12 @@ inputs:
inputBinding:
prefix: --workflow-type
launch_type:
type: string?
doc: "String that describes the launch type: tool or workflow"
inputBinding:
prefix: --launch-type
parent_uuids:
type: string
doc: "UUIDs for parent"
Expand Down
6 changes: 5 additions & 1 deletion DockstoreRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ def __init__(self):
parser.add_argument('--json-encoded', default='e30=', required=True)
parser.add_argument('--docker-uri', default='quay.io/wshands/fastqc:latest', required=True)
parser.add_argument('--dockstore-url', default='https://dockstore.org/containers/quay.io/wshands/fastqc', required=True)
parser.add_argument('--launch-type', default='tool', const='tool', nargs='?',
choices=['tool', 'workflow'], required=False,
help='run a workflow or tool (default: %(default)s)')
parser.add_argument('--workflow-type', default='sequence_upload_qc_report', required=True)
parser.add_argument('--parent-uuids', default='parent-UUID-dummy-value', required=True)
# FIXME: this append seems to crash on the mac but it would be the way to go if we want multiple parents
Expand Down Expand Up @@ -84,6 +87,7 @@ def __init__(self):
self.dockstore_url = args.dockstore_url
self.workflow_name = args.docker_uri.split(':')[0]
self.workflow_version = args.docker_uri.split(':')[1]
self.launch_type = args.launch_type
self.workflow_type = args.workflow_type
self.parent_uuids = args.parent_uuids
self.bundle_uuid = uuid4()
Expand Down Expand Up @@ -447,7 +451,7 @@ def run(self):
self.run_command(cmd, self.MAX_ATTEMPTS, self.DELAY_IN_SECONDS, True)

print("Calling Dockstore to launch a Dockstore tool")
cmd = "dockstore tool launch --debug --entry "+self.docker_uri+" --json "+transformed_json_path
cmd = "dockstore " + self.launch_type + " launch --debug --entry "+self.docker_uri+" --json "+transformed_json_path
self.run_command(cmd, self.MAX_PIPELINE_ATTEMPTS, self.DELAY_IN_SECONDS, cwd=self.tmp_dir)

t_end = time.time()
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ Most people, other than developers of this tool, will use the Dockstore CLI to i

# patch in /usr/local/lib/python2.7/dist-packages/cwltool
# make a tmpdir like /datastore
docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 .
docker build -t quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 .
# fill in your JSON from Dockstore.json template as Dockstore.my.json
mkdir /datastore; chown ubuntu:ubuntu /datastore/
# local execution
TMPDIR=/datastore dockstore tool launch --entry Dockstore.cwl --local-entry --json Dockstore.my.json
# as root in /datastore
TMPDIR=/datastore dockstore tool launch --entry ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl --local-entry --json ~ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.my.json
# execute published on dockstore (this is the way most people will use this tool!)
dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.16 --json Dockstore.my.json
dockstore tool launch --entry quay.io/ucsc_cgl/dockstore-tool-runner:1.0.17 --json Dockstore.my.json

# running you see it launch the cwltool command, you mind find this useful while debugging
cwltool --enable-dev --non-strict --enable-net --outdir /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/outputs/ --tmpdir-prefix /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/working/ /home/ubuntu/gitroot/BD2KGenomics/dcc-dockstore-tool-runner/Dockstore.cwl /datastore/./datastore/launcher-ff6b55b3-52e8-430c-9a70-1ff295332698/workflow_params.json
Expand Down

0 comments on commit 35ef549

Please sign in to comment.