-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockstore.cwl
72 lines (63 loc) · 1.98 KB
/
Dockstore.cwl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/usr/bin/env cwl-runner
class: CommandLineTool
cwlVersion: v1.0
dct:contributor:
foaf:name: Andy Yang
foaf:mbox: mailto:[email protected]
dct:creator:
'@id': http://orcid.org/0000-0001-9102-5681
foaf:name: Andrey Kartashov
foaf:mbox: mailto:[email protected]
dct:description: 'Developed at Cincinnati Children’s Hospital Medical Center for the
CWL consortium http://commonwl.org/ Original URL: https://github.com/common-workflow-language/workflows'
requirements:
- class: DockerRequirement
dockerPull: quay.io/cancercollaboratory/dockstore-tool-samtools-index:1.0
- class: InlineJavascriptRequirement
expressionLib:
- var new_ext = function() { var ext=inputs.bai?'.bai':inputs.csi?'.csi':'.bai';
return inputs.input.path.split('/').slice(-1)[0]+ext; };
inputs:
input:
type: File
inputBinding:
position: 2
doc: |
Input bam file.
interval:
type: int?
inputBinding:
position: 1
prefix: -m
doc: |
Set minimum interval size for CSI indices to 2^INT [14]
csi:
type: boolean
default: false
doc: |
Generate CSI-format index for BAM files
bai:
type: boolean
default: false
doc: |
Generate BAI-format index for BAM files [default]
outputs:
index:
type: File
outputBinding:
glob: $(new_ext())
doc: The index file
baseCommand: [samtools, index]
arguments:
- valueFrom: $(inputs.bai?'-b':inputs.csi?'-c':[])
position: 1
- valueFrom: $(new_ext())
position: 3
doc: |
Prints alignments in the specified input alignment file.
Usage: samtools index [-bc] [-m INT] <in.bam> aln.bam|aln.cram
Options:
-b Generate BAI-format index for BAM files [default]
-c Generate CSI-format index for BAM files
-m INT Set minimum interval size for CSI indices to 2^INT [14]
For a CRAM file aln.cram, index file aln.cram.crai will be created. For a BAM file aln.bam, either aln.bam.bai or aln.bam.csi will be created, depending on the index format selected.