sed -i -e 's/docker: dockerImage/#docker: dockerImage/g'
[GalaxyCodeBases.git] / etc / gatk-wdl / fm2gatk / structural-variantcalling / tasks / clever.wdl
blobe9eeac2e2f2a2ebfb6f0f8b7c3779264c313f087
1 version 1.0
3 # MIT License
5 # Copyright (c) 2018 Leiden University Medical Center
7 # Permission is hereby granted, free of charge, to any person obtaining a copy
8 # of this software and associated documentation files (the "Software"), to deal
9 # in the Software without restriction, including without limitation the rights
10 # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 # copies of the Software, and to permit persons to whom the Software is
12 # furnished to do so, subject to the following conditions:
14 # The above copyright notice and this permission notice shall be included in
15 # all copies or substantial portions of the Software.
17 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 # SOFTWARE.
25 import "bwa.wdl"
27 task Mateclever {
28     input {
29         File fiteredBam
30         File indexedFiteredBam
31         BwaIndex bwaIndex
32         File predictions
33         String outputPath = "./clever"
34         Int cleverMaxDelLength = 100000
35         Int maxLengthDiff= 30
36         Int maxOffset = 150
38         Int threads = 10
39         String memory = "15G"
40         Int timeMinutes = 600
41         String dockerImage = "quay.io/biocontainers/clever-toolkit:2.4--py36hcfe0e84_6"
42     }
44     command {
45         set -e
46         mkdir -p "$(dirname ~{outputPath})"
47         echo ~{outputPath} ~{fiteredBam} ~{predictions} none > predictions.list
48         mateclever \
49         -T ~{threads} \
50         -k \
51         -f \
52         -M ~{cleverMaxDelLength} \
53         -z ~{maxLengthDiff} \
54         -o ~{maxOffset} \
55         ~{bwaIndex.fastaFile} \
56         predictions.list \
57         ~{outputPath}
58     }
60     output {
61         File matecleverVcf = outputPath + "/deletions.vcf"
62     }
64     runtime {
65         cpu: threads
66         memory: memory
67         time_minutes: timeMinutes
68         #docker: dockerImage
69     }
71     parameter_meta {
72         # inputs
73         fiteredBam: {description: "The bam file where sequences less than 30bp were removed.", category: "required"}
74         indexedFiteredBam: {description: "The index of the filtered bam file.", category: "required"}
75         bwaIndex: {description: "The BWA index files.", category: "required"}
76         predictions: {description: "The predicted deletions (VCF) from clever.", category: "required"}
77         maxOffset: {description: "The maximum center distance between split-read and read-pair deletion to be considered identical.", category: "advanced"}
78         maxLengthDiff: {description: "The maximum length difference between split-read and read-pair deletion to be considered identical.", category: "advanced"}
79         cleverMaxDelLength: {description: "The maximum deletion length to look for in Clever predictions.", category: "advanced"}
80         outputPath: {description: "The location the output VCF file should be written.", category: "common"}
81         threads: {description: "The the number of threads required to run a program", category: "advanced"}
82         memory: {description: "The memory required to run the programs", category: "advanced"}
83         timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
84         dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
85     }
88 task Prediction {
89     input {
90         File bamFile
91         File bamIndex
92         BwaIndex bwaIndex
93         String outputPath = "./clever"
95         Int threads = 10
96         String memory = "55G"
97         Int timeMinutes = 480
98         String dockerImage = "quay.io/biocontainers/clever-toolkit:2.4--py36hcfe0e84_6"
99     }
101     command {
102         set -e
103         mkdir -p "$(dirname ~{outputPath})"
104         clever \
105         -T ~{threads} \
106         --use_mapq \
107         --sorted \
108         -f \
109         ~{bamFile} \
110         ~{bwaIndex.fastaFile} \
111         ~{outputPath}
112     }
114     output {
115         File predictions = outputPath + "/predictions.vcf"
116     }
118     runtime {
119         cpu: threads
120         memory: memory
121         time_minutes: timeMinutes
122         #docker: dockerImage
123     }
125     parameter_meta {
126         # inputs
127         bamFile: {description: "The bam file to process.", category: "required"}
128         bamIndex: {description: "The index bam file.", category: "required"}
129         bwaIndex: {description: "The BWA index files.", category: "required"}
130         outputPath: {description: "The location the output VCF file should be written.", category: "common"}
131         threads: {description: "The the number of threads required to run a program", category: "advanced"}
132         memory: {description: "The memory required to run the programs", category: "advanced"}
133         timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
134         dockerImage: {description: "The docker image used for this task. Changing this may result in errors which the developers may choose not to address.", category: "advanced"}
136         # outputs
137         predictions: {description: "The predicted deletions (VCF) from clever.", category: "advanced"}
138     }