boost::test_tools::output_test_stream;
73arg_desc->AddKey(
"data-in",
"InputData",
74 "Concatenated Seq-aligns used to generate gene models",
77arg_desc->AddKey(
"data-expected",
"InputData",
78 "Expected Seq-annots produced from input alignments",
80arg_desc->AddKey(
"seqdata-expected",
"InputData",
81 "Expected bioseqs produced from input alignments",
83arg_desc->AddKey(
"combined-data-expected",
"InputData",
84 "Expected single seq-annot produced from all input alignments",
86arg_desc->AddKey(
"combined-with-omission-expected",
"InputData",
87 "Expected single seq-annot produced from all input alignments omitting the first RNA feature",
90arg_desc->AddOptionalKey(
"seqdata-in",
"InputData",
91 "FASTA of test sequences",
94arg_desc->AddOptionalKey(
"data-out",
"OutputData",
95 "Seq-annots produced from input alignments",
97arg_desc->AddOptionalKey(
"seqdata-out",
"OutputData",
98 "Bioseqss produced from input alignments",
100arg_desc->AddOptionalKey(
"combined-data-out",
"OutputData",
101 "Single seq-annot produced from all input alignments",
103arg_desc->AddOptionalKey(
"combined-with-omission-out",
"OutputData",
104 "Single seq-annot produced from all input alignments omitting the first RNA feature",
112 return*ref1 < *ref2;
117 const string& compared_features)
119CSeq_annot::TData::TFtable::const_iterator actual_iter =
122CSeq_annot::TData::TFtable::const_iterator expected_iter =
125 for( ; actual_iter != actual.end() && expected_iter !=
expected.end();
126++actual_iter, ++expected_iter) {
128 booldisplay =
false;
132compared_features <<
": f1.GetData().GetSubtype() == f2.GetData().GetSubtype() failed [" 135compared_features <<
": f1.GetLocation().Equals(f2.GetLocation() failed");
142compared_features <<
": (f1.IsSetPartial() && f1.GetPartial()) == (f2.IsSetPartial() && f2.GetPartial()) failed");
188BOOST_CHECK_EQUAL(code_break1, code_break2);
243BOOST_CHECK_EQUAL(f1_except, f2_except);
245 stringf1_except_text =
247 stringf2_except_text =
249BOOST_CHECK_EQUAL(f1_except_text, f2_except_text);
275}
while(!fastareader.
AtEOF());
284validator::CValidator validator(*
om);
287 CNcbiIstream& align_istr = args[
"data-in"].AsInputFile();
288 CNcbiIstream& annot_istr = args[
"data-expected"].AsInputFile();
289 CNcbiIstream& combined_annot_istr = args[
"combined-data-expected"].AsInputFile();
290 CNcbiIstream& combined_annot_with_omission_istr = args[
"combined-with-omission-expected"].AsInputFile();
297combined_annot_istr));
298unique_ptr<CObjectIStream> combined_annot_with_omission_is(
300combined_annot_with_omission_istr));
301unique_ptr<CObjectOStream> annot_os;
302 if(args[
"data-out"]) {
303 CNcbiOstream& annot_ostr = args[
"data-out"].AsOutputFile();
307unique_ptr<CObjectOStream> combined_annot_os;
308 if(args[
"combined-data-out"]) {
309 CNcbiOstream& combined_annot_ostr = args[
"combined-data-out"].AsOutputFile();
311combined_annot_ostr));
313unique_ptr<CObjectOStream> combined_annot_with_omission_os;
314 if(args[
"combined-with-omission-out"]) {
315 CNcbiOstream& combined_annot_with_omission_ostr = args[
"combined-with-omission-out"].AsOutputFile();
317combined_annot_with_omission_ostr));
319output_test_stream seqdata_test_stream( args[
"seqdata-expected"].AsString(),
true);
321seqdata_test_stream));
322unique_ptr<CObjectOStream> seqdata_os;
323 if(args[
"seqdata-out"]) {
324 CNcbiOstream& seqdata_ostr = args[
"seqdata-out"].AsOutputFile();
329 if(args[
"seqdata-in"]) {
335actual_combined_annot.
SetData().SetFtable();
337*combined_annot_is >> expected_combined_annot;
339expected_combined_annot.
SetData().SetFtable();
340 CSeq_annotactual_combined_annot_with_omission;
342actual_combined_annot_with_omission.
SetData().SetFtable();
343 CSeq_annotexpected_combined_annot_with_omission;
344*combined_annot_with_omission_is >> expected_combined_annot_with_omission;
346expected_combined_annot_with_omission.
SetData().SetFtable();
351list< CRef<CSeq_align> > combined_aligns;
352 CSeq_idgene_for_combined_aligns;
361 const intdefault_flags =
367 for(
intalignment = 0; align_istr && annot_istr; ++alignment) {
383*annot_is >> expected_annot;
390cerr <<
"Alignment "<< alignment << endl;
392BOOST_CHECK_NO_THROW(align->
Validate(
true));
400actual_annot.
SetData().SetFtable();
402generator.
SetFlags(default_flags);
407 if((*ext_it)->GetType().IsStr() &&
408(*ext_it)->GetType().GetStr() ==
"CFeatureGenerator") {
409 if((*ext_it)->HasField(
"Flags")) {
410 int flags= (*ext_it)->GetField(
"Flags").GetData().GetInt();
413 if((*ext_it)->HasField(
"MinIntron")) {
414 int value= (*ext_it)->GetField(
"MinIntron").GetData().GetInt();
417 if((*ext_it)->HasField(
"AdjustRange")) {
418 constvector<int>& range_vec = (*ext_it)->GetField(
"AdjustRange").GetData().GetInts();
419adjust_range =
TSeqRange(range_vec[0], range_vec[1]);
422 if((*ext_it)->HasField(
"cdregion")) {
423 stringcdregion = (*ext_it)->GetField(
"cdregion").GetData().GetStr();
443 if(
id== gene_for_combined_aligns)
444combined_aligns.push_back(align);
451 if(genes_for_redo_partial.count(
id) &&
452(!(*it)->GetData().IsGene() ||
453unique_gene_ids.
insert(
id).second) &&
454(!(*it)->GetData().IsRna() || alignment > 0))
455actual_combined_features_with_omission.push_back(*it);
459 if(annot_os.get() !=
NULL) {
460*annot_os << actual_annot;
462 if(seqdata_os.get() !=
NULL) {
466*seqdata_test_os << seqs;
467BOOST_CHECK( seqdata_test_stream.match_pattern() );
469*annot_is >> expected_annot;
478generator.
SetFlags(default_flags);
482 if(combined_annot_with_omission_os.get() !=
NULL) {
483*combined_annot_with_omission_os << actual_combined_annot_with_omission;
485 s_CompareFtables(actual_combined_features_with_omission, expected_combined_features_with_omission,
"combined_features_with_omission");
496 if(combined_annot_os.get() !=
NULL) {
497*combined_annot_os << actual_combined_annot;
499 s_CompareFtables(actual_combined_features, expected_combined_features,
"combined_features");
501BOOST_CHECK(align_istr.eof());
502BOOST_CHECK(annot_istr.eof());
511 CRef<CSeq_loc>cds_loc = R
"(Seq-loc ::= int { from 0, to 326, id gi 504827755 })"_asn; 517 product-id gi 504827755, 518 genomic-id local str "contig3_A28813", 519 genomic-strand minus, 520 product-type protein, 523 product-start protpos { 527 product-end protpos { 540 product-start protpos { 544 product-end protpos { 567 id local str "contig3_A28813" 573 id local str "contig3_A28813" 579BOOST_CHECK(projected_loc->Equals(*expected_loc));
591 id str "pct_identity_gap", 592 value real { 999284180386543, 10, -13 } 599 id str "num_mismatch", 603 id str "pct_identity_ungap", 604 value real { 1, 10, 2 } 611 id str "pct_coverage", 612 value real { 999284180386543, 10, -13 } 615 id str "pct_coverage_hiqual", 616 value real { 999284180386543, 10, -13 } 628 genomic-id local str "NC_065531.1", 630 genomic-strand minus, 631 product-type transcript, 634 product-start nucpos 0, 635 product-end nucpos 137, 636 genomic-start 21499788, 637 genomic-end 21499924, 648 product-start nucpos 138, 649 product-end nucpos 253, 650 genomic-start 21499594, 651 genomic-end 21499709, 655 acceptor-before-exon { 663 product-start nucpos 254, 664 product-end nucpos 365, 665 genomic-start 21499412, 666 genomic-end 21499523, 670 acceptor-before-exon { 678 product-start nucpos 366, 679 product-end nucpos 497, 680 genomic-start 21499215, 681 genomic-end 21499346, 685 acceptor-before-exon { 693 product-start nucpos 498, 694 product-end nucpos 735, 695 genomic-start 21498905, 696 genomic-end 21499142, 700 acceptor-before-exon { 708 product-start nucpos 736, 709 product-end nucpos 904, 710 genomic-start 21497635, 711 genomic-end 21497803, 715 acceptor-before-exon { 723 product-start nucpos 905, 724 product-end nucpos 1090, 725 genomic-start 21497394, 726 genomic-end 21497579, 730 acceptor-before-exon { 738 product-start nucpos 1091, 739 product-end nucpos 1396, 740 genomic-start 21495897, 741 genomic-end 21496202, 745 acceptor-before-exon { 753 str "1e2ab0a6-9988-42fb-bad9-d870580d9fbc" 758 type str "AlignmentAttributes", 761 label str "Is [re]constructed alignment", 767 type str "ModelEvidence", 770 label str "AlignSource", 771 data str "GNOMON:28070434.m" 787 product whole general { 801 local str "cds.28070434" 815 id local str "NC_065531.1" 821 id local str "NC_065531.1" 828 id local str "NC_065531.1" 834 id local str "NC_065531.1" 840 id local str "NC_065531.1" 846 id local str "NC_065531.1" 852 id local str "NC_065531.1" 858 id local str "NC_065531.1" 864 id local str "NC_065531.1" 876 id local str "NC_065531.1" 882 id local str "NC_065531.1" 889 id local str "NC_065531.1" 895 id local str "NC_065531.1" 901 id local str "NC_065531.1" 907 id local str "NC_065531.1" 913 id local str "NC_065531.1" 919 id local str "NC_065531.1" 925 id local str "NC_065531.1" 931BOOST_CHECK(projected_cds_loc->Equals(*expected_cds_loc));
934BOOST_CHECK(projected_rna_loc->Equals(*expected_rna_loc));
951BOOST_CHECK_NO_THROW(
971exon->SetProduct_start().SetNucpos(0);
972exon->SetProduct_end().SetNucpos(100);
973exon->SetGenomic_start(0);
974exon->SetGenomic_end(100);
975exons.push_back(exon);
977exon->SetProduct_start().SetNucpos(200);
978exon->SetProduct_end().SetNucpos(300);
979exon->SetGenomic_start(200);
980exon->SetGenomic_end(300);
981exons.push_back(exon);
1011exon->SetProduct_start().SetNucpos(10);
1012exon->SetProduct_end().SetNucpos(11);
1013exon->SetGenomic_start(20);
1014exon->SetGenomic_end(21);
1015exons.push_back(exon);
1018exon->SetProduct_start().SetNucpos(16);
1019exon->SetProduct_end().SetNucpos(19);
1020exon->SetGenomic_start(1031);
1021exon->SetGenomic_end(1034);
1025chunk->SetProduct_ins(1);
1026exon->SetParts().push_back(chunk);
1030exon->SetParts().push_back(chunk);
1033chunk->SetGenomic_ins(1);
1034exon->SetParts().push_back(chunk);
1038exon->SetParts().push_back(chunk);
1039exons.push_back(exon);
1042exon->SetProduct_start().SetNucpos(200);
1043exon->SetProduct_end().SetNucpos(300);
1044exon->SetGenomic_start(2000);
1045exon->SetGenomic_end(2100);
1046exons.push_back(exon);
1048BOOST_CHECK_NO_THROW(align.
Validate(
true));
1053BOOST_CHECK_NO_THROW(trimmed_align->
Validate(
true));
1059BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),
TSeqPos(1031) );
1060BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(1032) );
1061BOOST_CHECK_EQUAL((*++
i)->GetGenomic_start(),
TSeqPos(2002) );
1086exon->SetProduct_start().SetProtpos().SetAmin(3);
1087exon->SetProduct_start().SetProtpos().SetFrame(1);
1088exon->SetProduct_end().SetProtpos().SetAmin(3);
1089exon->SetProduct_end().SetProtpos().SetFrame(2);
1090exon->SetGenomic_start(20);
1091exon->SetGenomic_end(21);
1092exons.push_back(exon);
1095exon->SetProduct_start().SetProtpos().SetAmin(5);
1096exon->SetProduct_start().SetProtpos().SetFrame(2);
1097exon->SetProduct_end().SetProtpos().SetAmin(7);
1098exon->SetProduct_end().SetProtpos().SetFrame(2);
1099exon->SetGenomic_start(1031);
1100exon->SetGenomic_end(1037);
1104chunk->SetProduct_ins(1);
1105exon->SetParts().push_back(chunk);
1109exon->SetParts().push_back(chunk);
1112chunk->SetGenomic_ins(1);
1113exon->SetParts().push_back(chunk);
1117exon->SetParts().push_back(chunk);
1118exons.push_back(exon);
1121exon->SetProduct_start().SetProtpos().SetAmin(66);
1122exon->SetProduct_start().SetProtpos().SetFrame(3);
1123exon->SetProduct_end().SetProtpos().SetAmin(100);
1124exon->SetProduct_end().SetProtpos().SetFrame(1);
1125exon->SetGenomic_start(2000);
1126exon->SetGenomic_end(2100);
1127exons.push_back(exon);
1129BOOST_CHECK_NO_THROW(align.
Validate(
true));
1134BOOST_CHECK_NO_THROW(trimmed_align->
Validate(
true));
1140BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),
TSeqPos(1032) );
1141BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(1035) );
1142BOOST_CHECK_EQUAL((*++
i)->GetGenomic_start(),
TSeqPos(2001) );
1159 product-id gi 16762324, \ 1160 genomic-id gi 188504888, \ 1161 genomic-strand plus, \ 1162 product-type protein, \ 1165 product-start protpos { amin 25, frame 1 }, \ 1166 product-end protpos { amin 30, frame 3 }, \ 1167 genomic-start 0, genomic-end 17 \ 1170 product-start protpos { amin 35, frame 2 }, \ 1171 product-end protpos { amin 45, frame 2 }, \ 1172 genomic-start 31, genomic-end 61 \ 1175 product-start protpos { amin 55, frame 2 }, \ 1176 product-end protpos { amin 55, frame 2 }, \ 1177 genomic-start 91, genomic-end 91 \ 1180 product-start protpos { amin 65, frame 2 }, \ 1181 product-end protpos { amin 576, frame 3 }, \ 1182 genomic-start 121, genomic-end 1655 \ 1185 product-length 577, \ 1187 stop-codon-found TRUE \ 1196BOOST_CHECK_NO_THROW(align.
Validate(
true));
1202BOOST_CHECK_NO_THROW(trimmed_align->
Validate(
true));
1208BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),
TSeqPos(0) );
1209BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(17) );
1210BOOST_CHECK_EQUAL((*++
i)->GetGenomic_start(),
TSeqPos(33) );
1211BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(59) );
1212BOOST_CHECK_EQUAL((*++
i)->GetGenomic_start(),
TSeqPos(123) );
1213BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(1655) );
1229 product-id gi 16762324, \ 1230 genomic-id gi 188504888, \ 1231 genomic-strand plus, \ 1232 product-type protein, \ 1235 product-start protpos { amin 25, frame 1 }, \ 1236 product-end protpos { amin 30, frame 3 }, \ 1237 genomic-start 0, genomic-end 17 \ 1240 product-start protpos { amin 65, frame 2 }, \ 1241 product-end protpos { amin 576, frame 3 }, \ 1242 genomic-start 121, genomic-end 1655 \ 1245 product-length 577, \ 1247 stop-codon-found TRUE \ 1256BOOST_CHECK_NO_THROW(align.
Validate(
true));
1262BOOST_CHECK_NO_THROW(trimmed_align->
Validate(
true));
1268BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),
TSeqPos(1653) );
1269BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(1655) );
1295exon->SetProduct_start().SetProtpos().SetAmin(3);
1296exon->SetProduct_start().SetProtpos().SetFrame(1);
1297exon->SetProduct_end().SetProtpos().SetAmin(3);
1298exon->SetProduct_end().SetProtpos().SetFrame(2);
1299exon->SetGenomic_start(20);
1300exon->SetGenomic_end(21);
1301exons.push_back(exon);
1304exon->SetProduct_start().SetProtpos().SetAmin(5);
1305exon->SetProduct_start().SetProtpos().SetFrame(2);
1306exon->SetProduct_end().SetProtpos().SetAmin(7);
1307exon->SetProduct_end().SetProtpos().SetFrame(2);
1308exon->SetGenomic_start(31);
1309exon->SetGenomic_end(37);
1313chunk->SetProduct_ins(1);
1314exon->SetParts().push_back(chunk);
1318exon->SetParts().push_back(chunk);
1321chunk->SetGenomic_ins(1);
1322exon->SetParts().push_back(chunk);
1326exon->SetParts().push_back(chunk);
1327exons.push_back(exon);
1330exon->SetProduct_start().SetProtpos().SetAmin(36);
1331exon->SetProduct_start().SetProtpos().SetFrame(3);
1332exon->SetProduct_end().SetProtpos().SetAmin(70);
1333exon->SetProduct_end().SetProtpos().SetFrame(1);
1334exon->SetGenomic_start(137);
1335exon->SetGenomic_end(237);
1336exons.push_back(exon);
1338BOOST_CHECK_NO_THROW(align.
Validate(
true));
1343BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1349BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),
TSeqPos(20) );
1350BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),
TSeqPos(237) );
1364 for(
intstrand = -1 ; strand <= 1; strand +=2) {
1386exon->SetProduct_start().SetProtpos().SetAmin(3);
1387exon->SetProduct_start().SetProtpos().SetFrame(3);
1388exon->SetProduct_end().SetProtpos().SetAmin(75);
1389exon->SetProduct_end().SetProtpos().SetFrame(1);
1390exon->SetGenomic_start(22);
1391exon->SetGenomic_end(237);
1398exon->SetParts().push_back(chunk);
1401chunk->SetGenomic_ins(1);
1402exon->SetParts().push_back(chunk);
1406exon->SetParts().push_back(chunk);
1409chunk->SetProduct_ins(1);
1410exon->SetParts().push_back(chunk);
1414exon->SetParts().push_back(chunk);
1417chunk->SetGenomic_ins(1);
1418exon->SetParts().push_back(chunk);
1421chunk->SetDiag(204);
1422exon->SetParts().push_back(chunk);
1424exons.push_back(exon);
1426BOOST_CHECK_NO_THROW(align.
Validate(
true));
1437BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1441 intcumulative_indel_len = 0;
1445 switch(chunk.
Which()) {
1454cumulative_indel_len += 1;
1458BOOST_CHECK_EQUAL(product_pos % 3,
TSeqPos(0) );
1460cumulative_indel_len -= 1;
1490 for(
intstrand = -1 ; strand <= 1; strand +=2) {
1512exon->SetProduct_start().SetProtpos().SetAmin(3);
1513exon->SetProduct_start().SetProtpos().SetFrame(3);
1514exon->SetProduct_end().SetProtpos().SetAmin(75);
1515exon->SetProduct_end().SetProtpos().SetFrame(1);
1516exon->SetGenomic_start(22);
1517exon->SetGenomic_end(237);
1524exon->SetParts().push_back(chunk);
1527chunk->SetGenomic_ins(1);
1528exon->SetParts().push_back(chunk);
1532exon->SetParts().push_back(chunk);
1535chunk->SetProduct_ins(1);
1536exon->SetParts().push_back(chunk);
1540exon->SetParts().push_back(chunk);
1543chunk->SetGenomic_ins(1);
1544exon->SetParts().push_back(chunk);
1547chunk->SetDiag(204);
1548exon->SetParts().push_back(chunk);
1550exons.push_back(exon);
1552BOOST_CHECK_NO_THROW(align.
Validate(
true));
1563BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1567 intcumulative_indel_len = 0;
1571 switch(chunk.
Which()) {
1580cumulative_indel_len += 1;
1584BOOST_CHECK_EQUAL(product_pos % 3,
TSeqPos(0) );
1586cumulative_indel_len -= 1;
1617 for(
intstrand = -1 ; strand <= 1; strand +=2) {
1639exon->SetProduct_start().SetProtpos().SetAmin(3);
1640exon->SetProduct_start().SetProtpos().SetFrame(3);
1641exon->SetProduct_end().SetProtpos().SetAmin(75);
1642exon->SetProduct_end().SetProtpos().SetFrame(1);
1643exon->SetGenomic_start(10);
1644exon->SetGenomic_end(225);
1651exon->SetParts().push_back(chunk);
1654chunk->SetGenomic_ins(1);
1655exon->SetParts().push_back(chunk);
1659exon->SetParts().push_back(chunk);
1662chunk->SetProduct_ins(1);
1663exon->SetParts().push_back(chunk);
1667exon->SetParts().push_back(chunk);
1670chunk->SetGenomic_ins(1);
1671exon->SetParts().push_back(chunk);
1674chunk->SetDiag(204);
1675exon->SetParts().push_back(chunk);
1677exons.push_back(exon);
1683BOOST_CHECK_NO_THROW(align.
Validate(
true));
1690BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1717 for(
intstrand = -1 ; strand <= 1; strand +=2) {
1739exon->SetProduct_start().SetProtpos().SetAmin(strand > 0 ? 0 : 2);
1740exon->SetProduct_start().SetProtpos().SetFrame(strand > 0 ? 1 : 3);
1741exon->SetProduct_end().SetProtpos().SetAmin(strand > 0 ? 1 : 3);
1742exon->SetProduct_end().SetProtpos().SetFrame(strand > 0 ? 1 : 3);
1743exon->SetGenomic_start(5580);
1744exon->SetGenomic_end(5583);
1747exons.push_back(exon);
1750exon->SetProduct_start().SetProtpos().SetAmin(strand > 0 ? 1 : 0);
1751exon->SetProduct_start().SetProtpos().SetFrame(strand > 0 ? 2 : 1);
1752exon->SetProduct_end().SetProtpos().SetAmin(strand > 0 ? 3 : 2);
1753exon->SetProduct_end().SetProtpos().SetFrame(strand > 0 ? 3 : 2);
1754exon->SetGenomic_start(0);
1755exon->SetGenomic_end(7);
1759exons.push_back(exon);
1761exons.insert(exons.begin(), exon);
1763BOOST_CHECK_NO_THROW(align.
Validate(
true));
1774BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1810 product-id gi 386076534, \ 1811 genomic-id gi 386018361, \ 1812 product-type protein, \ 1815 product-start protpos { \ 1819 product-end protpos { \ 1823 genomic-start 321741, \ 1824 genomic-end 321743, \ 1832 TSeqPosgenomic_size = 321744;
1840 for(
intstrand = -1 ; strand <= 1; strand +=2) {
1841 for(
intside = -1 ; side <= 1; side +=2) {
1846exon->
SetProduct_end().SetProtpos().SetAmin(side != strand ? 0 : 1);
1852BOOST_CHECK_NO_THROW(align.
Validate(
true));
1862BOOST_CHECK_NO_THROW(modified_align->
Validate(
true));
1868BOOST_CHECK_EQUAL(exon->
GetGenomic_end(), strand > 0 ? genomic_size - 1 : range.
GetTo());
1873BOOST_CHECK_EQUAL(exon->
GetGenomic_end(), strand > 0 ? range.
GetTo() : genomic_size - 1);
1888 product-id local id 386076534, \ 1889 genomic-id gi 183579259, \ 1890 genomic-strand minus, \ 1891 product-type transcript, \ 1894 product-start nucpos 0, \ 1895 product-end nucpos 150, \ 1896 genomic-start 132443, \ 1897 genomic-end 132593 \ 1900 product-start nucpos 151, \ 1901 product-end nucpos 381, \ 1902 genomic-start 132090, \ 1903 genomic-end 132320, \ 1907 product-length 382 \ 1916 product whole local str \"PROT_10_36\", \ 1920 id local id 386076534, \ 1928 product-id local id 386076534, \ 1929 genomic-id gi 183579259, \ 1930 genomic-strand minus, \ 1931 product-type transcript, \ 1934 product-start nucpos 0, \ 1935 product-end nucpos 132, \ 1936 genomic-start 127519, \ 1937 genomic-end 127651 \ 1940 product-start nucpos 133, \ 1941 product-end nucpos 355, \ 1942 genomic-start 127174, \ 1943 genomic-end 127396 \ 1946 product-start nucpos 356, \ 1947 product-end nucpos 359, \ 1948 genomic-start 110589, \ 1949 genomic-end 110592, \ 1953 product-length 382 \ 1962 product whole local str \"PROT_10_36\", \ 1966 id local id 386076534, \ 1987BOOST_CHECK_NO_THROW(align.
Validate(
true));
1993annot.
SetData().SetFtable();
2023 product-id gi 16762324, \ 2024 genomic-id gi 188504888, \ 2025 genomic-strand plus, \ 2026 product-type protein, \ 2029 product-start protpos { \ 2033 product-end protpos { \ 2041 product-length 577, \ 2043 stop-codon-found TRUE \ 2056BOOST_CHECK_NO_THROW(align.
Validate(
true));
2062annot.
SetData().SetFtable();
2075 if((*it)->GetData().IsGene()) {
2089 Seq-loc ::= packed-int { \ 2108annot.
SetData().SetFtable();
2119 intprotein_length = seqs.
GetSeq_set().front()->GetSeq().GetLength();
2120BOOST_CHECK_EQUAL(protein_length, 401);
2132 Seq-loc ::= packed-int { \ 2137 id general { db \"PRJNA205468\" , \ 2138 tag str \"contig_484\" }, \ 2144 stringfasta_string =
"\ 2145 >gnl|PRJNA205468|contig_484 [organism=Sphingobacterium sp. IITKGP-BTPF85] [moltype=Genomic] [strain=IITKGP-BTPF85] [gcode=11] [tech=wgs]\n\ 2146 GCTTCAACAAATAGGCATAGCCTTGATTCTGAAAAGCTTTTAAGGCGTAATCTTCAAACGCTGTAGTAAA\n\ 2147 AATAACAGGTGCCTGAACTTTGACCTGGTCAAATATTTCGAAACTCAATCCATCACCGAGCTGCACATCC\n\ 2148 ATAAAGATGAGATCGACTTCATTTTTAAGCAACCAATCGGTAGCTTCACGCACTGTTGTTATAATCGTAG\n\ 2149 ATTGAAATTTGGAAGCAATCAATTGGTCTAATTTCTCCAAAAGACTTTCCGAAGCCCAGTTTTCATCTTC\n\ 2165annot.
SetData().SetFtable();
2177 boolno_exceptions_set = !annot.
GetData().
GetFtable().back()->IsSetExcept();
2178BOOST_CHECK(no_exceptions_set);
2190 Seq-loc ::= packed-int { \ 2209annot.
SetData().SetFtable();
2226BOOST_CHECK(annot.
GetData().
GetFtable().front()->GetLocation().Compare(
2241 Seq-loc ::= packed-int { \ 2265annot.
SetData().SetFtable();
User-defined methods of the data storage class.
User-defined methods of the data storage class.
@ eExtreme_Biological
5' and 3'
Base class for reading FASTA sequences.
CRef< objects::CSeq_feat > ConvertAlignToAnnot(const objects::CSeq_align &align, objects::CSeq_annot &annot, objects::CBioseq_set &seqs, Int8 gene_id=0, const objects::CSeq_feat *cdregion_on_mrna=NULL)
Convert an alignment to an annotation.
CConstRef< objects::CSeq_align > AdjustAlignment(const objects::CSeq_align &align, TSeqRange range, EProductPositionsMode mode=eForceProductFrom0)
void RecomputePartialFlags(objects::CSeq_annot &annot)
Recompute the correct partial states for all features in this annotation.
void SetMinIntron(TSeqPos)
void SetFlags(TFeatureGeneratorFlags)
void SetAllowedUnaligned(TSeqPos)
static const TSeqPos kDefaultMinIntron
CConstRef< objects::CSeq_align > CleanAlignment(const objects::CSeq_align &align)
Clean an alignment according to our best guess of its biological representation.
static CRef< objects::CSeq_loc > s_ProjectCDS(const objects::CSeq_align &spliced_aln, const objects::CSeq_loc &product_cds_loc, bool convert_overlaps=true)
Similar to s_ProjectRNA(...) Postcondition: seq-vector of the returned loc is of exact same length an...
static CRef< objects::CSeq_loc > s_ProjectRNA(const objects::CSeq_align &spliced_aln, CConstRef< objects::CSeq_loc > product_cds_loc=CConstRef< objects::CSeq_loc >(NULL), size_t unaligned_ends_partialness_thr=kDefaultAllowedUnaligned)
Project RNA, preserving discontinuities in the CDS.
@ fGenerateStableLocalIds
void ConvertLocToAnnot(const objects::CSeq_loc &loc, objects::CSeq_annot &annot, objects::CBioseq_set &seqs, objects::CCdregion::EFrame frame=objects::CCdregion::eFrame_one, CRef< objects::CSeq_id > prot_id=CRef< objects::CSeq_id >(), CRef< objects::CSeq_id > rna_id=CRef< objects::CSeq_id >())
Convert genomic location to an annotation.
static TRegisterLoaderInfo RegisterInObjectManager(CObjectManager &om, CReader *reader=0, CObjectManager::EIsDefault is_default=CObjectManager::eDefault, CObjectManager::TPriority priority=CObjectManager::kPriority_NotSet)
static CNcbiApplication * Instance(void)
Singleton method.
CNcbiOstrstreamToString class helps convert CNcbiOstrstream to a string Sample usage:
ESubtype GetSubtype(void) const
void Validate(bool full_test=false) const
namespace ncbi::objects::
iterator_bool insert(const value_type &val)
Operators to edit gaps in sequences.
static const char * expected[]
unsigned int TSeqPos
Type for sequence locations and lengths.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
@ eInputFile
Name of file (must exist and be readable)
@ eString
An arbitrary string.
@ eOutputFile
Name of file (must be writable)
#define MSerial_AsnText
I/O stream manipulators â.
virtual bool Equals(const CSerialObject &object, ESerialRecursionMode how=eRecursive) const
Check if both objects contain the same values.
@ eSerial_AsnText
ASN.1 text.
virtual CRef< CSeq_entry > ReadOneSeq(ILineErrorListener *pMessageListener=nullptr)
Read a single effective sequence, which may turn out to be a segmented set.
bool AtEOF(void) const
Indicates (negatively) whether there is any more input.
@ fAddMods
Parse defline mods and add to SeqEntry.
@ fParseRawID
Try to identify raw accessions.
static CSeq_id_Handle GetGiHandle(TGi gi)
Faster way to create a handle for a gi.
static CSeq_id_Handle GetHandle(const CSeq_id &id)
Normal way of getting a handle, works for any seq-id.
static CObjectOStream * Open(ESerialDataFormat format, CNcbiOstream &outStream, bool deleteOutStream)
Create serial object writer and attach it to an output stream.
static CObjectIStream * Open(ESerialDataFormat format, CNcbiIstream &inStream, bool deleteInStream)
Create serial object reader and attach it to an input stream.
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...
void AddDefaults(TPriority pri=kPriority_Default)
Add default data loaders from object manager.
CRef< C > Ref(C *object)
Helper functions to get CRef<> and CConstRef<> objects.
TObjectType * GetPointer(void) THROWS_NONE
Get pointer,.
void Reset(void)
Reset reference object.
position_type GetLength(void) const
bool NotEmpty(void) const
CRange< TSeqPos > TSeqRange
typedefs for sequence ranges
IO_PREFIX::ostream CNcbiOstream
Portable alias for ostream.
IO_PREFIX::istream CNcbiIstream
Portable alias for istream.
TTo GetTo(void) const
Get the To member data.
TFrom GetFrom(void) const
Get the From member data.
bool IsSetSyn(void) const
synonyms for locus Check if a value has been assigned to Syn data member.
const TSyn & GetSyn(void) const
Get the Syn member data.
const TDesc & GetDesc(void) const
Get the Desc member data.
bool IsSetLocus(void) const
Official gene symbol Check if a value has been assigned to Locus data member.
bool IsSetDesc(void) const
descriptive name Check if a value has been assigned to Desc data member.
const TLocus & GetLocus(void) const
Get the Locus member data.
const TProtpos & GetProtpos(void) const
Get the variant data.
void SetProduct_start(TProduct_start &value)
Assign a value to Product_start data member.
TMatch GetMatch(void) const
Get the variant data.
void SetProduct_id(TProduct_id &value)
Assign a value to Product_id data member.
void SetProduct_end(TProduct_end &value)
Assign a value to Product_end data member.
TGenomic_start GetGenomic_start(void) const
Get the Genomic_start member data.
void SetSegs(TSegs &value)
Assign a value to Segs data member.
TExons & SetExons(void)
Assign a value to Exons data member.
TProduct_length GetProduct_length(void) const
Get the Product_length member data.
void SetProduct_length(TProduct_length value)
Assign a value to Product_length data member.
TMismatch GetMismatch(void) const
Get the variant data.
list< CRef< CUser_object > > TExt
TAmin GetAmin(void) const
Get the Amin member data.
void SetGenomic_start(TGenomic_start value)
Assign a value to Genomic_start data member.
void SetType(TType value)
Assign a value to Type data member.
const TParts & GetParts(void) const
Get the Parts member data.
const TProduct_start & GetProduct_start(void) const
Get the Product_start member data.
const TProduct_end & GetProduct_end(void) const
Get the Product_end member data.
const TSpliced & GetSpliced(void) const
Get the variant data.
TGenomic_ins GetGenomic_ins(void) const
Get the variant data.
void SetGenomic_strand(TGenomic_strand value)
Assign a value to Genomic_strand data member.
void SetProduct_type(TProduct_type value)
Assign a value to Product_type data member.
list< CRef< CSpliced_exon > > TExons
const TExons & GetExons(void) const
Get the Exons member data.
void SetGenomic_id(TGenomic_id &value)
Assign a value to Genomic_id data member.
void SetGenomic_end(TGenomic_end value)
Assign a value to Genomic_end data member.
const TExt & GetExt(void) const
Get the Ext member data.
list< CRef< CSpliced_exon_chunk > > TParts
TGenomic_end GetGenomic_end(void) const
Get the Genomic_end member data.
TProduct_ins GetProduct_ins(void) const
Get the variant data.
const TSegs & GetSegs(void) const
Get the Segs member data.
E_Choice Which(void) const
Which variant is currently selected.
@ e_Product_ins
insertion in product sequence (i.e. gap in the genomic sequence)
@ e_Genomic_ins
insertion in genomic sequence (i.e. gap in the product sequence)
@ e_Match
both sequences represented, product and genomic sequences match
@ e_Mismatch
both sequences represented, product and genomic sequences do not match
@ eType_partial
mapping pieces together
@ eProduct_type_transcript
bool IsSetComment(void) const
Check if a value has been assigned to Comment data member.
void SetLocation(TLocation &value)
Assign a value to Location data member.
bool IsCdregion(void) const
Check if variant Cdregion is selected.
bool IsSetPartial(void) const
incomplete in some way? Check if a value has been assigned to Partial data member.
const TLocation & GetLocation(void) const
Get the Location member data.
bool IsGene(void) const
Check if variant Gene is selected.
list< CRef< CCode_break > > TCode_break
const TData & GetData(void) const
Get the Data member data.
bool IsSetExcept(void) const
something funny about this? Check if a value has been assigned to Except data member.
const TExcept_text & GetExcept_text(void) const
Get the Except_text member data.
bool IsSetExcept_text(void) const
explain if except=TRUE Check if a value has been assigned to Except_text data member.
const TCdregion & GetCdregion(void) const
Get the variant data.
TPseudo GetPseudo(void) const
Get the Pseudo member data.
const TProduct & GetProduct(void) const
Get the Product member data.
bool IsSetPseudo(void) const
annotated on pseudogene? Check if a value has been assigned to Pseudo data member.
const TComment & GetComment(void) const
Get the Comment member data.
const TGene & GetGene(void) const
Get the variant data.
TPartial GetPartial(void) const
Get the Partial member data.
TExcept GetExcept(void) const
Get the Except member data.
bool IsSetDbxref(void) const
support for xref to other databases Check if a value has been assigned to Dbxref data member.
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.
@ eFrame_three
reading frame
TOther & SetOther(void)
Select the variant.
void SetAccession(const TAccession &value)
Assign a value to Accession data member.
void SetVersion(TVersion value)
Assign a value to Version data member.
TSet & SetSet(void)
Select the variant.
const TSeq_set & GetSeq_set(void) const
Get the Seq_set member data.
TSeq_set & SetSeq_set(void)
Assign a value to Seq_set data member.
void SetData(TData &value)
Assign a value to Data data member.
const TFtable & GetFtable(void) const
Get the variant data.
list< CRef< CSeq_feat > > TFtable
const TData & GetData(void) const
Get the Data member data.
const GenericPointer< typename T::ValueType > T2 value
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
BOOST_AUTO_TEST_SUITE(psiblast_iteration)
CRef< objects::CObjectManager > om
Utility stuff for more convenient using of Boost.Test library.
BOOST_AUTO_TEST_CASE(TestUsingArg)
NCBITEST_INIT_CMDLINE(arg_desc)
void AddFastaToScope(const string &fasta_file, CScope &scope)
void s_CompareFtables(const CSeq_annot::TData::TFtable &actual, const CSeq_annot::TData::TFtable &expected, const string &compared_features)
static bool s_CompareFeatRefs(const CRef< CSeq_feat > &ref1, const CRef< CSeq_feat > &ref2)
Function to compare Cref<Cseq_feat>s by their referents.
BOOST_AUTO_TEST_SUITE_END()
Auxiliary class to convert a string into an argument count and vector.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4