本文整理汇总了C++中Genome::setString方法的典型用法代码示例。如果您正苦于以下问题:C++ Genome::setString方法的具体用法?C++ Genome::setString怎么用?C++ Genome::setString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Genome
的用法示例。
在下文中一共展示了Genome::setString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: createCallBack
void GenomeStringTest::createCallBack(Alignment *alignment) {
hal_size_t alignmentSize = alignment->getNumGenomes();
CuAssertTrue(_testCase, alignmentSize == 0);
hal_size_t seqLength = 28889943;
Genome *ancGenome = alignment->addRootGenome("AncGenome", 0);
vector<Sequence::Info> seqVec(1);
seqVec[0] = Sequence::Info("Sequence", seqLength, 5000, 700000);
ancGenome->setDimensions(seqVec);
_string = randomString(seqLength);
ancGenome->setString(_string);
}
示例2: createCallBack
void MappedSegmentMapDupeTest::createCallBack(AlignmentPtr alignment)
{
vector<Sequence::Info> seqVec(1);
BottomSegmentIteratorPtr bi;
BottomSegmentStruct bs;
TopSegmentIteratorPtr ti;
TopSegmentStruct ts;
// setup simple case were there is an edge from a parent to
// child and it is reversed
Genome* parent = alignment->addRootGenome("parent");
Genome* child1 = alignment->addLeafGenome("child1", "parent", 1);
Genome* child2 = alignment->addLeafGenome("child2", "parent", 1);
seqVec[0] = Sequence::Info("Sequence", 3, 0, 1);
parent->setDimensions(seqVec);
seqVec[0] = Sequence::Info("Sequence", 9, 3, 0);
child1->setDimensions(seqVec);
seqVec[0] = Sequence::Info("Sequence", 9, 3, 0);
child2->setDimensions(seqVec);
parent->setString("CCC");
child1->setString("CCCTACGTG");
child2->setString("CCCTACGTG");
bi = parent->getBottomSegmentIterator();
bs.set(0, 3);
bs._children.push_back(pair<hal_size_t, bool>(0, true));
bs._children.push_back(pair<hal_size_t, bool>(0, false));
bs.applyTo(bi);
ti = child1->getTopSegmentIterator();
ts.set(0, 3, 0, true, NULL_INDEX, 1);
ts.applyTo(ti);
ti->toRight();
ts.set(3, 3, 0, true, NULL_INDEX, 2);
ts.applyTo(ti);
ti->toRight();
ts.set(6, 3, 0, true, NULL_INDEX, 0);
ts.applyTo(ti);
ti = child2->getTopSegmentIterator();
ts.set(0, 3, 0, false);
ts.applyTo(ti);
ti->toRight();
ts.set(3, 3, NULL_INDEX, true);
ts.applyTo(ti);
ti->toRight();
ts.set(6, 3, NULL_INDEX, false);
ts.applyTo(ti);
}