-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathcmd_bench.cpp
More file actions
92 lines (81 loc) · 2 KB
/
cmd_bench.cpp
File metadata and controls
92 lines (81 loc) · 2 KB
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
#include "muscle.h"
#include "bench.h"
#include "m3alnparams.h"
void cmd_bench()
{
M3AlnParams AP;
AP.SetFromCmdLine(false);
Bench B;
string RefDir = opt(refdir);
Dirize(RefDir);
B.Load(g_Arg1, RefDir);
B.m_ShowProgress = true;
uint MSACount = SIZE(B.m_Inputs);
optset_quiet = true;
opt_quiet = true;
B.Run(AP);
B.TCsToFile(opt(tsvout));
optset_quiet = false;
opt_quiet = false;
ProgressLog("AvgQ=%.3f AvgTC=%.3f N=%u\n",
B.m_MeanQ, B.m_MeanTC, MSACount);
}
void cmd_bench_blosums()
{
Bench B;
string RefDir = opt(refdir);
Dirize(RefDir);
B.Load(g_Arg1, RefDir);
B.m_ShowProgress = true;
uint MSACount = SIZE(B.m_Inputs);
FILE *fTsv = CreateStdioFile(opt(tsvout));
optset_quiet = true;
opt_quiet = true;
if (fTsv != 0)
{
fprintf(fTsv, "BLOSUM");
fprintf(fTsv, "\tParamSet");
fprintf(fTsv, "\tQ");
fprintf(fTsv, "\tTC");
fprintf(fTsv, "\tPerturbSeed");
fprintf(fTsv, "\tDelta");
fprintf(fTsv, "\n");
}
for (uint PerturbSeed = 0; PerturbSeed < 6; ++PerturbSeed)
{
float Delta = 0.05f*PerturbSeed;
for (uint k = 0; k < 4; ++k)
{
uint PctId = UINT_MAX;
switch (k)
{
case 0: PctId = 90; break;
case 1: PctId = 80; break;
case 2: PctId = 70; break;
case 3: PctId = 62; break;
}
for (uint n = 0; n < 4; ++n)
{
M3AlnParams AP;
AP.SetBlosum(PctId, n, FLT_MAX, FLT_MAX,
PerturbSeed, Delta, Delta, Delta, true);
B.Run(AP);
printf("BLOSUM%u:%u perturb=%u delta=%7.3g AvgQ=%.4f AvgTC=%.4f N=%u\n",
PctId, n, PerturbSeed, Delta, B.m_MeanQ, B.m_MeanTC, MSACount);
Log("BLOSUM%u:%u perturb=%u delta=%7.3g AvgQ=%.4f AvgTC=%.4f N=%u\n",
PctId, n, PerturbSeed, Delta, B.m_MeanQ, B.m_MeanTC, MSACount);
if (fTsv != 0)
{
fprintf(fTsv, "%u", PctId);
fprintf(fTsv, "\t%u", n);
fprintf(fTsv, "\t%.5f", B.m_MeanQ);
fprintf(fTsv, "\t%.5f", B.m_MeanTC);
fprintf(fTsv, "\t%u", PerturbSeed);
fprintf(fTsv, "\t%.3g", Delta);
fprintf(fTsv, "\n");
}
}
}
}
CloseStdioFile(fTsv);
}