-
Notifications
You must be signed in to change notification settings - Fork 0
/
usage-test.sh
executable file
·54 lines (49 loc) · 1.2 KB
/
usage-test.sh
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
#!/bin/bash
if [[ "$(uname)" == "Darwin" ]]; then
md5=md5
zcat=funzip
else
md5=md5sum
zcat=zcat
fi
set -x
set -e
set -o pipefail
# round trip
mxdx mux \
--file-map usage-test-files.tsv \
--batch 0 \
--batch-size 15 | \
mxdx demux \
--file-map usage-test-files.tsv \
--batch 0 \
--batch-size 15 \
--output-base usage-test \
--extension fna.gz
mxdx mux \
--file-map usage-test-files.tsv \
--batch 1 \
--batch-size 15 | \
mxdx demux \
--file-map usage-test-files.tsv \
--batch 1 \
--batch-size 15 \
--output-base usage-test \
--extension fna.gz
mxdx consolidate-partials \
--output-base usage-test \
--extension fna.gz
obs_foo=$(${zcat} usage-test/foo_r1.fasta.fna.gz | ${md5})
obs_bar=$(${zcat} usage-test/bar_r1.fasta.fna.gz | ${md5})
exp_foo=$(cat mxdx/tests/test_data/foo_r1.fasta | ${md5})
exp_bar=$(cat mxdx/tests/test_data/bar_r1.fasta | ${md5})
if [[ ${obs_foo} != ${exp_foo} ]]; then
echo ${obs_foo}
echo ${exp_foo}
exit 1
fi
if [[ ${obs_bar} != ${exp_bar} ]]; then
echo ${obs_bar}
echo ${exp_bar}
exit 1
fi