source: branches/stable/GDE/MUSCLE/src/outweights.cpp

Last change on this file was 10390, checked in by aboeckma, 11 years ago

added muscle sourcles amd makefile

File size: 461 bytes
Line 
1#include "muscle.h"
2#include "msa.h"
3
4void OutWeights(const char *FileName, const MSA &msa)
5        {
6        FILE *f = fopen(FileName, "w");
7        if (0 == f)
8                Quit("Cannot open '%s'", FileName);
9        const unsigned uSeqCount = msa.GetSeqCount();
10        for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
11                {
12                const char *Id = msa.GetSeqName(uSeqIndex);
13                const WEIGHT w = msa.GetSeqWeight(uSeqIndex);
14                fprintf(f, "%s\t%.3g\n", Id, w);
15                }
16        fclose(f);
17        }
Note: See TracBrowser for help on using the repository browser.