forked from shenwei356/seqkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_benchmark_03_sampling.sh
executable file
·99 lines (68 loc) · 1.79 KB
/
run_benchmark_03_sampling.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
echo Test: C\) Sampling by number
echo Output sequences of all apps are not wrapped to fixed length.
function check() {
seqkit stat $1
md5sum $1
/bin/rm $1
}
n=10000
for f in dataset_A.fa; do
echo read file once with cat
cat $f > /dev/null
echo == seqkit
echo data: $f;
out=$f.sample.seqkit.fa
memusg -t -H seqkit sample -2 -n $n $f -w 0 > $out
check $out
echo == seqmagick
echo data: $f;
out=$f.sample.seqmagick.fa
memusg -t -H seqmagick convert --line-wrap 0 --sample $n $f - > $out
check $out
echo == seqtk
echo data: $f;
out=$f.sample.seqtk.fa
memusg -t -H seqtk sample -2 $f $n > $out;
check $out
done
n=20
for f in dataset_B.fa; do
echo read file once with cat
cat $f > /dev/null
echo == seqkit
echo data: $f;
out=$f.sample.seqkit.fa
memusg -t -H seqkit sample -2 -n $n $f -w 0 > $out
check $out
echo == seqmagick
echo data: $f;
out=$f.sample.seqmagick.fa
memusg -t -H seqmagick convert --line-wrap 0 --sample $n $f - > $out
check $out
echo == seqtk
echo data: $f;
out=$f.sample.seqtk.fa
memusg -t -H seqtk sample -2 $f $n > $out;
check $out
done
n=1000000
for f in dataset_C.fq; do
echo read file once with cat
cat $f > /dev/null
echo == seqkit
echo data: $f;
out=$f.sample.seqkit.fa
memusg -t -H seqkit sample -2 -n $n $f -w 0 > $out
check $out
echo == seqmagick
echo data: $f;
out=$f.sample.seqmagick.fa
memusg -t -H seqmagick convert --line-wrap 0 --sample $n $f - > $out
check $out
echo == seqtk
echo data: $f;
out=$f.sample.seqtk.fa
memusg -t -H seqtk sample -2 $f $n > $out;
check $out
done