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