-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathmodkit.wdl
107 lines (94 loc) · 4.61 KB
/
modkit.wdl
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
version 1.0
# Copyright (c) 2025 Leiden University Medical Center
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
task Pileup {
input {
File bam
File bamIndex
String outputBed = "output.bedMethyl"
File referenceFasta
File referenceFastaFai
Int? intervalSize
File? includeBed
Boolean cpg = false
Boolean combineMods = false
Boolean combineStrands = false
Boolean bedgraph = false
String? ignore
String logFilePath = "modkit.log"
Int threads = 8
String memory = "4GiB"
Int timeMinutes = 2880 / threads # 2 Days / threads
String dockerImage = "quay.io/biocontainers/ont-modkit:0.4.2--hcdda2d0_0"
}
command <<<
set -e
mkdir -p $(dirname ~{outputBed})
mkdir -p $(dirname ~{logFilePath})
modkit pileup \
--threads ~{threads} \
~{"--interval-size " + intervalSize} \
~{"--include-bed " + includeBed} \
~{"--ignore " + ignore} \
--ref ~{referenceFasta} \
~{true="--cpg" false="" cpg} \
~{true="--combine-mods" false="" combineMods} \
~{true="--combine-strands" false="" combineStrands} \
~{true="--bedgraph" false="" bedgraph} \
--log-filepath ~{logFilePath} \
~{bam} \
~{outputBed}
>>>
output {
File? out = outputBed # Normal mode
Array[File] outFiles = glob(outputBed + "/*") # Bedgraph mode
File logFile = logFilePath
}
runtime {
docker: dockerImage
cpu: threads
memory: memory
time_minutes: timeMinutes
}
parameter_meta {
# input
bam: {description: "The input alignment file", category: "required"}
bamIndex: {description: "The index for the input alignment file", category: "required"}
referenceFasta: {description: "The reference fasta file.", category: "required"}
referenceFastaFai: {description: "The index for the reference fasta file.", category: "required"}
outputBed: {description: "The output name where the data should be placed.", category: "common"}
intervalSize: {description: "Sets the interval size", category: "advanced"}
includeBed: {description: "Bed file with regions to include", category: "advanced"}
cpg: {description: "Whether to call only at cpg sites", category: "advanced"}
combineMods: {description: "Whether to combine modifications in the output", category: "advanced"}
combineStrands: {description: "Whether to combine strands in the output", category: "advanced"}
bedgraph: {description: "Whether to create a folder instead with a bedgraph file", category: "advanced"}
ignore: {description: "Modification type to ignore. For example 'h'.", category: "advanced"}
logFilePath: {description: "Path where the log file should be written.", category: "advanced"}
threads: {description: "The number of threads to use for variant calling.", category: "advanced"}
memory: {description: "The amount of memory this job will use.", category: "advanced"}
timeMinutes: {description: "The maximum amount of time the job will run in minutes.", category: "advanced"}
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"}
# output
out: {description: "The output bed files. Not available when bedgraph = true."}
outFiles: {description: "Output files when bedgraph = true."}
logFile: {description: "The generated log file."}
}
}