9369: arvados-cwl-runner documentation and examples, add deprecation notices to pipel...
[arvados.git] / doc / user / cwl / bwa-mem / bwa-mem.cwl
1 #!/usr/bin/env cwl-runner
2 cwlVersion: draft-3
3 class: CommandLineTool
4
5 hints:
6   - class: DockerRequirement
7     dockerPull: biodckr/bwa
8 requirements:
9   - class: InlineJavascriptRequirement
10
11 baseCommand: [bwa, mem]
12
13 arguments:
14   - {prefix: "-t", valueFrom: $(runtime.cores)}
15   - {prefix: "-R", valueFrom: "@RG\tID:$(inputs.group_id)\tPL:$(inputs.PL)\tSM:$(inputs.sample_id)"}
16
17 inputs:
18   - id: reference
19     type: File
20     inputBinding:
21       position: 1
22       valueFrom: $(self.path.match(/(.*)\.[^.]+$/)[1])
23     secondaryFiles:
24       - ^.ann
25       - ^.amb
26       - ^.pac
27       - ^.sa
28     description: The index files produced by `bwa index`
29   - id: read_p1
30     type: File
31     inputBinding:
32       position: 2
33     description: The reads, in fastq format.
34   - id: read_p2
35     type: ["null", File]
36     inputBinding:
37       position: 3
38     description:  For mate paired reads, the second file (optional).
39   - id: group_id
40     type: string
41   - id: sample_id
42     type: string
43   - id: PL
44     type: string
45
46 stdout: $(inputs.read_p1.path.match(/\/([^/]+)\.[^/.]+$/)[1] + ".sam")
47
48 outputs:
49   - id: aligned_sam
50     type: File
51     outputBinding:
52       glob: $(inputs.read_p1.path.match(/\/([^/]+)\.[^/.]+$/)[1] + ".sam")