-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathplink2_vcf2pgen.wdl
63 lines (54 loc) · 1.58 KB
/
plink2_vcf2pgen.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
version 1.0
workflow plink2_vcf2pgen {
input {
File vcf_file
String? out_prefix
}
call vcf2pgen {
input: vcf_file = vcf_file,
out_prefix = out_prefix
}
output {
File out_pgen = vcf2pgen.out_pgen
File out_pvar = vcf2pgen.out_pvar
File out_psam = vcf2pgen.out_psam
Map[String, String] md5sum = vcf2pgen.md5sum
}
meta {
author: "Stephanie Gogarten"
email: "[email protected]"
}
}
task vcf2pgen {
input {
File vcf_file
String? out_prefix
Int mem_gb = 16
}
Int disk_size = ceil(3*(size(vcf_file, "GB"))) + 10
String out_string = if defined(out_prefix) then out_prefix else basename(vcf_file, ".vcf.gz")
command {
plink2 \
--vcf ${vcf_file} \
--make-pgen \
--out ${out_string}
md5sum ${out_string}.pgen | cut -d " " -f 1 > md5_pgen.txt
md5sum ${out_string}.pvar | cut -d " " -f 1 > md5_pvar.txt
md5sum ${out_string}.psam | cut -d " " -f 1 > md5_psam.txt
}
output {
File out_pgen = "${out_string}.pgen"
File out_pvar = "${out_string}.pvar"
File out_psam = "${out_string}.psam"
Map[String, String] md5sum = {
"pgen": read_string("md5_pgen.txt"),
"pvar": read_string("md5_pvar.txt"),
"psam": read_string("md5_psam.txt")
}
}
runtime {
docker: "quay.io/biocontainers/plink2:2.00a5.10--h4ac6f70_0"
disks: "local-disk " + disk_size + " SSD"
memory: mem_gb + " GB"
}
}