-
Notifications
You must be signed in to change notification settings - Fork 2
/
cnv_somatic_oncotator_workflow.wdl
80 lines (64 loc) · 2.73 KB
/
cnv_somatic_oncotator_workflow.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
##tag gatk4.0.1.2 release
workflow CNVOncotatorWorkflow {
##################################
#### required basic arguments ####
##################################
File called_file
##################################
#### optional basic arguments ####
##################################
String? additional_args
String? oncotator_docker
Int? mem_gb_for_oncotator
Int? preemptible_attempts
call OncotateSegments {
input:
called_file = called_file,
additional_args = additional_args,
oncotator_docker = oncotator_docker,
mem_gb = mem_gb_for_oncotator,
preemptible_attempts = preemptible_attempts
}
output {
File oncotated_called_file = OncotateSegments.oncotated_called_file
File oncotated_called_gene_list_file = OncotateSegments.oncotated_called_gene_list_file
}
}
task OncotateSegments {
File called_file
String? additional_args
# Runtime parameters
String? oncotator_docker
Int? mem_gb
Int? disk_space_gb
Boolean use_ssd = false
Int? cpu
Int? preemptible_attempts
Int machine_mem_mb = select_first([mem_gb, 3]) * 1000
String basename_called_file = basename(called_file)
command <<<
set -e
# Get rid of the sequence dictionary at the top of the file
egrep -v "^\@" ${called_file} > ${basename_called_file}.seq_dict_removed.seg
echo "Starting the simple_tsv..."
/root/oncotator_venv/bin/oncotator --db-dir /root/onco_dbdir/ -c /root/tx_exact_uniprot_matches.AKT1_CRLF2_FGFR1.txt \
-u file:///root/onco_cache/ -r -v ${basename_called_file}.seq_dict_removed.seg ${basename_called_file}.per_segment.oncotated.txt hg19 \
-i SEG_FILE -o SIMPLE_TSV ${default="" additional_args}
echo "Starting the gene list..."
/root/oncotator_venv/bin/oncotator --db-dir /root/onco_dbdir/ -c /root/tx_exact_uniprot_matches.AKT1_CRLF2_FGFR1.txt \
-u file:///root/onco_cache/ -r -v ${basename_called_file}.seq_dict_removed.seg ${basename_called_file}.gene_list.txt hg19 \
-i SEG_FILE -o GENE_LIST ${default="" additional_args}
>>>
runtime {
docker: select_first([oncotator_docker, "broadinstitute/oncotator:1.9.5.0-eval-gatk-protected"])
memory: machine_mem_mb + " MB"
disks: "local-disk " + select_first([disk_space_gb, 50]) + if use_ssd then " SSD" else " HDD"
cpu: select_first([cpu, 1])
preemptible: select_first([preemptible_attempts, 2])
bootDiskSizeGb: 50
}
output {
File oncotated_called_file = "${basename_called_file}.per_segment.oncotated.txt"
File oncotated_called_gene_list_file = "${basename_called_file}.gene_list.txt"
}
}