本文整理汇总了C++中Seq::Eq方法的典型用法代码示例。如果您正苦于以下问题:C++ Seq::Eq方法的具体用法?C++ Seq::Eq怎么用?C++ Seq::Eq使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Seq
的用法示例。
在下文中一共展示了Seq::Eq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: MakeRootMSA
void MakeRootMSA(const SeqVect &v, const Tree &GuideTree, ProgNode Nodes[],
MSA &a)
{
#if TRACE
Log("MakeRootMSA Tree=");
GuideTree.LogMe();
#endif
const unsigned uSeqCount = v.GetSeqCount();
unsigned uColCount = uInsane;
unsigned uSeqIndex = 0;
const unsigned uTreeNodeCount = GuideTree.GetNodeCount();
const unsigned uRootNodeIndex = GuideTree.GetRootNodeIndex();
const PWPath &RootPath = Nodes[uRootNodeIndex].m_Path;
const unsigned uRootColCount = RootPath.GetEdgeCount();
const unsigned uEstringSize = uRootColCount + 1;
short *Estring1 = new short[uEstringSize];
short *Estring2 = new short[uEstringSize];
SetProgressDesc("Root alignment");
unsigned uTreeNodeIndex = GetFirstNodeIndex(GuideTree);
do
{
Progress(uSeqIndex, uSeqCount);
unsigned uId = GuideTree.GetLeafId(uTreeNodeIndex);
const Seq &s = *(v[uId]);
Seq sRootE;
short *es = MakeRootSeqE(s, GuideTree, uTreeNodeIndex, Nodes, sRootE,
Estring1, Estring2);
Nodes[uTreeNodeIndex].m_EstringL = EstringNewCopy(es);
#if VALIDATE
Seq sRoot;
MakeRootSeq(s, GuideTree, uTreeNodeIndex, Nodes, sRoot);
if (!sRoot.Eq(sRootE))
{
Log("sRoot=");
sRoot.LogMe();
Log("sRootE=");
sRootE.LogMe();
Quit("Root seqs differ");
}
#if TRACE
Log("MakeRootSeq=\n");
sRoot.LogMe();
#endif
#endif
if (uInsane == uColCount)
{
uColCount = sRootE.Length();
a.SetSize(uSeqCount, uColCount);
}
else
{
assert(uColCount == sRootE.Length());
}
a.SetSeqName(uSeqIndex, s.GetName());
a.SetSeqId(uSeqIndex, uId);
for (unsigned uColIndex = 0; uColIndex < uColCount; ++uColIndex)
a.SetChar(uSeqIndex, uColIndex, sRootE[uColIndex]);
++uSeqIndex;
uTreeNodeIndex = GetNextNodeIndex(GuideTree, uTreeNodeIndex);
}
while (NULL_NEIGHBOR != uTreeNodeIndex);
delete[] Estring1;
delete[] Estring2;
ProgressStepsDone();
assert(uSeqIndex == uSeqCount);
}