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

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

added muscle sourcles amd makefile

File size: 1.1 KB
Line 
1#include "muscle.h"
2#include "distfunc.h"
3#include "seqvect.h"
4
5void DistPWScoreDist(const SeqVect &v, DistFunc &DF);
6
7void DistUnaligned(const SeqVect &v, DISTANCE DistMethod, DistFunc &DF)
8        {
9        const unsigned uSeqCount = v.Length();
10
11        switch (DistMethod)
12                {
13        case DISTANCE_Kmer6_6:
14                DistKmer6_6(v, DF);
15                break;
16
17        case DISTANCE_Kmer20_3:
18                DistKmer20_3(v, DF);
19                break;
20
21        case DISTANCE_Kmer20_4:
22                FastDistKmer(v, DF);
23                break;
24
25        case DISTANCE_Kbit20_3:
26                DistKbit20_3(v, DF);
27                break;
28
29        case DISTANCE_Kmer4_6:
30                DistKmer4_6(v, DF);
31                break;
32
33        case DISTANCE_PWKimura:
34                DistPWKimura(v, DF);
35                break;
36
37        case DISTANCE_PWScoreDist:
38                DistPWScoreDist(v, DF);
39                break;
40
41        default:
42                Quit("DistUnaligned, unsupported distance method %d", DistMethod);
43                }
44
45//      const char **SeqNames = (const char **) malloc(uSeqCount*sizeof(char *));
46        for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
47                {
48                const Seq &s = *(v[uSeqIndex]);
49
50                const char *ptrName = s.GetName();
51                unsigned uId = s.GetId();
52
53                DF.SetName(uSeqIndex, ptrName);
54                DF.SetId(uSeqIndex, uId);
55                }
56        }
Note: See TracBrowser for help on using the repository browser.