cf9210cc2dca7078fe22e27cd0605cb27332db9f
[arvados-tutorial.git] / WGS-processing / cwl / helper / bwamem-samtools-view.cwl
1 cwlVersion: v1.1
2 class: CommandLineTool
3 label: Align FASTQs with BWA
4
5 requirements:
6   DockerRequirement:
7     dockerPull: curii/bwa-samtools
8   ShellCommandRequirement: {}
9
10 hints:
11   arv:RuntimeConstraints:
12     keep_cache: 1024
13     outputDirType: keep_output_dir
14   ResourceRequirement:
15     ramMin: 50000
16     coresMin: 16
17   SoftwareRequirement:
18     packages:
19       BWA:
20         specs: [ "https://identifiers.org/rrid/RRID:SCR_010910" ]
21         version: [ "0.7.17" ]
22       Samtools:
23         specs: [ "https://identifiers.org/rrid/RRID:SCR_002105" ]
24         version: [ "1.10" ]
25
26 inputs:
27   reference:
28     type: File
29     format: edam:format_1929 # FASTA
30     label: Reference genome
31     secondaryFiles:
32       - .amb
33       - .ann
34       - .bwt
35       - .pac
36       - .sa
37       - .fai
38       - ^.dict
39   fastq1:
40     type: File
41     format: edam:format_1930 # FASTQ
42     label: One of set of pair-end FASTQs (R1)
43   fastq2:
44     type: File
45     format: edam:format_1930 # FASTQ
46     label: One of set of pair-end FASTQs (R2)
47   sample:
48     type: string
49     label: Sample Name
50
51 stdout: $(inputs.sample).bam
52
53 outputs:
54   bam:
55     type: File
56     format: edam:format_2572 # BAM
57     label: Alignments in BAM format
58     outputBinding:
59       glob: "*bam"
60
61 arguments:
62   - /bwa-0.7.17/bwa
63   - mem
64   - -M
65   - -t
66   - $(runtime.cores)
67   - $(inputs.reference)
68   - -R
69   - '@RG\tID:sample\tSM:sample\tLB:sample\tPL:ILLUMINA\tPU:sample1'
70   - -c
71   - '250'
72   - $(inputs.fastq1)
73   - $(inputs.fastq2)
74   - shellQuote: false
75     valueFrom: '|'
76   - samtools
77   - view
78   - -@
79   - $(runtime.cores)
80   - -b
81   - -S
82   - shellQuote: false
83     valueFrom: '-'
84
85 s:codeRepository: https://github.com/arvados/arvados-tutorial
86 s:license: https://www.gnu.org/licenses/agpl-3.0.en.html
87
88 $namespaces:
89  s: https://schema.org/
90  edam: http://edamontology.org/
91  arv: "http://arvados.org/cwl#"
92  cwltool: "http://commonwl.org/cwltool#"
93
94 #$schemas:
95 # - https://schema.org/version/latest/schema.rdf
96 # - http://edamontology.org/EDAM_1.18.owl