本文整理汇总了C++中PWPath::FromStr方法的典型用法代码示例。如果您正苦于以下问题:C++ PWPath::FromStr方法的具体用法?C++ PWPath::FromStr怎么用?C++ PWPath::FromStr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PWPath
的用法示例。
在下文中一共展示了PWPath::FromStr方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SPTest
void SPTest()
{
SetPPScore(PPSCORE_SV);
SetListFileName("c:\\tmp\\muscle.log", false);
TextFile file1("c:\\tmp\\msa1.afa");
TextFile file2("c:\\tmp\\msa2.afa");
MSA msa1;
MSA msa2;
msa1.FromFile(file1);
msa2.FromFile(file2);
Log("msa1=\n");
msa1.LogMe();
Log("msa2=\n");
msa2.LogMe();
const unsigned uColCount = msa1.GetColCount();
if (msa2.GetColCount() != uColCount)
Quit("Different lengths");
const unsigned uSeqCount1 = msa1.GetSeqCount();
const unsigned uSeqCount2 = msa2.GetSeqCount();
const unsigned uSeqCount = uSeqCount1 + uSeqCount2;
MSA::SetIdCount(uSeqCount);
for (unsigned uSeqIndex1 = 0; uSeqIndex1 < uSeqCount1; ++uSeqIndex1)
{
msa1.SetSeqWeight(uSeqIndex1, 1.0);
msa1.SetSeqId(uSeqIndex1, uSeqIndex1);
}
for (unsigned uSeqIndex2 = 0; uSeqIndex2 < uSeqCount2; ++uSeqIndex2)
{
msa2.SetSeqWeight(uSeqIndex2, 1.0);
msa2.SetSeqId(uSeqIndex2, uSeqCount1 + uSeqIndex2);
}
MSA alnA;
MSA alnB;
char strPathA[1024];
char strPathB[1024];
MakePath(uColCount, INDELS, strPathA);
MakePath(uColCount, INDELS, strPathB);
PWPath PathA;
PWPath PathB;
PathA.FromStr(strPathA);
PathB.FromStr(strPathB);
Log("PathA=\n");
PathA.LogMe();
Log("PathB=\n");
PathB.LogMe();
AlignTwoMSAsGivenPath(PathA, msa1, msa2, alnA);
AlignTwoMSAsGivenPath(PathB, msa1, msa2, alnB);
for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
{
alnA.SetSeqWeight(uSeqIndex, 1.0);
alnB.SetSeqWeight(uSeqIndex, 1.0);
}
unsigned Seqs1[1024];
unsigned Seqs2[1024];
for (unsigned uSeqIndex1 = 0; uSeqIndex1 < uSeqCount1; ++uSeqIndex1)
Seqs1[uSeqIndex1] = uSeqIndex1;
for (unsigned uSeqIndex2 = 0; uSeqIndex2 < uSeqCount2; ++uSeqIndex2)
Seqs2[uSeqIndex2] = uSeqCount1 + uSeqIndex2;
MSA msaA1;
MSA msaA2;
MSA msaB1;
MSA msaB2;
MSAFromSeqSubset(alnA, Seqs1, uSeqCount1, msaA1);
MSAFromSeqSubset(alnB, Seqs1, uSeqCount1, msaB1);
MSAFromSeqSubset(alnA, Seqs2, uSeqCount2, msaA2);
MSAFromSeqSubset(alnB, Seqs2, uSeqCount2, msaB2);
for (unsigned uSeqIndex1 = 0; uSeqIndex1 < uSeqCount1; ++uSeqIndex1)
{
msaA1.SetSeqWeight(uSeqIndex1, 1.0);
msaB1.SetSeqWeight(uSeqIndex1, 1.0);
}
for (unsigned uSeqIndex2 = 0; uSeqIndex2 < uSeqCount2; ++uSeqIndex2)
{
msaA2.SetSeqWeight(uSeqIndex2, 1.0);
msaB2.SetSeqWeight(uSeqIndex2, 1.0);
}
Log("msaA1=\n");
//.........这里部分代码省略.........