-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathrqcfilter.wdl
71 lines (62 loc) · 1.82 KB
/
rqcfilter.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
version 1.0
import "shortReadsqc.wdl" as srqc
import "longReadsqc.wdl" as lrqc
workflow rqcfilter{
input {
Array[Pair[File, String]] input_files
Array[File] input_fq1
Array[File] input_fq2
File? reference
String proj
Boolean interleaved
Boolean shortRead
}
scatter (file in input_files) {
call processing {
input: input_files = file
}
}
if (shortRead) {
call srqc.ShortReadsQC {
input:
input_files = processing.input_wdl,
input_fq1 = input_fq1,
input_fq2 = input_fq2,
interleaved = interleaved,
proj = proj
}
}
if (!shortRead) {
call lrqc.LongReadsQC {
input:
file = processing.input_wdl[0],
proj = proj,
reference = reference
}
}
output {
File? filtered_final = if (shortRead) then ShortReadsQC.filtered_final else LongReadsQC.filtered_final
File? filtered_stats_final = if (shortRead) then ShortReadsQC.filtered_stats_final else LongReadsQC.filtered_stats1
File? filtered_stats2_final = if (shortRead) then ShortReadsQC.filtered_stats2_final else LongReadsQC.filtered_stats2
File? rqc_info = if (shortRead) then ShortReadsQC.rqc_info else LongReadsQC.rqc_info
File? stats = if (shortRead) then ShortReadsQC.stats else LongReadsQC.stats
}
}
task processing {
input {
Pair[File, String] input_files
}
command <<<
echo "INPUT FOLDER: $(ls ~{input_files.left})" >> test.txt
cp ~{input_files.left} ~{input_files.right}
ls -latr >> test.txt
>>>
output {
File input_wdl = "~{input_files.right}"
}
runtime{
memory: "2GiB"
runtime_minutes: 10
cpu: 2
}
}