@@ -10,50 +10,36 @@ task stuart_arraycheck_rdata {
10
10
Boolean fastfail = false # should we exit as soon as we get our first mismatch?
11
11
}
12
12
13
- Int test_size = 2 * ceil (size (test , "GB" ))
14
- Int truth_size = 2 * ceil (size (truth , "GB" ))
13
+ Int test_size = ceil (size (test , "GB" ))
14
+ Int truth_size = ceil (size (truth , "GB" ))
15
15
Int finalDiskSize = test_size + truth_size + 1
16
16
17
17
command <<<
18
18
19
- # the md5 stuff pulls from the files in /inputs/
20
- # the Rscript pulls from the copied files
21
-
22
19
failflag=false
23
20
for j in ~ {sep=' ' test}
24
21
do
25
-
26
- # md5
27
22
md5sum ${j} > sum.txt
28
23
test_basename=" $( basename -- ${j} ) "
29
24
30
- # R
31
- cp ${j} .
32
- mv ${test_basename} " testcopy_${test_basename} "
33
-
34
25
for i in ~ {sep=' ' truth}
35
26
do
36
27
truth_basename=" $( basename -- ${i} ) "
28
+
29
+ # We assume the test file and truth file have the same basename
30
+ # Due to how WDL inputs work, they have a different absolute path
37
31
if [ " ${test_basename} " == " ${truth_basename} " ]; then
38
- # md5
39
32
actual_truth=" $i "
40
-
41
- # R
42
- cp ${i} .
43
- mv ${truth_basename} " truthcopy_${truth_basename} "
44
-
45
33
break
46
34
fi
47
35
done
48
36
49
- # md5
50
37
if ! echo " $( cut -f1 -d' ' sum.txt) " $actual_truth | md5sum --check
51
38
then
52
39
if ! ~ {exact}
53
40
then
54
- # R
55
41
echo " Calling Rscript to check for functional equivalence."
56
- if Rscript /opt/rough_equivalence_check.R testcopy_ $test_basename truthcopy_ $truth_basename ~ {tolerance}
42
+ if Rscript /opt/rough_equivalence_check.R $j $actual_truth ~ {tolerance}
57
43
then
58
44
echo " Outputs are not identical, but are mostly equivalent."
59
45
else
0 commit comments