本文整理汇总了C++中Genome::getChild方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::getChild方法的具体用法?C++ Genome::getChild怎么用?C++ Genome::getChild使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::getChild方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createCallBack
void GappedSegmentIteratorIndelTest::createCallBack(AlignmentPtr alignment)
{
addIdenticalParentChild(alignment, 1, 20, 5);
Genome* parent = alignment->openGenome(alignment->getRootName());
Genome* child = parent->getChild(0);
TopSegmentIteratorPtr ti = child->getTopSegmentIterator();
BottomSegmentIteratorPtr bi = parent->getBottomSegmentIterator();
// int i = 0;
// bool reversed = true;
bi = parent->getBottomSegmentIterator(0);
makeDelGap(bi);
bi = parent->getBottomSegmentIterator(3);
makeDelGap(bi);
/*
ti = child->getTopSegmentIterator(1);
makeInsGap(ti);
ti = child->getTopSegmentIterator(21);
makeInsGap(ti);
ti = child->getTopSegmentIterator(28);
makeInsGap(ti);
*/
/* for (size_t i = 0; i < 20; ++i)
{
cout << i << ": ";
bi = parent->getBottomSegmentIterator(i);
ti = child->getTopSegmentIterator(i);
cout << "ci=" << bi->getBottomSegment()->getChildIndex(0)
<< " pi=" << ti->getTopSegment()->getParentIndex() << endl;
}*/
}
示例2: addIdenticalParentChild
void GappedSegmentSimpleIteratorTest2::createCallBack(AlignmentPtr alignment)
{
addIdenticalParentChild(alignment, 2, 100, 5);
Genome* parent = alignment->openGenome(alignment->getRootName());
Genome* child = parent->getChild(0);
TopSegmentIteratorPtr ti = child->getTopSegmentIterator();
BottomSegmentIteratorPtr bi = parent->getBottomSegmentIterator();
hal_index_t i = 0;
bool reversed = true;
while (ti != child->getTopSegmentEndIterator())
{
if (i % 5 == 0)
{
reversed = !reversed;
if (reversed && i < (hal_index_t)(parent->getNumBottomSegments() - 1))
{
makeInversion(ti, 5);
}
}
ti->toRight();
bi->toRight();
++i;
}
}