-
Notifications
You must be signed in to change notification settings - Fork 0
/
compression.wdl
177 lines (137 loc) · 3.25 KB
/
compression.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# This project constitutes a work of the United States Government and is not
# subject to domestic copyright protection under 17 USC § 105. No Rights Are
# Reserved.
# This program is distributed in the hope that it will be useful. Responsibility
# for the use of the system and interpretation of documentation and results lies
# solely with the user. In no event shall FDA be liable for direct, indirect,
# special, incidental, or consequential damages resulting from the use, misuse,
# or inability to use the system and accompanying documentation. Third parties'
# use of or acknowledgment of the system does not in any way represent that
# FDA endorses such third parties or expresses any opinion with respect to their
# statements.
# This program is free software: you can redistribute it and/or modify it.
version 1.0
task fromgz {
input {
File in
}
command <<<
gzip -cd ~{in}
>>>
output {
File out = stdout()
}
parameter_meta {
in: "File in GZIP format."
}
runtime {
container: "ubuntu:focal"
cpu: 1
memory: "1024 MB"
}
}
task togz {
input {
File in
}
command <<<
gzip -c ~{in}
>>>
output {
File out = stdout()
}
parameter_meta {
in: "A file to compress."
}
runtime {
container: "ubuntu:focal"
cpu: 1
memory: "1024 MB"
}
}
task fromzstd {
input {
File in
}
command <<<
zstd -d ~{in} -c
>>>
output {
File out = stdout()
}
parameter_meta {
in: "File in ZSTD format."
}
runtime {
container: "biocontainers/zstd:v1.3.8dfsg-3-deb_cv1"
cpu: 1
memory: "1024 MB"
}
}
task tozstd {
input {
File in
Int compression = 15
}
command <<<
zstd -~{compression} ~{in} -c
>>>
output {
File out = stdout()
}
parameter_meta {
in: "A file to compress."
compression: "Compression level (1-19)."
}
runtime {
container: "biocontainers/zstd:v1.3.8dfsg-3-deb_cv1"
cpu: 8
memory: "1024 MB"
}
}
task untar {
input {
File in
String flags = "xavf"
}
command <<<
tar -~{flags} ~{in} -C ./out
>>>
output {
Array[File] files = glob("./out/*")
}
parameter_meta {
in: "File in TAR format."
flags: "tar flags."
}
runtime {
container: "ubuntu:focal"
cpu: 1
memory: "1024 MB"
}
}
task tar {
input {
Array[File]+ files
String flags = "czvf"
String name = "archive"
String suffix = "tar.gz"
}
command <<<
tar -~{flags} ~{name}.~{suffix} ~{sep=' ' files}
>>>
output {
File archive = "~{name}.~{suffix}"
}
parameter_meta {
files: "Files to archive."
flags: "tar flags."
name: "Name of the archive."
suffix: "Archive suffix."
}
runtime {
container: "ubuntu:focal"
cpu: 1
memory: "1024 MB"
}
}