Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
moved to CWL 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubuntu committed Aug 24, 2016
1 parent c8d7734 commit 7e40d1b
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 38 deletions.
93 changes: 55 additions & 38 deletions Dockstore.cwl
Original file line number Diff line number Diff line change
@@ -1,60 +1,77 @@
#!/usr/bin/env cwl-runner

class: CommandLineTool
id: "BAMStats"
label: "BAMStats tool"
cwlVersion: cwl:draft-3
description: |
![build_status](https://quay.io/repository/briandoconnor/dockstore-tool-bamstats/status)
A Docker container for the BAMStats command. See the [BAMStats](http://bamstats.sourceforge.net/) website for more information.
```
Usage:
# fetch CWL
$> dockstore tool cwl --entry quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7 > Dockstore.cwl
# make a runtime JSON template and edit it (or use the content of sample_configs.json in this git repo)
$> dockstore tool convert cwl2json --cwl Dockstore.cwl > Dockstore.json
# run it locally with the Dockstore CLI
$> dockstore tool launch --entry quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7 \
--json Dockstore.json
```
id: BAMStats
label: BAMStats tool
cwlVersion: v1.0

$namespaces:
dct: http://purl.org/dc/terms/
foaf: http://xmlns.com/foaf/0.1/
doap: http://usefulinc.com/ns/doap#
adms: http://www.w3.org/ns/adms#
dcat: http://www.w3.org/ns/dcat#

$schemas:
- http://dublincore.org/2012/06/14/dcterms.rdf
- http://xmlns.com/foaf/spec/20140114.rdf
- http://usefulinc.com/ns/doap#
- http://www.w3.org/ns/adms#
- http://www.w3.org/ns/dcat.rdf

doc: |
![build_status](https://quay.io/repository/briandoconnor/dockstore-tool-bamstats/status)
A Docker container for the BAMStats command. See the [BAMStats](http://bamstats.sourceforge.net/) website for more information.
```
Usage:
# fetch CWL
$> dockstore tool cwl --entry quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7 > Dockstore.cwl
# make a runtime JSON template and edit it (or use the content of sample_configs.json in this git repo)
$> dockstore tool convert cwl2json --cwl Dockstore.cwl > Dockstore.json
# run it locally with the Dockstore CLI
$> dockstore tool launch --entry quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7 \
--json Dockstore.json
```

dct:creator:
"@id": "http://orcid.org/0000-0002-7681-6415"
'@id': http://orcid.org/0000-0002-7681-6415
foaf:name: Brian O'Connor
foaf:mbox: "mailto:briandoconnor@gmail.com"
foaf:mbox: mailto:briandoconnor@gmail.com
requirements:
- class: DockerRequirement
dockerPull: "quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7"
- class: DockerRequirement
dockerPull: quay.io/briandoconnor/dockstore-tool-bamstats:1.25-7
- class: InlineJavascriptRequirement
hints:
- class: ResourceRequirement
coresMin: 1
ramMin: 4092
outdirMin: 512000
description: "the process requires at least 4G of RAM"
- class: ResourceRequirement
coresMin: 1
ramMin: 4092
outdirMin: 512000
description: the process requires at least 4G of RAM
inputs:
- id: "#mem_gb"
bam_input:
type: File
format: http://edamontology.org/format_2572
inputBinding:
position: 2
doc: The BAM file used as input, it must be sorted.
mem_gb:
type: int
default: 4
description: "The memory, in GB, for the reporting tool"
inputBinding:
position: 1
- id: "#bam_input"
type: File
description: "The BAM file used as input, it must be sorted."
format: "http://edamontology.org/format_2572"
inputBinding:
position: 2
doc: The memory, in GB, for the reporting tool
outputs:
- id: "#bamstats_report"
bamstats_report:
type: File
format: "http://edamontology.org/format_3615"
format: http://edamontology.org/format_3615
outputBinding:
glob: bamstats_report.zip
description: "A zip file that contains the HTML report and various graphics."
doc: A zip file that contains the HTML report and various graphics.
baseCommand: [bash, /usr/local/bin/bamstats]
baseCommand: ["bash", "/usr/local/bin/bamstats"]
2 changes: 2 additions & 0 deletions sample_configs.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"bam_input": {
"class": "File",
"format": "http://edamontology.org/format_2572",
"path": "https://s3.amazonaws.com/oconnor-test-bucket/sample-data/NA12878.chrom20.ILLUMINA.bwa.CEU.low_coverage.20121211.bam"
},
"bamstats_report": {
"class": "File",
"format": "http://edamontology.org/format_3615",
"path": "/tmp/bamstats_report.zip"
}
}
2 changes: 2 additions & 0 deletions sample_configs.local.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"bam_input": {
"class": "File",
"format": "http://edamontology.org/format_2572",
"path": "/tmp/NA12878.chrom20.ILLUMINA.bwa.CEU.low_coverage.20121211.bam"
},
"bamstats_report": {
"class": "File",
"format": "http://edamontology.org/format_3615",
"path": "/tmp/bamstats_report.zip"
}
}

0 comments on commit 7e40d1b

Please sign in to comment.