Line | |
---|
1 | #include "muscle.h" |
---|
2 | #include "textfile.h" |
---|
3 | #include "msa.h" |
---|
4 | #include "objscore.h" |
---|
5 | #include "tree.h" |
---|
6 | #include "profile.h" |
---|
7 | |
---|
8 | void DoSP() |
---|
9 | { |
---|
10 | TextFile f(g_pstrSPFileName); |
---|
11 | |
---|
12 | MSA a; |
---|
13 | a.FromFile(f); |
---|
14 | |
---|
15 | ALPHA Alpha = ALPHA_Undefined; |
---|
16 | switch (g_SeqType) |
---|
17 | { |
---|
18 | case SEQTYPE_Auto: |
---|
19 | Alpha = a.GuessAlpha(); |
---|
20 | break; |
---|
21 | |
---|
22 | case SEQTYPE_Protein: |
---|
23 | Alpha = ALPHA_Amino; |
---|
24 | break; |
---|
25 | |
---|
26 | case SEQTYPE_DNA: |
---|
27 | Alpha = ALPHA_DNA; |
---|
28 | break; |
---|
29 | |
---|
30 | case SEQTYPE_RNA: |
---|
31 | Alpha = ALPHA_RNA; |
---|
32 | break; |
---|
33 | |
---|
34 | default: |
---|
35 | Quit("Invalid SeqType"); |
---|
36 | } |
---|
37 | SetAlpha(Alpha); |
---|
38 | a.FixAlpha(); |
---|
39 | |
---|
40 | SetPPScore(); |
---|
41 | |
---|
42 | const unsigned uSeqCount = a.GetSeqCount(); |
---|
43 | if (0 == uSeqCount) |
---|
44 | Quit("No sequences in input file %s", g_pstrSPFileName); |
---|
45 | |
---|
46 | MSA::SetIdCount(uSeqCount); |
---|
47 | for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex) |
---|
48 | a.SetSeqId(uSeqIndex, uSeqIndex); |
---|
49 | |
---|
50 | SetSeqWeightMethod(g_SeqWeight1); |
---|
51 | Tree tree; |
---|
52 | TreeFromMSA(a, tree, g_Cluster2, g_Distance2, g_Root2); |
---|
53 | SetMuscleTree(tree); |
---|
54 | SetMSAWeightsMuscle((MSA &) a); |
---|
55 | |
---|
56 | SCORE SP = ObjScoreSP(a); |
---|
57 | |
---|
58 | Log("File=%s;SP=%.4g\n", g_pstrSPFileName, SP); |
---|
59 | fprintf(stderr, "File=%s;SP=%.4g\n", g_pstrSPFileName, SP); |
---|
60 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.