本文整理汇总了C++中CConstRef::GetSegs方法的典型用法代码示例。如果您正苦于以下问题:C++ CConstRef::GetSegs方法的具体用法?C++ CConstRef::GetSegs怎么用?C++ CConstRef::GetSegs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CConstRef
的用法示例。
在下文中一共展示了CConstRef::GetSegs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void x_ValidatePssmVsGi7450545(CConstRef<CSeq_align> sa, int hsp_num) {
BOOST_REQUIRE(sa->GetSegs().IsDenseg());
const CDense_seg & denseg = sa->GetSegs().GetDenseg();
if (hsp_num == 1)
{
// Validate the first HSP
pair<TSeqRange, TSeqRange> first_hsp =
make_pair(TSeqRange(24, 29), TSeqRange(245, 250));
TSeqRange hsp1_query = denseg.GetSeqRange(0);
TSeqRange hsp1_subj = denseg.GetSeqRange(1);
BOOST_REQUIRE_EQUAL(first_hsp.first.GetFrom(), hsp1_query.GetFrom());
BOOST_REQUIRE_EQUAL(first_hsp.first.GetTo(), hsp1_query.GetTo());
BOOST_REQUIRE_EQUAL(first_hsp.second.GetFrom(), hsp1_subj.GetFrom());
BOOST_REQUIRE_EQUAL(first_hsp.second.GetTo(), hsp1_subj.GetTo());
}
else if (hsp_num == 2)
{
// Validate the second HSP
const pair<TSeqRange, TSeqRange> second_hsp =
make_pair(TSeqRange(74, 86), TSeqRange(108, 120));
TSeqRange hsp2_query = denseg.GetSeqRange(0);
TSeqRange hsp2_subj = denseg.GetSeqRange(1);
BOOST_REQUIRE_EQUAL(second_hsp.first.GetFrom(), hsp2_query.GetFrom());
BOOST_REQUIRE_EQUAL(second_hsp.first.GetTo(), hsp2_query.GetTo());
BOOST_REQUIRE_EQUAL(second_hsp.second.GetFrom(), hsp2_subj.GetFrom());
BOOST_REQUIRE_EQUAL(second_hsp.second.GetTo(), hsp2_subj.GetTo());
}
}
示例2: hsp
void x_ValidatePssmVsGi129295(CConstRef<CSeq_align> sa) {
BOOST_REQUIRE(sa->GetSegs().IsDenseg());
const CDense_seg & denseg = sa->GetSegs().GetDenseg();
// Validate the first (and only) HSP, which is a self hit
const TSeqRange hsp(0, 231);
TSeqRange hsp1_query = denseg.GetSeqRange(0);
TSeqRange hsp1_subj = denseg.GetSeqRange(1);
BOOST_REQUIRE_EQUAL(hsp.GetFrom(), hsp1_query.GetFrom());
BOOST_REQUIRE_EQUAL(hsp.GetTo(), hsp1_query.GetTo());
BOOST_REQUIRE_EQUAL(hsp.GetFrom(), hsp1_subj.GetFrom());
BOOST_REQUIRE_EQUAL(hsp.GetTo(), hsp1_subj.GetTo());
}