3 #include "textfile.h"
\r
8 if (g_pstrInFileName == 0 || g_pstrOutFileName == 0)
\r
9 Quit("-maketree requires -in <msa> and -out <treefile>");
\r
13 SetSeqWeightMethod(g_SeqWeight1);
\r
15 TextFile MSAFile(g_pstrInFileName);
\r
18 msa.FromFile(MSAFile);
\r
20 unsigned uSeqCount = msa.GetSeqCount();
\r
21 MSA::SetIdCount(uSeqCount);
\r
23 // Initialize sequence ids.
\r
24 // From this point on, ids must somehow propogate from here.
\r
25 for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
\r
26 msa.SetSeqId(uSeqIndex, uSeqIndex);
\r
27 SetMuscleInputMSA(msa);
\r
29 Progress("%u sequences", uSeqCount);
\r
32 TreeFromMSA(msa, tree, g_Cluster2, g_Distance2, g_Root2);
\r
34 TextFile TreeFile(g_pstrOutFileName, true);
\r
35 tree.ToFile(TreeFile);
\r
37 Progress("Tree created");
\r