2 #include "distfunc.h"
\r
7 void DistPWKimura(const SeqVect &v, DistFunc &DF)
\r
9 SEQWEIGHT SeqWeightSave = GetSeqWeightMethod();
\r
10 SetSeqWeightMethod(SEQWEIGHT_Henikoff);
\r
12 const unsigned uSeqCount = v.Length();
\r
13 DF.SetCount(uSeqCount);
\r
15 const unsigned uPairCount = (uSeqCount*(uSeqCount + 1))/2;
\r
16 unsigned uCount = 0;
\r
17 SetProgressDesc("PWKimura distance");
\r
18 for (unsigned uSeqIndex1 = 0; uSeqIndex1 < uSeqCount; ++uSeqIndex1)
\r
20 const Seq &s1 = v.GetSeq(uSeqIndex1);
\r
23 for (unsigned uSeqIndex2 = 0; uSeqIndex2 < uSeqIndex1; ++uSeqIndex2)
\r
26 Progress(uCount, uPairCount);
\r
28 const Seq &s2 = v.GetSeq(uSeqIndex2);
\r
34 AlignTwoMSAs(msa1, msa2, msaOut, Path, false, false);
\r
36 double dPctId = msaOut.GetPctIdentityPair(0, 1);
\r
37 float f = (float) KimuraDist(dPctId);
\r
39 DF.SetDist(uSeqIndex1, uSeqIndex2, f);
\r
42 ProgressStepsDone();
\r
44 SetSeqWeightMethod(SeqWeightSave);
\r