本文整理汇总了C++中Genome::getParent方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::getParent方法的具体用法?C++ Genome::getParent怎么用?C++ Genome::getParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::getParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: copyFromTopAlignment
void copyFromTopAlignment(AlignmentConstPtr topAlignment,
AlignmentPtr mainAlignment, const string &genomeName)
{
Genome *mainReplacedGenome = mainAlignment->openGenome(genomeName);
const Genome *topReplacedGenome = topAlignment->openGenome(genomeName);
topReplacedGenome->copyTopDimensions(mainReplacedGenome);
topReplacedGenome->copyTopSegments(mainReplacedGenome);
mainReplacedGenome->fixParseInfo();
// Copy bot segments for the parent and top segments for the
// siblings of the genome that's being replaced
Genome *mainParent = mainReplacedGenome->getParent();
const Genome *topParent = topReplacedGenome->getParent();
topParent->copyBottomDimensions(mainParent);
topParent->copyBottomSegments(mainParent);
mainParent->fixParseInfo();
vector<string> siblings = mainAlignment->getChildNames(mainParent->getName());
for (size_t i = 0; i < siblings.size(); i++)
{
if (siblings[i] != genomeName)
{
Genome *mainChild = mainAlignment->openGenome(siblings[i]);
const Genome *topChild = topAlignment->openGenome(siblings[i]);
topChild->copyTopDimensions(mainChild);
topChild->copyTopSegments(mainChild);
mainChild->fixParseInfo();
}
}
}