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()); } }
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()); }