Next version of JABA
[jabaws.git] / binaries / src / muscle / outweights.cpp
1 #include "muscle.h"\r
2 #include "msa.h"\r
3 \r
4 void OutWeights(const char *FileName, const MSA &msa)\r
5         {\r
6         FILE *f = fopen(FileName, "w");\r
7         if (0 == f)\r
8                 Quit("Cannot open '%s'", FileName);\r
9         const unsigned uSeqCount = msa.GetSeqCount();\r
10         for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)\r
11                 {\r
12                 const char *Id = msa.GetSeqName(uSeqIndex);\r
13                 const WEIGHT w = msa.GetSeqWeight(uSeqIndex);\r
14                 fprintf(f, "%s\t%.3g\n", Id, w);\r
15                 }\r
16         fclose(f);\r
17         }\r