Skip to content

Commit

Permalink
Adding CWL files
Browse files Browse the repository at this point in the history
  • Loading branch information
r78v10a07 committed Apr 1, 2019
1 parent 3c897f6 commit 4ba17a6
Show file tree
Hide file tree
Showing 3 changed files with 391 additions and 0 deletions.
171 changes: 171 additions & 0 deletions bamscale-cov.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

label: BAMscale-cov
doc: Calculate coverage of BED coordinates in BAM file(s)

requirements:
InlineJavascriptRequirement: {}

hints:
- $import: bamscale.yml

inputs:
l:
type: string?
inputBinding:
position: 1
prefix: -l
doc: |
Sequencing type to be used. Can be: single, paired, and auto (default: autodetect)
f:
type: string?
inputBinding:
position: 1
prefix: -f
doc: |
Compute coverage using fragments instead of reads (default: no)
s:
type: string?
inputBinding:
position: 1
prefix: -s
doc: |
Reads need to have same orientation of peaks (default: unstranded)
r:
type: string?
inputBinding:
position: 1
prefix: -r
doc: |
Reads need to have reverse orientation of peaks (default: unstranded)
e:
type: int?
inputBinding:
position: 2
prefix: -e
doc: |
Compute sequencing coverage from BAM file quickly using the index (option '0'),
or count number of reads by parsing entire BAM file (slower, but more accurate; set to '1' [default])
c:
type: File?
inputBinding:
position: 2
prefix: -c
doc: |
Input file with list of chromosomes to blacklist when computing coverage for normalization
u:
type: int?
inputBinding:
position: 2
prefix: -u
doc: |
BED file with regions to subtract when computing coverage for normalization
These coordinates should not overlap so reads are not counted multiple times
q:
type: int?
inputBinding:
position: 3
prefix: -q
doc: |
Minimum (at least) mapping quality (default: 0)
d:
type: string?
inputBinding:
position: 3
prefix: -d
doc: |
Keep duplicated reads (default: no)
p:
type: string?
inputBinding:
position: 3
prefix: -p
doc: |
Do not filter un-proper alignments (default: filter)
m:
type: string?
inputBinding:
position: 3
prefix: -m
doc: |
Do not remove reads with unmapped pairs
g:
type: int?
inputBinding:
position: 3
prefix: -g
doc: |
Minimum fragment size for read pairs (default: 0)
x:
type: int?
inputBinding:
position: 3
prefix: -x
doc: |
Maximum fragment size for read pairs (default: 2000)
w:
type: int?
inputBinding:
position: 3
prefix: -w
doc: |
Filter reads based on fragment size (default: no)
t:
type: int?
inputBinding:
position: 4
prefix: -t
doc: |
No. of threads to use (default: 1)
n:
type: string
inputBinding:
position: 4
prefix: -n
doc: |
Output prefix for file names (default: none)
bed:
type: File
inputBinding:
position: 5
prefix: --bed
doc: |
Input BED file
bam:
type:
type: array
items: File
inputBinding:
prefix: --bam
separate: true
secondaryFiles: .bai
inputBinding:
position: 6
doc: |
Input BAM file. This can be specified multiple times in case of multiple BAM files

outputs:
output:
type: File[]
outputBinding:
glob: $(inputs.n)*

baseCommand: ["BAMscale", "cov"]

s:author:
- class: s:Person
s:identifier: https://orcid.org/0000-0002-4108-5982
s:email: mailto:[email protected]
s:name: Roberto Vera Alvarez

s:codeRepository: https://github.com/ncbi/BAMscale
s:license: https://spdx.org/licenses/OPL-1.0

$namespaces:
s: http://schema.org/

$schemas:
- http://schema.org/docs/schema_org_rdfa.html

216 changes: 216 additions & 0 deletions bamscale-scale.cwl
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
#!/usr/bin/env cwl-runner
cwlVersion: v1.0
class: CommandLineTool

label: BAMscale-scale
doc: Scale one or multiple BAM files

requirements:
InlineJavascriptRequirement: {}

hints:
- $import: bamscale.yml

inputs:
l:
type: string?
inputBinding:
position: 1
prefix: -l
doc: |
Sequencing type to be used. Can be: single, paired, and auto (default: autodetect)
f:
type: string?
inputBinding:
position: 1
prefix: -f
doc: |
Compute coverage using fragments instead of reads (default: no)
a:
type: int?
inputBinding:
position: 1
prefix: -a
doc: |
Fragment size to be used to extend single-end library reads
y:
type: string?
inputBinding:
position: 2
prefix: -y
doc: |
Type of normalization. (default: base)
If no normalization is needed, set '--scale no' argument, the program will disregard this option.
Options:
1) reads: No. of mapped reads/fragments
2) base: Sum of per-base coverage of reads/fragments
k:
type: string?
inputBinding:
position: 2
prefix: -k
doc: |
Method to scale samples together. (default: genome)
Options are:
1) no: no scaling, just calculate coverage
2) smallest: scale reads to smallest library (multiple-samples only)
3) genome: scale samples to 1x genome coverage (only possible with 'base' normalization type)
r:
type: string?
inputBinding:
position: 1
prefix: -r
doc: |
Operation to perform when scaling samples. Default: scaled
Options are:
1) scaled: output scaled tracks.
2) unscaled: do not scale files in any way.
2) log2: log2 transform against first BAM file.
3) ratio: coverage ratio against first BAM file.
4) subtract: subtract coverage against first BAM file.
5) rfd: OK-seq RFD calculation
z:
type: int?
inputBinding:
position: 2
prefix: -z
doc: |
Size of bins for output bigWig/bedgraph generation (default: 5)
e:
type: int?
inputBinding:
position: 3
prefix: -e
doc: |
Compute sequencing coverage from BAM file. (default: '1', count reads while parsing BAM)
Options are:
1) 0: use reads in index (only if normalization is set to 'reads')
2) 1: count reads while parsing BAM(s)
WARNING: this option is only useful when 'reads' are used for normalization
c:
type: File?
inputBinding:
position: 3
prefix: -c
doc: |
Input file with list of chromosomes to blacklist when computing coverage for normalization
u:
type: int?
inputBinding:
position: 3
prefix: -u
doc: |
BED file with regions to subtract when computing coverage for normalization
These coordinates should not overlap so reads are not counted multiple times
j:
type: int?
inputBinding:
position: 3
prefix: -j
doc: |
Smoothen signal by calculating mean of N bins flanking both sides of each bin (default: 0)
If set to '0', the signal is not smoothened. To turn on specify a value greater than '0'.
For replication timing, a good value is to smoothen to 100k bases. If binSize is 100bp, this would be '1000'
b:
type: int?
inputBinding:
position: 3
prefix: -b
doc: |
Which tracks should be smoothened when performing smoothening (default: '1' meaning only binned track).
Options are:
1) 0: Smoothen scaled and transformed tracks (log2, ratio or subtracted)
2) 1: Smoothen only the scaled sequencing track
3) 2: Smoothen only the transformed (log2, ratio or subtract) track
q:
type: int?
inputBinding:
position: 4
prefix: -q
doc: |
Minimum (at least) mapping quality (default: 0)
d:
type: string?
inputBinding:
position: 4
prefix: -d
doc: |
Keep duplicated reads (default: no)
p:
type: string?
inputBinding:
position: 4
prefix: -p
doc: |
Do not filter un-proper alignments (default: filter)
m:
type: string?
inputBinding:
position: 4
prefix: -m
doc: |
Do not remove reads with unmapped pairs
g:
type: int?
inputBinding:
position: 4
prefix: -g
doc: |
Minimum fragment size for read pairs (default: 0)
x:
type: int?
inputBinding:
position: 4
prefix: -x
doc: |
Maximum fragment size for read pairs (default: 2000)
w:
type: int?
inputBinding:
position: 4
prefix: -w
doc: |
Filter reads based on fragment size (default: no)
t:
type: int?
inputBinding:
position: 5
prefix: -t
doc: |
No. of threads to use (default: 1)
bam:
type:
type: array
items: File
inputBinding:
prefix: --bam
separate: true
secondaryFiles: .bai
inputBinding:
position: 6
doc: |
Input BAM file. This can be specified multiple times in case of multiple BAM files

outputs:
output:
type: File[]
outputBinding:
glob: "*.bw"

baseCommand: ["BAMscale", "scale"]

s:author:
- class: s:Person
s:identifier: https://orcid.org/0000-0002-4108-5982
s:email: mailto:[email protected]
s:name: Roberto Vera Alvarez

s:codeRepository: https://github.com/ncbi/BAMscale
s:license: https://spdx.org/licenses/OPL-1.0

$namespaces:
s: http://schema.org/

$schemas:
- http://schema.org/docs/schema_org_rdfa.html

4 changes: 4 additions & 0 deletions bamscale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class: DockerRequirement
dockerImageId: bamscale
dockerFile:
$include: https://raw.githubusercontent.com/ncbi/BAMscale/master/Dockerfile

0 comments on commit 4ba17a6

Please sign in to comment.