-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRunAll.sh
executable file
·85 lines (85 loc) · 4.33 KB
/
RunAll.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
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
81
82
83
84
85
#!/bin/bash
#
DB="VDB_MT_ALL_REF.fa";
CACHE="50";
#
./MizaR.sh --install
#
rm -f sequences.txt
for(( x = 100 ; x <= 1000 ; x += 100 ));
do
#
./Simulate.sh $DB $x 50
#
./MizaR.sh --reads merged_reads.fq \
--database $DB --cache $CACHE --sim-reads 0.5 \
--fqzcomp --lzma --jarvis --threads 8 \
--similarity 50 --output compressed.mr
#
B_PERMUTATION=`cat report_permutations.txt | awk '{ print $1; }'`;
B_ORIGINAL_SIZE=`ls -la merged_reads.fq | awk '{ print $5; }'`;
#
B_NAMES_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Names | awk '{ print $4; }'`;
B_BASES_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Bases | awk '{ print $4; }'`;
B_QUALS_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Quals | awk '{ print $4; }'`;
B_NAMES_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Names | awk '{ print $4; }'`;
B_BASES_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Bases | awk '{ print $4; }'`;
B_QUALS_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Quals | awk '{ print $4; }'`;
#
B_TOTAL_ORIGINAL_LZMA=`ls -la merged_reads.fq.xz | awk '{ print $5; }'`;
B_TOTAL_SORTED_LZMA=`ls -la compressed.mr.xz | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_LZMA=`echo "$B_TOTAL_SORTED_LZMA + $B_PERMUTATION" | bc -l`;
#
B_TOTAL_ORIGINAL_JARVIS=`ls -la merged_reads.fq.tar | awk '{ print $5; }'`;
B_TOTAL_SORTED_JARVIS=`ls -la compressed.mr.tar | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_JARVIS=`echo "$B_TOTAL_SORTED_JARVIS + $B_PERMUTATION" | bc -l`;
#
B_TOTAL_ORIGINAL_FQZ=`ls -la merged_reads.fq.fqz | awk '{ print $5; }'`;
B_TOTAL_SORTED_FQZ=`ls -la compressed.mr.fqz | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_FQZ=`echo "$B_TOTAL_SORTED_FQZ + $B_PERMUTATION" | bc -l`;
#
printf "$x\t$B_ORIGINAL_SIZE\t$B_NAMES_ORIGINAL_FQZ\t$B_BASES_ORIGINAL_FQZ\t$B_QUALS_ORIGINAL_FQZ\t$B_NAMES_SORTED_FQZ\t$B_BASES_SORTED_FQZ\t$B_QUALS_SORTED_FQZ\t$B_PERMUTATION\t$B_TOTAL_ORIGINAL_FQZ\t$B_TOTAL_SORTED_FQZ\t$B_TOTAL_SORTED_PERMUTATION_FQZ\t$B_TOTAL_ORIGINAL_LZMA\t$B_TOTAL_SORTED_LZMA\t$B_TOTAL_SORTED_PERMUTATION_LZMA\t$B_TOTAL_ORIGINAL_JARVIS\t$B_TOTAL_SORTED_JARVIS\t$B_TOTAL_SORTED_PERMUTATION_JARVIS\n" >> sequences.txt
#
done
#
# ================================================
#
rm -f coverage.txt
for(( x = 1 ; x <= 100 ; x += 10 ));
do
#
./Simulate.sh $DB 500 $x
#
./MizaR.sh --reads merged_reads.fq \
--database $DB --cache $CACHE --sim-reads 0.5 \
--fqzcomp --lzma --jarvis --threads 8 \
--similarity 50 --output compressed.mr
#
B_PERMUTATION=`cat report_permutations.txt | awk '{ print $1; }'`;
B_ORIGINAL_SIZE=`ls -la merged_reads.fq | awk '{ print $5; }'`;
#
B_NAMES_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Names | awk '{ print $4; }'`;
B_BASES_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Bases | awk '{ print $4; }'`;
B_QUALS_ORIGINAL_FQZ=`cat report_original_fqz.txt | grep Quals | awk '{ print $4; }'`;
B_NAMES_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Names | awk '{ print $4; }'`;
B_BASES_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Bases | awk '{ print $4; }'`;
B_QUALS_SORTED_FQZ=`cat report_sorted_fqz.txt | grep Quals | awk '{ print $4; }'`;
#
B_TOTAL_ORIGINAL_LZMA=`ls -la merged_reads.fq.xz | awk '{ print $5; }'`;
B_TOTAL_SORTED_LZMA=`ls -la compressed.mr.xz | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_LZMA=`echo "$B_TOTAL_SORTED_LZMA + $B_PERMUTATION" | bc -l`;
#
B_TOTAL_ORIGINAL_JARVIS=`ls -la merged_reads.fq.tar | awk '{ print $5; }'`;
B_TOTAL_SORTED_JARVIS=`ls -la compressed.mr.tar | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_JARVIS=`echo "$B_TOTAL_SORTED_JARVIS + $B_PERMUTATION" | bc -l`;
#
B_TOTAL_ORIGINAL_FQZ=`ls -la merged_reads.fq.fqz | awk '{ print $5; }'`;
B_TOTAL_SORTED_FQZ=`ls -la compressed.mr.fqz | awk '{ print $5; }'`;
B_TOTAL_SORTED_PERMUTATION_FQZ=`echo "$B_TOTAL_SORTED_FQZ + $B_PERMUTATION" | bc -l`;
#
printf "$x\t$B_ORIGINAL_SIZE\t$B_NAMES_ORIGINAL_FQZ\t$B_BASES_ORIGINAL_FQZ\t$B_QUALS_ORIGINAL_FQZ\t$B_NAMES_SORTED_FQZ\t$B_BASES_SORTED_FQZ\t$B_QUALS_SORTED_FQZ\t$B_PERMUTATION\t$B_TOTAL_ORIGINAL_FQZ\t$B_TOTAL_SORTED_FQZ\t$B_TOTAL_SORTED_PERMUTATION_FQZ\t$B_TOTAL_ORIGINAL_LZMA\t$B_TOTAL_SORTED_LZMA\t$B_TOTAL_SORTED_PERMUTATION_LZMA\t$B_TOTAL_ORIGINAL_JARVIS\t$B_TOTAL_SORTED_JARVIS\t$B_TOTAL_SORTED_PERMUTATION_JARVIS\n" >> coverage.txt
#
done
#
# ================================================
#