本文整理汇总了C++中Alignment::position方法的典型用法代码示例。如果您正苦于以下问题:C++ Alignment::position方法的具体用法?C++ Alignment::position怎么用?C++ Alignment::position使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Alignment
的用法示例。
在下文中一共展示了Alignment::position方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: makePair
void makePair(Alignment& a, Alignment& b, Alignment& x, Alignment& y)
{
initMate(a, x);
initMate(b, y);
Feature spacer;
getSpacer(a, b, spacer);
int insert = a.Length + spacer.getLength() + b.Length;
// Add in mate pair info
x.MateRefID = b.RefID;
x.matePosition(b.position());
x.InsertSize = insert;
y.MateRefID = a.RefID;
y.matePosition(a.position());
y.InsertSize = -1 * insert;
// Update Mapping information appropriately
x.SetIsReverseStrand(a.IsReverseStrand());
x.SetIsMateReverseStrand(b.IsReverseStrand());
y.SetIsReverseStrand(b.IsReverseStrand());
y.SetIsMateReverseStrand(a.IsReverseStrand());
}
示例2: processGroupRange
void processGroupRange (GroupRange& range_a, GroupRange& range_b, int& valid_count)
{
Group::iterator a_it;
Group::iterator b_it;
for (a_it = range_a.first; a_it != range_a.second; ++a_it)
{
for (b_it = range_b.first; b_it != range_b.second; ++b_it)
{
Alignment a = a_it->second;
Alignment b = b_it->second;
// ensure 'a' is the most 5' alignment
if (b.position() < a.position())
{
std::swap(a, b);
}
if (isValidPair(a, b))
{
std::stringstream count_str;
count_str << valid_count;
Alignment x, y;
makePair(a, b, x, y);
x.Name += "-" + count_str.str();
y.Name += "-" + count_str.str();
ValidOut.SaveAlignment(x);
ValidOut.SaveAlignment(y);
valid_count++;
}
}
}
}
示例3: ElementsAre
TEST(CoverageTest, Coverage_add_alignment)
{
Alignment a;
a.RefName = "foo";
a.position(3);
CigarOp op;
a.CigarData.clear();
op.Type = 'M';
op.Length = 2;
a.CigarData.push_back(op);
op.Type = 'N';
op.Length = 3;
a.CigarData.push_back(op);
op.Type = 'M';
op.Length = 2;
a.CigarData.push_back(op);
Coverage c;
c.add(a);
EXPECT_THAT(c.coverages.find("foo")->second, ElementsAre(0, 0, 1, 1, 0, 0, 0, 1, 1));
}