107 arg_desc->AddFlag(
"debug_mode",
108 "Debugging mode writes errors seen for each test" );
116 if (args[
"debug_mode"]) {
124 BOOST_CHECK(
expected.Equals(propagated));
171 return make_tuple(entry, align, seq1, seq2, seq3);
187 return make_tuple(bsh1,bsh2,bsh3, scope);
193 loc->
SetInt().SetFrom(from);
195 loc->
SetInt().SetId().Assign(
id);
196 if (is_minus_strand) {
207 loc1->
SetInt().SetFrom(from1);
208 loc1->
SetInt().SetTo(to1);
209 loc1->
SetInt().SetId().Assign(
id);
210 loc1->
SetInt().SetStrand(strand);
213 loc2->
SetInt().SetFrom(from2);
214 loc2->
SetInt().SetTo(to2);
215 loc2->
SetInt().SetId().Assign(
id);
216 loc2->
SetInt().SetStrand(strand);
219 loc->
SetMix().AddSeqLoc(*loc1);
220 loc->
SetMix().AddSeqLoc(*loc2);
229 loc1->
SetInt().SetFrom(from1);
230 loc1->
SetInt().SetTo(to1);
231 loc1->
SetInt().SetId().Assign(
id);
232 loc1->
SetInt().SetStrand(strand);
238 loc3->
SetInt().SetFrom(from2);
239 loc3->
SetInt().SetTo(to2);
240 loc3->
SetInt().SetId().Assign(
id);
241 loc3->
SetInt().SetStrand(strand);
244 loc->
SetMix().AddSeqLoc(*loc1);
245 loc->
SetMix().AddSeqLoc(*loc2);
246 loc->
SetMix().AddSeqLoc(*loc3);
255 loc->
SetPnt().SetPoint(pos);
256 loc->
SetPnt().SetId().Assign(
id);
271 cbr->
SetLoc().Assign(*subloc);
272 cds->
SetData().SetCdregion().SetCode_break().push_back(cbr);
285 trna->
SetData().SetRna().SetExt().SetTRNA().SetAnticodon().Assign(*subloc);
290 void TestCds(
bool loc_partial5,
bool loc_partial3)
292 size_t front_insert = 5;
310 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
316 BOOST_CHECK_EQUAL(listener.
Count(), 0);
320 edit::CFeaturePropagator propagator2(bsh1, bsh3, *align,
false,
false,
true,
true, &listener);
326 BOOST_CHECK_EQUAL(listener.
Count(), 0);
336 size_t front_insert = 5;
356 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
357 CRef<CSeq_loc> expected_subloc1 =
CreateLoc(3+front_insert, 5+front_insert, id2, subloc_partial5, subloc_partial3);
361 BOOST_CHECK_EQUAL(listener.
Count(), 0);
365 edit::CFeaturePropagator propagator2(bsh1, bsh3, *align,
false,
false,
true,
true, &listener);
366 CRef<CSeq_loc> expected_subloc2 =
CreateLoc(3+front_insert*2, 5+front_insert*2, id3, subloc_partial5, subloc_partial3);
370 BOOST_CHECK_EQUAL(listener.
Count(), 0);
378 size_t front_insert = 5;
396 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
402 BOOST_CHECK_EQUAL(listener.
Count(), 0);
406 edit::CFeaturePropagator propagator2(bsh3, bsh2, *align,
false,
false,
true,
true, &listener);
412 BOOST_CHECK_EQUAL(listener.
Count(), 0);
420 size_t front_insert = 5;
440 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
443 BOOST_CHECK_EQUAL(listener.
Count(), 1);
445 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetCode(), edit::CFeaturePropagator::eFeaturePropagationProblem_CodeBreakLocation);
449 edit::CFeaturePropagator propagator2(bsh3, bsh2, *align,
false,
false,
true,
true, &listener);
452 BOOST_CHECK_EQUAL(listener.
Count(), 1);
454 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetCode(), edit::CFeaturePropagator::eFeaturePropagationProblem_CodeBreakLocation);
462 size_t front_insert = 5;
482 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
483 CRef<CSeq_loc> expected_subloc1 =
CreateLoc(3+front_insert, 5+front_insert, id2, subloc_partial5, subloc_partial3);
487 BOOST_CHECK_EQUAL(listener.
Count(), 0);
491 edit::CFeaturePropagator propagator2(bsh1, bsh3, *align,
false,
false,
true,
true, &listener);
492 CRef<CSeq_loc> expected_subloc2 =
CreateLoc(3+front_insert*2, 5+front_insert*2, id3, subloc_partial5, subloc_partial3);
496 BOOST_CHECK_EQUAL(listener.
Count(), 0);
504 size_t front_insert = 5;
524 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
527 BOOST_CHECK_EQUAL(listener.
Count(), 1);
529 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetCode(), edit::CFeaturePropagator::eFeaturePropagationProblem_AnticodonLocation);
533 edit::CFeaturePropagator propagator2(bsh3, bsh2, *align,
false,
false,
true,
true, &listener);
536 BOOST_CHECK_EQUAL(listener.
Count(), 1);
538 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetCode(), edit::CFeaturePropagator::eFeaturePropagationProblem_AnticodonLocation);
546 size_t front_insert = 5;
564 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
566 BOOST_CHECK(new_feat1.
IsNull());
574 size_t front_insert = 5;
592 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
599 BOOST_CHECK_EQUAL(listener.
Count(), 0);
607 size_t front_insert = 5;
624 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
628 BOOST_CHECK_EQUAL(listener.
Count(), 0);
636 size_t front_insert = 5;
654 denseg.
SetLens().push_back(30);
662 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
677 BOOST_CHECK_EQUAL(listener.
Count(), 0);
684 size_t front_insert = 5;
702 denseg.
SetLens().push_back(30);
710 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
725 BOOST_CHECK_EQUAL(listener.
Count(), 0);
732 size_t front_insert = 5;
750 denseg.
SetLens().push_back(30);
758 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
762 BOOST_CHECK_EQUAL(listener.
Count(), 0);
769 size_t front_insert = 5;
787 denseg.
SetLens().push_back(10);
788 denseg.
SetLens().push_back(10);
789 denseg.
SetLens().push_back(10);
803 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
808 BOOST_CHECK_EQUAL(listener.
Count(), 0);
815 size_t front_insert = 5;
833 denseg.
SetLens().push_back(10);
834 denseg.
SetLens().push_back(10);
835 denseg.
SetLens().push_back(10);
849 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
false,
true, &listener);
853 BOOST_CHECK_EQUAL(listener.
Count(), 0);
860 size_t front_insert = 5;
878 denseg.
SetLens().push_back(10);
879 denseg.
SetLens().push_back(10);
880 denseg.
SetLens().push_back(10);
894 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
false,
true, &listener);
898 BOOST_CHECK_EQUAL(listener.
Count(), 0);
905 size_t front_insert = 5;
923 denseg.
SetLens().push_back(10);
924 denseg.
SetLens().push_back(10);
925 denseg.
SetLens().push_back(10);
939 edit::CFeaturePropagator propagator1(bsh2, bsh1, *align,
false,
false,
false,
false, &listener);
944 BOOST_CHECK_EQUAL(listener.
Count(), 0);
951 size_t front_insert = 5;
967 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
971 BOOST_CHECK_EQUAL(listener.
Count(), 0);
979 size_t front_insert = 5;
1001 denseg.
SetLens().push_back(20);
1002 denseg.
SetLens().push_back(20);
1003 denseg.
SetLens().push_back(20);
1017 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
false,
true, &listener);
1021 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1031 size_t front_insert = 5;
1049 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
1053 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1061 size_t front_insert = 5;
1079 edit::CFeaturePropagator propagator1(bsh3, bsh1, *align,
false,
false,
true,
true, &listener);
1081 BOOST_CHECK(new_feat1.
IsNull());
1089 size_t front_insert = 5;
1107 denseg.
SetLens().push_back(30);
1115 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
false, &listener);
1119 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1126 size_t front_insert = 5;
1144 denseg.
SetLens().push_back(30);
1152 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
false, &listener);
1157 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1164 size_t front_insert = 5;
1182 denseg.
SetLens().push_back(30);
1190 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
false, &listener);
1194 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1202 string str1 =
"TCACTCTTTGAAAAAAAAAA";
1207 seq1->
SetSeq().
SetInst().SetSeq_data().SetIupacna().Set(str1);
1213 string str2 =
"TCACTGAAAAAAAAAA";
1218 seq2->
SetSeq().
SetInst().SetSeq_data().SetIupacna().Set(str2);
1225 align->
SetType(objects::CSeq_align::eType_global);
1227 align->
SetSegs().SetDenseg().SetIds().push_back(id1);
1228 align->
SetSegs().SetDenseg().SetIds().push_back(id2);
1230 auto& denseg = align->
SetSegs().SetDenseg();
1231 denseg.SetNumseg(3);
1232 denseg.SetLens().push_back(5);
1233 denseg.SetLens().push_back(4);
1234 denseg.SetLens().push_back(11);
1236 denseg.SetStarts().push_back(0);
1237 denseg.SetStarts().push_back(0);
1238 denseg.SetStarts().push_back(5);
1239 denseg.SetStarts().push_back(-1);
1240 denseg.SetStarts().push_back(9);
1241 denseg.SetStarts().push_back(5);
1244 annot->
SetData().SetAlign().push_back(align);
1260 edit::CFeaturePropagator propagator1(bsh1, bsh2, *align,
false,
false,
true,
true, &listener);
1262 BOOST_CHECK(new_feat.
IsNull());
1263 BOOST_CHECK_EQUAL(listener.
Count(), 1);
1329 bool stop_at_stop,
bool fix_partials,
1344 edit::CFeaturePropagator propagator(src, *
b, *align, stop_at_stop, fix_partials,
true,
true, &listener);
1349 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1361 string before = na.substr(0, pos);
1362 string after = na.substr(pos + 3);
1363 na = before +
"TAA" + after;
1364 seq.
SetInst().SetSeq_data().SetIupacna().Set(na);
1370 size_t front_insert = 5;
1379 vector<CRef<CSeq_loc> > expected_loc;
1382 loc1->
SetInt().SetFrom(front_insert);
1383 loc1->
SetInt().SetTo(15 + front_insert);
1384 loc1->
SetInt().SetId().SetLocal().SetStr(
"good2");
1387 expected_loc.push_back(loc1);
1390 loc2->
SetInt().SetFrom(front_insert * 2);
1391 loc2->
SetInt().SetTo(15 + front_insert * 2);
1392 loc2->
SetInt().SetId().SetLocal().SetStr(
"good3");
1395 expected_loc.push_back(loc2);
1419 loc1->
SetInt().SetTo(15 + front_insert + 8);
1420 loc2->
SetInt().SetTo(15 + 2 * front_insert + 8);
1441 loc1->
SetInt().SetTo(15 + front_insert - 4);
1442 loc2->
SetInt().SetTo(15 + 2 * front_insert - 4);
1456 denseg.
SetLens().push_back(front_insert);
1457 denseg.
SetLens().push_back(front_insert);
1458 denseg.
SetLens().push_back(60);
1465 denseg.
SetStarts().push_back(front_insert);
1467 denseg.
SetStarts().push_back(front_insert);
1468 denseg.
SetStarts().push_back(front_insert * 2);
1475 size_t front_insert = 10;
1505 edit::CFeaturePropagator propagator1(src, *
b, *align,
false,
false,
true,
true, &listener);
1506 vector<CRef<CSeq_feat> > first_feats = propagator1.PropagateAll();
1507 BOOST_CHECK_EQUAL(first_feats.size(), 1);
1508 BOOST_CHECK_EQUAL(listener.
Count(), 2);
1509 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good3:1-20 to lcl|good1");
1510 BOOST_CHECK_EQUAL(listener.
GetMessage(1).
GetText(),
"Unable to propagate location of feature lcl|good3:1-10 to lcl|good1");
1514 edit::CFeaturePropagator propagator2(src, *
b, *align,
false,
false,
true,
true, &listener);
1515 vector<CRef<CSeq_feat> > second_feats = propagator2.PropagateAll();
1516 BOOST_CHECK_EQUAL(second_feats.size(), 2);
1517 BOOST_CHECK_EQUAL(listener.
Count(), 1);
1518 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good3:1-10 to lcl|good2");
1523 size_t front_insert = 10;
1553 edit::CFeaturePropagator propagator1(src, *
b, *align,
false,
false,
true,
true, &listener);
1554 vector<CConstRef<CSeq_feat> > failures1;
1555 vector<CRef<CSeq_feat> > first_feats = propagator1.PropagateAllReportFailures(failures1);
1556 BOOST_CHECK_EQUAL(first_feats.size(), 1);
1557 BOOST_CHECK_EQUAL(listener.
Count(), 2);
1558 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good3:1-20 to lcl|good1");
1559 BOOST_CHECK_EQUAL(listener.
GetMessage(1).
GetText(),
"Unable to propagate location of feature lcl|good3:1-10 to lcl|good1");
1563 edit::CFeaturePropagator propagator2(src, *
b, *align,
false,
false,
true,
true, &listener);
1564 vector<CConstRef<CSeq_feat> > failures2;
1565 vector<CRef<CSeq_feat> > second_feats = propagator2.PropagateAllReportFailures(failures2);
1566 BOOST_CHECK_EQUAL(second_feats.size(), 2);
1567 BOOST_CHECK_EQUAL(listener.
Count(), 1);
1568 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good3:1-10 to lcl|good2");
1574 for (
CFeat_CI feat_it(entry); feat_it; ++feat_it) {
1575 if (feat_it->IsSetId()) {
1576 const CFeat_id& feat_id = feat_it->GetId();
1587 size_t front_insert = 5;
1595 main_loc->
SetInt().SetFrom(0);
1596 main_loc->
SetInt().SetTo(15);
1597 main_loc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1600 subloc->
SetInt().SetFrom(3);
1601 subloc->
SetInt().SetTo(5);
1602 subloc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1605 gene->
SetData().SetGene().SetLocus(
"gene locus");
1606 gene->
SetId().SetLocal().SetId(++feat_id);
1611 mrna->
SetId().SetLocal().SetId(++feat_id);
1615 cds_withoutprot->
SetComment(
"CDS without product");
1616 cds_withoutprot->
SetData().SetCdregion();
1617 cds_withoutprot->
SetId().SetLocal().SetId(++feat_id);
1618 cds_withoutprot->
SetLocation().SetInt().SetFrom(10);
1619 cds_withoutprot->
SetLocation().SetInt().SetTo(25);
1620 cds_withoutprot->
SetLocation().SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1623 cds_withprot->
SetComment(
"CDS with product");
1624 cds_withprot->
SetData().SetCdregion();
1625 cds_withprot->
SetId().SetLocal().SetId(++feat_id);
1632 prot_entry->
SetSeq().
SetInst().SetSeq_data().SetIupacaa().Set(
"-WPKL");
1635 const string prot_id =
"good1_1";
1637 id->SetLocal().SetStr(prot_id);
1645 prot_feat->
SetData().SetProt().SetName().push_back(
"hypothetical protein");
1649 prot_feat->
SetId().SetLocal().SetId(++feat_id);
1652 cds_withprot->
SetProduct().SetWhole().SetLocal().SetStr(prot_id);
1656 set->SetSeq_set().push_back(
first);
1657 set->SetSeq_set().push_back(prot_entry);
1685 BOOST_CHECK(feat_id == 5);
1686 BOOST_TEST_MESSAGE(
"A set containing " +
NStr::IntToString(feat_id) +
" five features");
1695 for (; cds_it; ++cds_it) {
1706 BOOST_CHECK(!gene.
IsNull());
1707 BOOST_CHECK(!mrna.
IsNull());
1708 BOOST_CHECK(!cds_withoutprot.
IsNull());
1709 BOOST_CHECK(!cds_withprot.
IsNull());
1710 BOOST_CHECK(!protein.
IsNull());
1714 BOOST_CHECK(!align.
IsNull());
1717 BOOST_CHECK(maxFeatId == feat_id);
1725 BOOST_TEST_MESSAGE(
"Propagating to the second sequence");
1727 edit::CFeaturePropagator propagator1(src_bseq, target_bseq1, *align,
true,
true,
true,
true, &listener, &maxFeatId);
1730 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1731 BOOST_CHECK(propagated_gene1->
IsSetId());
1735 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1736 BOOST_CHECK(propagated_mrna1->
IsSetId());
1739 CRef<CSeq_feat> propagated_cds_woprot1 = propagator1.Propagate(*cds_withoutprot);
1740 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1742 BOOST_CHECK(propagated_cds_woprot1->
IsSetId());
1745 CRef<CSeq_feat> propagated_cds_wprot1 = propagator1.Propagate(*cds_withprot);
1746 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1748 BOOST_CHECK(propagated_cds_wprot1->
IsSetId());
1751 CRef<CSeq_feat> propagated_prot1 = propagator1.ConstructProteinFeatureForPropagatedCodingRegion(*cds_withprot, *propagated_cds_wprot1);
1752 BOOST_CHECK(propagated_prot1->
IsSetId());
1756 BOOST_TEST_MESSAGE(
"Propagating to the third sequence");
1757 edit::CFeaturePropagator propagator2(src_bseq, target_bseq2, *align,
true,
true,
true,
true, &listener, &maxFeatId);
1759 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1760 BOOST_CHECK(propagated_gene2->
IsSetId());
1764 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1765 BOOST_CHECK(propagated_mrna2->
IsSetId());
1769 CRef<CSeq_feat> propagated_cds_woprot2 = propagator2.Propagate(*cds_withoutprot);
1770 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1772 BOOST_CHECK(propagated_cds_woprot2->
IsSetId());
1775 CRef<CSeq_feat> propagated_cds_wprot2 = propagator2.Propagate(*cds_withprot);
1776 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1778 BOOST_CHECK(propagated_cds_wprot2->
IsSetId());
1781 CRef<CSeq_feat> propagated_prot2 = propagator2.ConstructProteinFeatureForPropagatedCodingRegion(*cds_withprot, *propagated_cds_wprot2);
1782 BOOST_CHECK(propagated_prot2->
IsSetId());
1794 BOOST_CHECK(feat_id == 5);
1795 BOOST_TEST_MESSAGE(
"A set containing " +
NStr::IntToString(feat_id) +
" five features");
1804 for (; cds_it; ++cds_it) {
1815 BOOST_CHECK(!gene.
IsNull());
1816 BOOST_CHECK(!mrna.
IsNull());
1817 BOOST_CHECK(!cds_withoutprot.
IsNull());
1818 BOOST_CHECK(!cds_withprot.
IsNull());
1819 BOOST_CHECK(!protein.
IsNull());
1823 BOOST_CHECK(!align.
IsNull());
1826 BOOST_CHECK(maxFeatId == feat_id);
1834 edit::CFeaturePropagator propagator(src_bseq, target_bseq, *align,
true,
true,
true,
true, &listener, &maxFeatId);
1835 vector<CRef<CSeq_feat>> propagated_feats = propagator.PropagateAll();
1836 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1838 BOOST_CHECK(propagated_feats.size() == feat_id - 1);
1839 for (
auto& it : propagated_feats) {
1840 BOOST_CHECK(it->IsSetId());
1841 BOOST_CHECK(it->GetId().GetLocal().GetId() == (++feat_id));
1849 xref->SetId(to_feat.
SetId());
1850 from_feat.
SetXref().push_back(xref);
1855 size_t front_insert = 5;
1863 main_loc->
SetInt().SetFrom(0);
1864 main_loc->
SetInt().SetTo(15);
1865 main_loc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1868 subloc->
SetInt().SetFrom(3);
1869 subloc->
SetInt().SetTo(5);
1870 subloc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1874 gene->
SetData().SetGene().SetLocus(
"gene locus");
1875 gene->
SetId().SetLocal().SetId(++feat_id);
1880 mrna->
SetId().SetLocal().SetId(++feat_id);
1895 BOOST_TEST_MESSAGE(
"When both mrna and gene are propagated");
1897 edit::CFeaturePropagator propagator(src_bseq, target_bseq, *align,
true,
true,
true,
true, &listener, &maxFeatId);
1898 vector<CRef<CSeq_feat>> propagated_feats = propagator.PropagateFeatureList({ gene, mrna });
1899 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1901 auto prop_gene = propagated_feats.front();
1902 BOOST_CHECK(prop_gene->IsSetId());
1903 BOOST_CHECK(prop_gene->GetId().GetLocal().GetId() == (++feat_id));
1904 BOOST_CHECK(!prop_gene->IsSetXref());
1906 auto prop_mrna = propagated_feats.back();
1907 BOOST_CHECK(prop_mrna->IsSetId());
1908 BOOST_CHECK(prop_mrna->GetId().GetLocal().GetId() == (++feat_id));
1909 BOOST_TEST_MESSAGE(
"the Xref is also propagated");
1910 BOOST_CHECK(prop_mrna->IsSetXref());
1912 xref.
SetId(prop_gene->SetId());
1913 BOOST_CHECK(prop_mrna->HasSeqFeatXref(xref.
GetId()));
1919 size_t front_insert = 5;
1927 main_loc->
SetInt().SetFrom(0);
1928 main_loc->
SetInt().SetTo(15);
1929 main_loc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1932 subloc->
SetInt().SetFrom(3);
1933 subloc->
SetInt().SetTo(5);
1934 subloc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1938 gene->
SetData().SetGene().SetLocus(
"gene locus");
1939 gene->
SetId().SetLocal().SetId(++feat_id);
1944 mrna->
SetId().SetLocal().SetId(++feat_id);
1959 BOOST_TEST_MESSAGE(
"When the mrna is propagated alone");
1961 edit::CFeaturePropagator propagator(src_bseq, target_bseq, *align,
true,
true,
true,
true, &listener, &maxFeatId);
1962 vector<CRef<CSeq_feat>> propagated_feats = propagator.PropagateFeatureList({ mrna });
1963 BOOST_CHECK_EQUAL(listener.
Count(), 0);
1965 auto prop_mrna = propagated_feats.front();
1966 BOOST_CHECK(prop_mrna->IsSetId());
1967 BOOST_CHECK(prop_mrna->GetId().GetLocal().GetId() == (++feat_id));
1968 BOOST_TEST_MESSAGE(
"the Xref is missing");
1969 BOOST_CHECK(!prop_mrna->IsSetXref());
1975 size_t front_insert = 5;
1983 main_loc->
SetInt().SetFrom(0);
1984 main_loc->
SetInt().SetTo(15);
1985 main_loc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1988 subloc->
SetInt().SetFrom(3);
1989 subloc->
SetInt().SetTo(5);
1990 subloc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
1994 gene->
SetData().SetGene().SetLocus(
"gene locus");
1995 gene->
SetId().SetLocal().SetId(++feat_id);
2000 mrna->
SetId().SetLocal().SetId(++feat_id);
2016 edit::CFeaturePropagator propagator(src_bseq, target_bseq, *align,
true,
true,
true,
true, &listener, &maxFeatId);
2017 vector<CRef<CSeq_feat>> propagated_feats = propagator.PropagateFeatureList({ gene, mrna });
2018 BOOST_CHECK_EQUAL(listener.
Count(), 0);
2020 auto prop_gene = propagated_feats.front();
2021 BOOST_CHECK_EQUAL(listener.
Count(), 0);
2022 BOOST_CHECK(prop_gene->IsSetId());
2023 BOOST_CHECK(prop_gene->GetId().GetLocal().GetId() == (++feat_id));
2024 BOOST_CHECK(prop_gene->IsSetXref());
2026 auto prop_mrna = propagated_feats.back();
2028 xref.
SetId(prop_mrna->SetId());
2029 BOOST_CHECK(prop_gene->HasSeqFeatXref(xref.
GetId()));
2031 BOOST_CHECK(prop_mrna->IsSetId());
2032 BOOST_CHECK(prop_mrna->GetId().GetLocal().GetId() == (++feat_id));
2033 BOOST_CHECK(!prop_mrna->IsSetXref());
2039 size_t front_insert = 5;
2047 main_loc->
SetInt().SetFrom(0);
2048 main_loc->
SetInt().SetTo(15);
2049 main_loc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
2052 subloc->
SetInt().SetFrom(3);
2053 subloc->
SetInt().SetTo(5);
2054 subloc->
SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
2058 gene->
SetData().SetGene().SetLocus(
"gene locus");
2059 gene->
SetId().SetLocal().SetId(++feat_id);
2064 mrna->
SetId().SetLocal().SetId(++feat_id);
2070 cds_withoutprot->
SetData().SetCdregion();
2071 cds_withoutprot->
SetId().SetLocal().SetId(++feat_id);
2072 cds_withoutprot->
SetLocation().SetInt().SetFrom(10);
2073 cds_withoutprot->
SetLocation().SetInt().SetTo(25);
2074 cds_withoutprot->
SetLocation().SetInt().SetId().Assign(*(
first->GetSeq().GetId().front()));
2077 cds_withprot->
SetComment(
"CDS with product");
2078 cds_withprot->
SetData().SetCdregion();
2079 cds_withprot->
SetId().SetLocal().SetId(++feat_id);
2090 prot_entry->
SetSeq().
SetInst().SetSeq_data().SetIupacaa().Set(
"-WPKL");
2093 const string prot_id =
"good1_1";
2095 id->SetLocal().SetStr(prot_id);
2103 prot_feat->
SetData().SetProt().SetName().push_back(
"hypothetical protein");
2107 prot_feat->
SetId().SetLocal().SetId(++feat_id);
2110 cds_withprot->
SetProduct().SetWhole().SetLocal().SetStr(prot_id);
2114 set->SetSeq_set().push_back(
first);
2115 set->SetSeq_set().push_back(prot_entry);
2136 edit::CFeaturePropagator propagator(src_bseq, target_bseq, *align,
true,
true,
true,
true, &listener, &maxFeatId);
2137 vector<CConstRef<CSeq_feat>> feat_list{ gene, mrna, cds_withoutprot, cds_withprot };
2138 vector<CRef<CSeq_feat>> propagated_feats = propagator.PropagateFeatureList(feat_list);
2139 BOOST_CHECK_EQUAL(listener.
Count(), 0);
2141 BOOST_CHECK(propagated_feats.size() == feat_id );
2143 auto feat_it = propagated_feats.begin();
2144 auto prop_gene = *feat_it;
2145 BOOST_CHECK(prop_gene->IsSetId());
2146 BOOST_CHECK(prop_gene->GetId().GetLocal().GetId() == (++feat_id));
2147 BOOST_CHECK(!prop_gene->IsSetXref());
2150 auto prop_mrna = *feat_it;
2151 BOOST_CHECK(prop_mrna->IsSetId());
2152 BOOST_CHECK(prop_mrna->GetId().GetLocal().GetId() == (++feat_id));
2153 BOOST_CHECK(prop_mrna->IsSetXref());
2154 BOOST_CHECK(prop_mrna->GetXref().size() == 2);
2157 auto prop_cds_withoutprot = *feat_it;
2158 BOOST_CHECK(prop_cds_withoutprot->IsSetId());
2159 BOOST_CHECK(prop_cds_withoutprot->GetId().GetLocal().GetId() == (++feat_id));
2160 BOOST_CHECK(!prop_cds_withoutprot->IsSetXref());
2163 auto prop_cds = *feat_it;
2164 BOOST_CHECK(prop_cds->IsSetId());
2165 BOOST_CHECK(prop_cds->GetId().GetLocal().GetId() == (++feat_id));
2166 BOOST_CHECK(prop_cds->IsSetXref());
2169 mrna_xref1.
SetId(prop_gene->SetId());
2170 BOOST_CHECK(prop_mrna->HasSeqFeatXref(mrna_xref1.
GetId()));
2171 mrna_xref1.
SetId(prop_cds->SetId());
2172 BOOST_CHECK(prop_mrna->HasSeqFeatXref(mrna_xref1.
GetId()));
2175 cds_xref.
SetId(prop_gene->SetId());
2176 BOOST_CHECK(prop_cds->HasSeqFeatXref(cds_xref.
GetId()));
2177 cds_xref.
SetId(prop_mrna->SetId());
2178 BOOST_CHECK(prop_cds->HasSeqFeatXref(cds_xref.
GetId()));
2181 auto prop_protein = *feat_it;
2182 BOOST_CHECK(prop_protein->IsSetId());
2183 BOOST_CHECK(prop_protein->GetId().GetLocal().GetId() == (++feat_id));
2197 align->SetType(objects::CSeq_align::eType_global);
2203 id->Assign(*(s->GetSeq().GetId().front()));
2204 align->SetSegs().SetDenseg().SetIds().push_back(
id);
2208 auto first_seq = (*s)->GetSeq().GetInst().GetSeq_data().GetIupacna().Get();
2211 (*s)->SetSeq().SetInst().SetSeq_data().SetIupacna().Set(first_seq.substr(20, 40));
2212 (*s)->SetSeq().SetInst().SetLength(40);
2215 (*s)->SetSeq().SetInst().SetSeq_data().SetIupacna().Set(first_seq.substr(0, 20) + first_seq.substr(40, 20));
2216 (*s)->SetSeq().SetInst().SetLength(40);
2219 (*s)->SetSeq().SetInst().SetSeq_data().SetIupacna().Set(first_seq.substr(0, 40));
2220 (*s)->SetSeq().SetInst().SetLength(40);
2224 first->SetSeq().SetInst().SetSeq_data().SetIupacna().Set(
"AAAAATTTTTGGGGGCCCCC" + first_seq +
"AAAAATTTTTGGGGGCCCCC");
2225 first->SetSeq().SetInst().SetLength(100);
2228 auto& denseg = align->SetSegs().SetDenseg();
2229 denseg.SetNumseg(3);
2230 denseg.SetLens().push_back(20);
2231 denseg.SetLens().push_back(20);
2232 denseg.SetLens().push_back(20);
2235 denseg.SetStarts().push_back(20);
2236 denseg.SetStarts().push_back(-1);
2237 denseg.SetStarts().push_back(0);
2238 denseg.SetStarts().push_back(0);
2240 denseg.SetStarts().push_back(40);
2241 denseg.SetStarts().push_back(0);
2242 denseg.SetStarts().push_back(-1);
2243 denseg.SetStarts().push_back(20);
2245 denseg.SetStarts().push_back(60);
2246 denseg.SetStarts().push_back(20);
2247 denseg.SetStarts().push_back(20);
2248 denseg.SetStarts().push_back(-1);
2251 annot->
SetData().SetAlign().push_back(align);
2265 gene1->
SetData().SetGene().SetLocus(
"gene locus");
2271 gene2->
SetData().SetGene().SetLocus(
"gene locus");
2277 gene3->
SetData().SetGene().SetLocus(
"gene locus");
2283 gene4->
SetData().SetGene().SetLocus(
"gene locus");
2289 gene5->
SetData().SetGene().SetLocus(
"gene locus");
2293 vector<CConstRef<CSeq_feat>> feat_list{ gene1, gene2, gene3, gene4, gene5 };
2308 edit::CFeaturePropagator propagator_to_2(src_bseq, *b_iter, *align,
true,
true,
true,
true, &listener);
2309 vector<CRef<CSeq_feat>> propagated_feats = propagator_to_2.PropagateFeatureList(feat_list);
2310 BOOST_CHECK_EQUAL(listener.
Count(), 3);
2311 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good1:1-20 to lcl|good2");
2312 BOOST_CHECK_EQUAL(listener.
GetMessage(1).
GetText(),
"Unable to propagate location of feature lcl|good1:21-40 to lcl|good2");
2313 BOOST_CHECK_EQUAL(listener.
GetMessage(2).
GetText(),
"Unable to propagate location of feature lcl|good1:81-100 to lcl|good2");
2317 edit::CFeaturePropagator propagator_to_3(src_bseq, *b_iter, *align,
true,
true,
true,
true, &listener);
2318 propagated_feats = propagator_to_3.PropagateFeatureList(feat_list);
2319 BOOST_CHECK_EQUAL(listener.
Count(), 3);
2320 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good1:1-20 to lcl|good3");
2321 BOOST_CHECK_EQUAL(listener.
GetMessage(1).
GetText(),
"Unable to propagate location of feature lcl|good1:41-60 to lcl|good3");
2322 BOOST_CHECK_EQUAL(listener.
GetMessage(2).
GetText(),
"Unable to propagate location of feature lcl|good1:81-100 to lcl|good3");
2326 edit::CFeaturePropagator propagator_to_4(src_bseq, *b_iter, *align,
true,
true,
true,
true, &listener);
2327 propagated_feats = propagator_to_4.PropagateFeatureList(feat_list);
2328 BOOST_CHECK_EQUAL(listener.
Count(), 3);
2329 BOOST_CHECK_EQUAL(listener.
GetMessage(0).
GetText(),
"Unable to propagate location of feature lcl|good1:1-20 to lcl|good4");
2330 BOOST_CHECK_EQUAL(listener.
GetMessage(1).
GetText(),
"Unable to propagate location of feature lcl|good1:61-80 to lcl|good4");
2331 BOOST_CHECK_EQUAL(listener.
GetMessage(2).
GetText(),
"Unable to propagate location of feature lcl|good1:81-100 to lcl|good4");
2341 size_t front_insert = 5;
2353 l2->SetInt().SetTo(l2->GetInt().GetFrom() + 15);
2357 vector<CRef<CSeq_loc> > expected_loc;
2360 loc1->SetInt().SetFrom(front_insert);
2361 loc1->SetInt().SetTo(30 + front_insert);
2362 loc1->SetInt().SetId().SetLocal().SetStr(
"good2");
2365 expected_loc.push_back(loc1);
2368 loc2->SetInt().SetFrom(front_insert * 2);
2369 loc2->SetInt().SetTo(30 + front_insert * 2);
2370 loc2->SetInt().SetId().SetLocal().SetStr(
"good3");
2373 expected_loc.push_back(loc2);
2386 edit::CFeaturePropagator propagator(src, *
b, *align,
false,
false,
true,
true, &listener);
2390 BOOST_CHECK_EQUAL(listener.
Count(), 0);
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Biological
5' and 3'
User-defined methods of the data storage class.
User-defined methods of the data storage class.
Default implementation of IMessageListener: collects all messages posted.
static CNcbiApplication * Instance(void)
Singleton method.
ESubtype GetSubtype(void) const
namespace ncbi::objects::
static DLIST_TYPE *DLIST_NAME() first(DLIST_LIST_TYPE *list)
static DLIST_TYPE *DLIST_NAME() last(DLIST_LIST_TYPE *list)
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
virtual size_t Count(void) const
Get total number of collected messages.
virtual string GetText(void) const =0
Get text message.
virtual const IMessage & GetMessage(size_t index) const
Get a previously collected message.
virtual int GetCode(void) const =0
Get error code. Zero = not set.
virtual void Clear(void)
Clear all collected messages.
void ResetStrand(void)
Reset the strand on this location.
void SetPartialStart(bool val, ESeqLocExtremes ext)
set / remove e_Lim fuzz on start or stop (lt/gt - indicating partial interval)
void SetPartialStop(bool val, ESeqLocExtremes ext)
void SetNull(void)
Override all setters to incorporate cache invalidation.
static CRef< CObjectManager > GetInstance(void)
Return the existing object manager or create one.
CSeq_entry_Handle AddTopLevelSeqEntry(CSeq_entry &top_entry, TPriority pri=kPriority_Default, EExist action=eExist_Default)
Add seq_entry, default priority is higher than for defaults or loaders Add object to the score with p...
CBioseq_Handle GetBioseqHandle(const CSeq_id &id)
Get bioseq handle by seq-id.
bool IsSetProduct(void) const
CScope & GetScope(void) const
Get scope this handle belongs to.
CConstRef< CSeq_feat > GetOriginalSeq_feat(void) const
const CSeq_loc & GetProduct(void) const
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
bool IsNull(void) const THROWS_NONE
Check if pointer is null – same effect as Empty().
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define END_SCOPE(ns)
End the previously defined scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
#define BEGIN_SCOPE(ns)
Define a new scope.
static string IntToString(int value, TNumToStringFlags flags=0, int base=10)
Convert int to string.
static bool StartsWith(const CTempString str, const CTempString start, ECase use_case=eCase)
Check if a string starts with a specified prefix value.
bool IsId(void) const
Check if variant Id is selected.
TStr & SetStr(void)
Select the variant.
TId GetId(void) const
Get the variant data.
const TAnticodon & GetAnticodon(void) const
Get the Anticodon member data.
bool IsSetAnticodon(void) const
location of anticodon Check if a value has been assigned to Anticodon data member.
const TExt & GetExt(void) const
Get the Ext member data.
const TTRNA & GetTRNA(void) const
Get the variant data.
void ResetStarts(void)
Reset Starts data member.
TLens & SetLens(void)
Assign a value to Lens data member.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
void SetDim(TDim value)
Assign a value to Dim data member.
void SetType(TType value)
Assign a value to Type data member.
void ResetLens(void)
Reset Lens data member.
TStarts & SetStarts(void)
Assign a value to Starts data member.
void SetNumseg(TNumseg value)
Assign a value to Numseg data member.
TXref & SetXref(void)
Assign a value to Xref data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
void SetComment(const TComment &value)
Assign a value to Comment data member.
void SetProduct(TProduct &value)
Assign a value to Product data member.
const TId & GetId(void) const
Get the Id member data.
const TLocal & GetLocal(void) const
Get the variant data.
const TLocation & GetLocation(void) const
Get the Location member data.
bool IsLocal(void) const
Check if variant Local is selected.
const TId & GetId(void) const
Get the Id member data.
const TData & GetData(void) const
Get the Data member data.
void SetId(TId &value)
Assign a value to Id data member.
void SetId(TId &value)
Assign a value to Id data member.
void SetData(TData &value)
Assign a value to Data data member.
const TCdregion & GetCdregion(void) const
Get the variant data.
bool IsSetId(void) const
Check if a value has been assigned to Id data member.
void SetLoc(TLoc &value)
Assign a value to Loc data member.
const TRna & GetRna(void) const
Get the variant data.
const TCode_break & GetCode_break(void) const
Get the Code_break member data.
bool IsSetProduct(void) const
product of process Check if a value has been assigned to Product data member.
bool IsSetCode_break(void) const
individual exceptions Check if a value has been assigned to Code_break data member.
ENa_strand
strand of nucleic acid
TLocal & SetLocal(void)
Select the variant.
const TSeq & GetSeq(void) const
Get the variant data.
TSet & SetSet(void)
Select the variant.
TAnnot & SetAnnot(void)
Assign a value to Annot data member.
const TSet & GetSet(void) const
Get the variant data.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
TSeq & SetSeq(void)
Select the variant.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
@ eClass_nuc_prot
nuc acid and coded proteins
void SetData(TData &value)
Assign a value to Data data member.
TId & SetId(void)
Assign a value to Id data member.
const TInst & GetInst(void) const
Get the Inst member data.
const TIupacna & GetIupacna(void) const
Get the variant data.
const TId & GetId(void) const
Get the Id member data.
TLength GetLength(void) const
Get the Length member data.
void SetInst(TInst &value)
Assign a value to Inst data member.
void SetBiomol(TBiomol value)
Assign a value to Biomol data member.
void SetDescr(TDescr &value)
Assign a value to Descr data member.
const TSeq_data & GetSeq_data(void) const
Get the Seq_data member data.
TMolinfo & SetMolinfo(void)
Select the variant.
@ eRepr_raw
continuous sequence
@ eMol_na
just a nucleic acid
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
static const char * expected[]
Utility stuff for more convenient using of Boost.Test library.
void TestDoNotFuseAbuttingIntervals()
void TestDoNotExtendOverGap()
void TestCircularTopology()
BOOST_AUTO_TEST_CASE(Test_FeaturePropagation)
void TestPartialWhenCutLastIntervalDoNotExtend(bool partial3)
NCBITEST_INIT_CMDLINE(arg_desc)
void TestPointLocInside()
void TestTwoIntCdsFromLastBioseqOutsideAlign()
CSeq_entry_Handle GetGoodSeqEntryWithFeatureIds(int &feat_id)
CRef< CSeq_loc > CreateLoc(TSeqPos from, TSeqPos to, const CSeq_id &id, bool loc_partial5, bool loc_partial3, bool is_minus_strand=false)
tuple< CBioseq_Handle, CBioseq_Handle, CBioseq_Handle, CRef< CScope > > AddBioseqsToScope(CRef< CSeq_entry > entry)
void TestTrnaAnticodonFromLastBioseq()
void TestPointLocOutside()
void InsertStop(CBioseq &seq, size_t pos)
void AddAnticodon(CRef< CSeq_feat > trna, CRef< CSeq_loc > subloc)
void AddCodeBreak(CRef< CSeq_feat > cds, CRef< CSeq_loc > subloc)
void CheckPropagatedLocation(const CSeq_loc &expected, const CSeq_loc &propagated)
void TestPartialWhenCutStop(bool partial3)
CObject_id::TId s_FindHighestFeatId(const CSeq_entry_Handle entry)
void TestTwoIntCdsOnMinusStrand()
void TestFeatInsideGap(bool is_minus)
CRef< CSeq_feat > CreateTrna(CRef< CSeq_loc > main_loc, CRef< CSeq_entry > seq)
void TestCdsFromLastBioseq(bool loc_partial5, bool loc_partial3)
CRef< CSeq_entry > BuildAlignmentWithInternalGap()
CRef< CSeq_loc > CreateTwoIntLoc(TSeqPos from1, TSeqPos to1, TSeqPos from2, TSeqPos to2, ENa_strand strand, const CSeq_id &id, bool loc_partial5, bool loc_partial3)
void TestCdsFromLastBioseqWithCodeBreak()
CRef< CSeq_loc > CreatePointLoc(TSeqPos pos, const CSeq_id &id)
void TestPartialWhenCutStart(bool partial5)
void TestPartialWhenCutStopDoNotExtend(bool partial3)
CRef< CSeq_loc > CreateOrderedLoc(TSeqPos from1, TSeqPos to1, TSeqPos from2, TSeqPos to2, ENa_strand strand, const CSeq_id &id, bool loc_partial5, bool loc_partial3)
void TestTrnaAnticodon(bool subloc_partial5, bool subloc_partial3)
void CheckPropagatedCDSLocation(CSeq_entry &entry, const CSeq_feat &cds, bool stop_at_stop, bool fix_partials, const vector< CRef< CSeq_loc > > &expected_loc)
CRef< CSeq_feat > CreateCds(CRef< CSeq_loc > main_loc, CRef< CSeq_entry > seq)
void TestCds(bool loc_partial5, bool loc_partial3)
void TestFuseAbuttingIntervals()
void TestCdsFromLastBioseqOutsideAlign()
void TestPartialWhenCutLastInterval(bool partial3)
tuple< CRef< CSeq_entry >, CRef< CSeq_align >, CRef< CSeq_entry >, CRef< CSeq_entry >, CRef< CSeq_entry > > CreateBioseqsAndAlign(size_t front_insert)
void TestPartialWhenCutStartDoNotExtend(bool partial5)
void ImproveAlignment(CSeq_align &align, size_t front_insert)
void TestCdsWithCodeBreak(bool subloc_partial5, bool subloc_partial3)
void CreateXRefLink(CSeq_feat &from_feat, CSeq_feat &to_feat)
CRef< objects::CSeq_feat > MakeMiscFeature(CRef< objects::CSeq_id > id, size_t right_end=10, size_t left_end=0)
CRef< objects::CSeq_entry > BuildGoodEcoSetWithAlign(size_t front_insert=5)
CRef< objects::CSeq_annot > AddFeat(CRef< objects::CSeq_feat > feat, CRef< objects::CSeq_entry > entry)
CRef< objects::CSeq_entry > BuildGoodSeq(void)
CRef< objects::CSeq_feat > AddMiscFeature(CRef< objects::CSeq_entry > entry)
CRef< objects::CSeq_entry > BuildGoodEcoSet()
CRef< objects::CSeq_id > IdFromEntry(CRef< objects::CSeq_entry > entry)
void ChangeId(CRef< objects::CSeq_annot > annot, CRef< objects::CSeq_id > id)