diff --git a/.dockerignore b/.dockerignore index 93f3fa0..f76c3bf 100644 --- a/.dockerignore +++ b/.dockerignore @@ -5,3 +5,5 @@ /CHANGES.md /.gitignore /.git +/cwls/ +/examples/ diff --git a/CHANGES.md b/CHANGES.md index 18ea496..8b96847 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # CHANGES +## 1.4.0 + +* Move cwl and examples into core cgpBigWig respository + ## 1.3.0 * Update to htslib 1.10.2 diff --git a/Dockerfile b/Dockerfile index 4e47249..4236e31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,7 +45,7 @@ FROM ubuntu:20.04 LABEL maintainer="cgphelp@sanger.ac.uk"\ uk.ac.sanger.cgp="Cancer, Ageing and Somatic Mutation, Wellcome Sanger Institute" \ - version="1.3.0" \ + version="1.4.0" \ description="cgpBigWig" ENV OPT /opt/wtsi-cgp diff --git a/README.md b/README.md index 9418877..39f3835 100644 --- a/README.md +++ b/README.md @@ -42,9 +42,7 @@ To install this package run: A docker image for this tool can be found at [quay.io][quay-repo] (this may be more current than the dockstore version). -There are [docker][quay.io] and [dockstore.org][dockstore] wrappers for this project at [dockstore-cgpbigwig] including CWL bindings. - -See the [dockstore-cgpbigwig] documentation for more detail. +There are [docker][quay.io] and [dockstore.org][dockstore] containers for this project (including CWL bindings). ## Programs @@ -167,6 +165,11 @@ Other: -v --version Prints the version number. ``` +## Contributors + +Thanks to the following contributors on `dockstore-cgpbigwig` which is now retired +[Michael R. Crusoe](https://github.com/mr-c) + ## License ``` Copyright (c) 2017-2018 Genome Research Ltd. @@ -204,8 +207,8 @@ identical to a statement that reads ‘Copyright (c) 2005, 2006, 2007, 2008, [BigWig]: https://genome.ucsc.edu/goldenpath/help/bigWig.html [htslib]: https://github.com/samtools/htslib [dockstore]: https://dockstore.org/tools -[quay.io]: https://quay.io/repository/wtsicgp/dockstore-cgpbigwig -[dockstore-cgpbigwig]: https://github.com/cancerit/dockstore-cgpbigwig/ +[quay.io]: https://quay.io/repository/wtsicgp/cgpbigwig +[dockstore-cgpbigwig]: https://github.com/cancerit/cgpbigwig/ [travis-master]: https://travis-ci.org/cancerit/cgpBigWig.svg?branch=master diff --git a/VERSION.txt b/VERSION.txt index f0bb29e..88c5fb8 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -1.3.0 +1.4.0 diff --git a/cwls/bam2bedgraph.cwl b/cwls/bam2bedgraph.cwl new file mode 100644 index 0000000..298afb3 --- /dev/null +++ b/cwls/bam2bedgraph.cwl @@ -0,0 +1,71 @@ +#!/usr/bin/env cwl-runner + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bam2bedgraph tool. + + bam2bedgraph documentation can be found [here](https://github.com/cancerit/cgpBigWig#bam2bedgraph) + + In order to run the example found in `example/bam2bedgraph.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +cwlVersion: v1.0 + +class: CommandLineTool + +id: "cgpbigwig-bam2bedgraph" +label: "cgpbigwig-bam2bedgraph" + +baseCommand: bam2bedgraph + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" + +inputs: + input_path: + type: File + doc: "Path to bam/cram input file" + inputBinding: + prefix: --input + position: 1 + region: + type: string? + doc: "Region in bam to access" + inputBinding: + prefix: --region + filter: + type: int + doc: "Ignore reads with the filter flags" + inputBinding: + prefix: --filter + overlap: + type: boolean + doc: "Flag to check for overlapping reads" + inputBinding: + prefix: --overlap + +outputs: + output: + type: stdout + +$namespaces: + s: http://schema.org/ + +$schemas: + - https://schema.org/version/latest/schema.rdf + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/GPL-3.0 + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/cwls/bam2bw.cwl b/cwls/bam2bw.cwl new file mode 100644 index 0000000..fc5013e --- /dev/null +++ b/cwls/bam2bw.cwl @@ -0,0 +1,88 @@ +#!/usr/bin/env cwl-runner +cwlVersion: v1.0 + +class: CommandLineTool + +id: "cgpbigwig-bam2bw" +label: "cgpBigWig bam2bw flow" + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bam2bw tool. + + bam2bw documentation can be found [here](https://github.com/cancerit/cgpBigWig#bam2bw) + + In order to run the example found in `example/bam2bw.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + and change the reference path in bam2bw.json + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +baseCommand: bam2bw + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" + - class: InlineJavascriptRequirement + +inputs: + input_path: + type: File + doc: "Path to the input [b|cr]am file" + secondaryFiles: $(self.basename + self.nameext.replace('m','i')) + inputBinding: + prefix: --input + position: 1 + filter: + type: int? + doc: "SAM flags to filter" + inputBinding: + prefix: --filter + region: + type: File? + doc: "A bed file of regions over which to produce the bigwig file" + inputBinding: + prefix: --region + include_zeros: + type: boolean? + doc: "Include zero coverage regions as additional entries to the bw file" + inputBinding: + prefix: --include-zeroes + reference: + type: File? + doc: "Core reference genome.fa file (required for cram if ref_path cannot be resolved)" + secondaryFiles: + - .fai + inputBinding: + prefix: --reference + overlap: + type: boolean + doc: "Flag to check for overlapping reads" + inputBinding: + prefix: --overlap + +outputs: + output: + type: File + outputBinding: + glob: output.bam.bw + +$schemas: + - https://schema.org/version/latest/schema.rdf + +$namespaces: + s: http://schema.org/ + + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/AGPL-3.0-only + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/cwls/bam2bwbases.cwl b/cwls/bam2bwbases.cwl new file mode 100644 index 0000000..c5196d8 --- /dev/null +++ b/cwls/bam2bwbases.cwl @@ -0,0 +1,76 @@ +#!/usr/bin/env cwl-runner + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bam2bwbases tool. + + bam2bwbases documentation can be found [here](https://github.com/cancerit/cgpBigWig#bam2bwbases) + + In order to run the example found in `example/bam2bwbases.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + and change the reference path in bam2bwbases.json + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +cwlVersion: v1.0 + +class: CommandLineTool + +id: "cgpbigwig-bam2bwbases" +label: "cgpbigwig-bam2bwbases" + +baseCommand: bam2bwbases + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" +inputs: + input_path: + type: File + inputBinding: + prefix: --input + position: 1 + secondaryFiles: .bai + filter: + type: int? + inputBinding: + prefix: --filter + region: + type: string? + inputBinding: + prefix: --region + reference: + type: File? + inputBinding: + prefix: --reference + overlap: + type: boolean + doc: "Flag to check for overlapping reads" + inputBinding: + prefix: --overlap + + +outputs: + output: + type: stdout + +stdout: bam2bwbases.out.bw + +$namespaces: + s: http://schema.org/ + +$schemas: + - https://schema.org/version/latest/schema.rdf + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/GPL-3.0 + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/cwls/bg2bw.cwl b/cwls/bg2bw.cwl new file mode 100644 index 0000000..e199645 --- /dev/null +++ b/cwls/bg2bw.cwl @@ -0,0 +1,61 @@ +#!/usr/bin/env cwl-runner + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bg2bw tool. + + bg2bw documentation can be found [here](https://github.com/cancerit/cgpBigWig#bg2bw) + + In order to run the example found in `example/bg2bw.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +cwlVersion: v1.0 + +class: CommandLineTool + +id: "cgpbigwig-bg2bw" +label: "cgpbigwig-bg2bw" + +baseCommand: bg2bw + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" + +inputs: + input_path: + type: File + doc: "Path to the input [b|cr]am file" + inputBinding: + prefix: --input + position: 1 + chrom_list: + type: File + doc: "Path to chrom.list a .tsv where first two columns are contig name and length (i.e. .fai file)" + inputBinding: + prefix: --chromList + +outputs: + output: + type: stdout + +$schemas: + - https://schema.org/version/latest/schema.rdf + +$namespaces: + s: http://schema.org/ + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/GPL-3.0 + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/cwls/bwcat.cwl b/cwls/bwcat.cwl new file mode 100644 index 0000000..f7437e9 --- /dev/null +++ b/cwls/bwcat.cwl @@ -0,0 +1,64 @@ +#!/usr/bin/env cwl-runner + +cwlVersion: v1.0 +class: CommandLineTool +id: "cgpbigwig-bwcat" +label: "cgpbigwig-bwcat" + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bwcat tool. + + bwcat documentation can be found [here](https://github.com/cancerit/cgpBigWig#bwcat) + + In order to run the example found in `example/bwcat.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" + +baseCommand: bwcat + +inputs: + input_path: + type: File + doc: "Path to the input bigwig file" + inputBinding: + prefix: --input-path + position: 1 + include_na: + type: boolean? + doc: "Include NA regions in output" + inputBinding: + prefix: --include-na + region: + type: string? + doc: "Region or bw file to print to screen format. NB start should be 0 based: (contig:start-stop)" + inputBinding: + prefix: --region + +outputs: + output: + type: stdout + +$schemas: + - https://schema.org/version/latest/schema.rdf + +$namespaces: + s: http://schema.org/ + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/GPL-3.0 + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/cwls/bwjoin.cwl b/cwls/bwjoin.cwl new file mode 100644 index 0000000..e48fd59 --- /dev/null +++ b/cwls/bwjoin.cwl @@ -0,0 +1,68 @@ +#!/usr/bin/env cwl-runner + +doc: | + ![build_status](https://quay.io/repository/wtsicgp/cgpbigwig/status) + + A wrapper for the cgpBigWig bwjoin tool. + + bwjoin documentation can be found [here](https://github.com/cancerit/cgpBigWig#bwjoin) + + In order to run the example found in `example/bwjoin.json` please download the relevant reference files + listed in the [`README`](https://github.com/cancerit/cgpcgpBigWig/README.md#Example_reference_files) + + See the [cgpBigWig](https://github.com/cancerit/cgpBigWig) + website for more information about this wrapper. + + For queries relating to the underlying software see [cgpBigWig](https://github.com/cancerit/cgpBigWig). + +cwlVersion: v1.0 + +class: CommandLineTool + +id: "cgpbigwig-bwjoin" +label: "cgpbigwig-bwjoin" + +baseCommand: bwjoin + +requirements: + - class: DockerRequirement + dockerPull: "quay.io/wtsicgp/cgpbigwig:1.4.0" + +inputs: + input_path: + type: Directory + inputBinding: + prefix: --input-path + position: 2 + output_path: + type: File? + inputBinding: + prefix: --outfile + ignore_contigs: + type: string? + inputBinding: + prefix: --ignore-contigs + ref_index: + type: File + inputBinding: + prefix: --fasta-index + position: 1 + +outputs: + output: + type: stdout + +$namespaces: + s: http://schema.org/ + +$schemas: + - https://schema.org/version/latest/schema.rdf + +s:codeRepository: https://github.com/cancerit/cgpBigWig +s:license: https://spdx.org/licenses/GPL-3.0 + +s:author: + - class: s:Person + s:identifier: https://orcid.org/0000-0002-0407-0386 + s:email: mailto:drj@sanger.ac.uk + s:name: David Jones diff --git a/examples/bam2bedgraph.json b/examples/bam2bedgraph.json new file mode 100644 index 0000000..52285d1 --- /dev/null +++ b/examples/bam2bedgraph.json @@ -0,0 +1,10 @@ +{ + "input_path": { + "path": "http://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwxs/COLO-829-BL_ex.bam", + "class": "File" + }, + + "filter": 3852, + + "overlap": false +} diff --git a/examples/bam2bw.json b/examples/bam2bw.json new file mode 100644 index 0000000..a5687a2 --- /dev/null +++ b/examples/bam2bw.json @@ -0,0 +1,16 @@ +{ + "input_path": { + "path": "http://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwxs/COLO-829-BL_ex.bam", + "class": "File" + }, + + "include_zeros": false, + + "reference": { + "path": "/your/path/to/reference/genome.fa", + "class": "File" + }, + + "overlap": false + +} diff --git a/examples/bam2bwbases.json b/examples/bam2bwbases.json new file mode 100644 index 0000000..31b2700 --- /dev/null +++ b/examples/bam2bwbases.json @@ -0,0 +1,26 @@ +{ + "input_path": { + "path": "http://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwxs/COLO-829-BL_ex.bam", + "class": "File", + "dirname": "xxxx" + }, + + "bai": { + "path": "http://ngs.sanger.ac.uk/production/cancer/dockstore/cgpwxs/COLO-829-BL_ex.bam.bai", + "class": "File" + }, + + "filter": 4, + + "reference": { + "path": "/your/path/to/reference/genome.fa", + "class": "File" + }, + + "output_path": { + "path": "bam2bwbases.out.bw", + "class": "File" + }, + + "overlap": false +} diff --git a/examples/bg2bw.json b/examples/bg2bw.json new file mode 100644 index 0000000..06cda94 --- /dev/null +++ b/examples/bg2bw.json @@ -0,0 +1,11 @@ +{ + "input_path": { + "path": "https://raw.githubusercontent.com/cancerit/cgpBigWig/master/test_data/coverage.region.expected.bed", + "class": "File" + }, + + "chrom_list": { + "path": "/your/path/to/reference/genome.fa.fai", + "class": "File" + } +} diff --git a/examples/bwcat.json b/examples/bwcat.json new file mode 100644 index 0000000..f4efed1 --- /dev/null +++ b/examples/bwcat.json @@ -0,0 +1,6 @@ +{ + "input_path": { + "path": "https://raw.githubusercontent.com/cancerit/cgpBigWig/master/test_data/test.bw", + "class": "File" + } +} diff --git a/examples/bwjoin.json b/examples/bwjoin.json new file mode 100644 index 0000000..79891e7 --- /dev/null +++ b/examples/bwjoin.json @@ -0,0 +1,14 @@ +{ + "input_path": { + "path": "/home/ra11/volume/dockstore-cgpbigwig/cwls/", + "class": "Directory" + }, + + "ref_index": { + "path": "/your/path/to/reference/genome.fa.fai", + "class": "File" + }, + + "ignore_contigs": "3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,X,Y,MT,GL000207.1,GL000226.1,GL000229.1,GL000231.1,GL000210.1,GL000239.1,GL000235.1,GL000201.1,GL000247.1,GL000245.1,GL000197.1,GL000203.1,GL000246.1,GL000249.1,GL000196.1,GL000248.1,GL000244.1,GL000238.1,GL000202.1,GL000234.1,GL000232.1,GL000206.1,GL000240.1,GL000236.1,GL000241.1,GL000243.1,GL000242.1,GL000230.1,GL000237.1,GL000233.1,GL000204.1,GL000198.1,GL000208.1,GL000191.1,GL000227.1,GL000228.1,GL000214.1,GL000221.1,GL000209.1,GL000218.1,GL000220.1,GL000213.1,GL000211.1,GL000199.1,GL000217.1,GL000216.1,GL000215.1,GL000205.1,GL000219.1,GL000224.1,GL000223.1,GL000195.1,GL000212.1,GL000222.1,GL000200.1,GL000193.1,GL000194.1,GL000225.1,GL000192.1,NC_007605,hs37d5" + +}