A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/unit__test__gene__model_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/sequence/unit_test/unit_test_gene_model.cpp Source File

58 #if BOOST_VERSION >= 105900 59 # include <boost/test/tools/output_test_stream.hpp> 61 # include <boost/test/output_test_stream.hpp> 63 using

boost::test_tools::output_test_stream;

73

arg_desc->AddKey(

"data-in"

,

"InputData"

,

74  "Concatenated Seq-aligns used to generate gene models"

,

77

arg_desc->AddKey(

"data-expected"

,

"InputData"

,

78  "Expected Seq-annots produced from input alignments"

,

80

arg_desc->AddKey(

"seqdata-expected"

,

"InputData"

,

81  "Expected bioseqs produced from input alignments"

,

83

arg_desc->AddKey(

"combined-data-expected"

,

"InputData"

,

84  "Expected single seq-annot produced from all input alignments"

,

86

arg_desc->AddKey(

"combined-with-omission-expected"

,

"InputData"

,

87  "Expected single seq-annot produced from all input alignments omitting the first RNA feature"

,

90

arg_desc->AddOptionalKey(

"seqdata-in"

,

"InputData"

,

91  "FASTA of test sequences"

,

94

arg_desc->AddOptionalKey(

"data-out"

,

"OutputData"

,

95  "Seq-annots produced from input alignments"

,

97

arg_desc->AddOptionalKey(

"seqdata-out"

,

"OutputData"

,

98  "Bioseqss produced from input alignments"

,

100

arg_desc->AddOptionalKey(

"combined-data-out"

,

"OutputData"

,

101  "Single seq-annot produced from all input alignments"

,

103

arg_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)

119

CSeq_annot::TData::TFtable::const_iterator actual_iter =

122

CSeq_annot::TData::TFtable::const_iterator expected_iter =

125  for

( ; actual_iter != actual.end() && expected_iter !=

expected

.end();

126

++actual_iter, ++expected_iter) {

128  bool

display =

false

;

132

compared_features <<

": f1.GetData().GetSubtype() == f2.GetData().GetSubtype() failed [" 135

compared_features <<

": f1.GetLocation().Equals(f2.GetLocation() failed"

);

142

compared_features <<

": (f1.IsSetPartial() && f1.GetPartial()) == (f2.IsSetPartial() && f2.GetPartial()) failed"

);

188

BOOST_CHECK_EQUAL(code_break1, code_break2);

243

BOOST_CHECK_EQUAL(f1_except, f2_except);

245  string

f1_except_text =

247  string

f2_except_text =

249

BOOST_CHECK_EQUAL(f1_except_text, f2_except_text);

275

}

while

(!fastareader.

AtEOF

());

284

validator::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();

297

combined_annot_istr));

298

unique_ptr<CObjectIStream> combined_annot_with_omission_is(

300

combined_annot_with_omission_istr));

301

unique_ptr<CObjectOStream> annot_os;

302  if

(args[

"data-out"

]) {

303  CNcbiOstream

& annot_ostr = args[

"data-out"

].AsOutputFile();

307

unique_ptr<CObjectOStream> combined_annot_os;

308  if

(args[

"combined-data-out"

]) {

309  CNcbiOstream

& combined_annot_ostr = args[

"combined-data-out"

].AsOutputFile();

311

combined_annot_ostr));

313

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

317

combined_annot_with_omission_ostr));

319

output_test_stream seqdata_test_stream( args[

"seqdata-expected"

].AsString(),

true

);

321

seqdata_test_stream));

322

unique_ptr<CObjectOStream> seqdata_os;

323  if

(args[

"seqdata-out"

]) {

324  CNcbiOstream

& seqdata_ostr = args[

"seqdata-out"

].AsOutputFile();

329  if

(args[

"seqdata-in"

]) {

335

actual_combined_annot.

SetData

().SetFtable();

337

*combined_annot_is >> expected_combined_annot;

339

expected_combined_annot.

SetData

().SetFtable();

340  CSeq_annot

actual_combined_annot_with_omission;

342

actual_combined_annot_with_omission.

SetData

().SetFtable();

343  CSeq_annot

expected_combined_annot_with_omission;

344

*combined_annot_with_omission_is >> expected_combined_annot_with_omission;

346

expected_combined_annot_with_omission.

SetData

().SetFtable();

351 

list< CRef<CSeq_align> > combined_aligns;

352  CSeq_id

gene_for_combined_aligns;

361  const int

default_flags =

367  for

(

int

alignment = 0; align_istr && annot_istr; ++alignment) {

383

*annot_is >> expected_annot;

390

cerr <<

"Alignment "

<< alignment << endl;

392

BOOST_CHECK_NO_THROW(align->

Validate

(

true

));

400

actual_annot.

SetData

().SetFtable();

402

generator.

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  const

vector<int>& range_vec = (*ext_it)->GetField(

"AdjustRange"

).GetData().GetInts();

419

adjust_range =

TSeqRange

(range_vec[0], range_vec[1]);

422  if

((*ext_it)->HasField(

"cdregion"

)) {

423  string

cdregion = (*ext_it)->GetField(

"cdregion"

).GetData().GetStr();

443  if

(

id

== gene_for_combined_aligns)

444

combined_aligns.push_back(align);

451  if

(genes_for_redo_partial.count(

id

) &&

452

(!(*it)->GetData().IsGene() ||

453

unique_gene_ids.

insert

(

id

).second) &&

454

(!(*it)->GetData().IsRna() || alignment > 0))

455

actual_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;

467

BOOST_CHECK( seqdata_test_stream.match_pattern() );

469

*annot_is >> expected_annot;

478

generator.

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"

);

501

BOOST_CHECK(align_istr.eof());

502

BOOST_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" 579

BOOST_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" 931

BOOST_CHECK(projected_cds_loc->Equals(*expected_cds_loc));

934

BOOST_CHECK(projected_rna_loc->Equals(*expected_rna_loc));

951

BOOST_CHECK_NO_THROW(

971

exon->SetProduct_start().SetNucpos(0);

972

exon->SetProduct_end().SetNucpos(100);

973

exon->SetGenomic_start(0);

974

exon->SetGenomic_end(100);

975

exons.push_back(exon);

977

exon->SetProduct_start().SetNucpos(200);

978

exon->SetProduct_end().SetNucpos(300);

979

exon->SetGenomic_start(200);

980

exon->SetGenomic_end(300);

981

exons.push_back(exon);

1011

exon->SetProduct_start().SetNucpos(10);

1012

exon->SetProduct_end().SetNucpos(11);

1013

exon->SetGenomic_start(20);

1014

exon->SetGenomic_end(21);

1015

exons.push_back(exon);

1018

exon->SetProduct_start().SetNucpos(16);

1019

exon->SetProduct_end().SetNucpos(19);

1020

exon->SetGenomic_start(1031);

1021

exon->SetGenomic_end(1034);

1025

chunk->SetProduct_ins(1);

1026

exon->SetParts().push_back(chunk);

1030

exon->SetParts().push_back(chunk);

1033

chunk->SetGenomic_ins(1);

1034

exon->SetParts().push_back(chunk);

1038

exon->SetParts().push_back(chunk);

1039

exons.push_back(exon);

1042

exon->SetProduct_start().SetNucpos(200);

1043

exon->SetProduct_end().SetNucpos(300);

1044

exon->SetGenomic_start(2000);

1045

exon->SetGenomic_end(2100);

1046

exons.push_back(exon);

1048

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1053

BOOST_CHECK_NO_THROW(trimmed_align->

Validate

(

true

));

1059

BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),

TSeqPos

(1031) );

1060

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(1032) );

1061

BOOST_CHECK_EQUAL((*++

i

)->GetGenomic_start(),

TSeqPos

(2002) );

1086

exon->SetProduct_start().SetProtpos().SetAmin(3);

1087

exon->SetProduct_start().SetProtpos().SetFrame(1);

1088

exon->SetProduct_end().SetProtpos().SetAmin(3);

1089

exon->SetProduct_end().SetProtpos().SetFrame(2);

1090

exon->SetGenomic_start(20);

1091

exon->SetGenomic_end(21);

1092

exons.push_back(exon);

1095

exon->SetProduct_start().SetProtpos().SetAmin(5);

1096

exon->SetProduct_start().SetProtpos().SetFrame(2);

1097

exon->SetProduct_end().SetProtpos().SetAmin(7);

1098

exon->SetProduct_end().SetProtpos().SetFrame(2);

1099

exon->SetGenomic_start(1031);

1100

exon->SetGenomic_end(1037);

1104

chunk->SetProduct_ins(1);

1105

exon->SetParts().push_back(chunk);

1109

exon->SetParts().push_back(chunk);

1112

chunk->SetGenomic_ins(1);

1113

exon->SetParts().push_back(chunk);

1117

exon->SetParts().push_back(chunk);

1118

exons.push_back(exon);

1121

exon->SetProduct_start().SetProtpos().SetAmin(66);

1122

exon->SetProduct_start().SetProtpos().SetFrame(3);

1123

exon->SetProduct_end().SetProtpos().SetAmin(100);

1124

exon->SetProduct_end().SetProtpos().SetFrame(1);

1125

exon->SetGenomic_start(2000);

1126

exon->SetGenomic_end(2100);

1127

exons.push_back(exon);

1129

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1134

BOOST_CHECK_NO_THROW(trimmed_align->

Validate

(

true

));

1140

BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),

TSeqPos

(1032) );

1141

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(1035) );

1142

BOOST_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 \ 1196

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1202

BOOST_CHECK_NO_THROW(trimmed_align->

Validate

(

true

));

1208

BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),

TSeqPos

(0) );

1209

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(17) );

1210

BOOST_CHECK_EQUAL((*++

i

)->GetGenomic_start(),

TSeqPos

(33) );

1211

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(59) );

1212

BOOST_CHECK_EQUAL((*++

i

)->GetGenomic_start(),

TSeqPos

(123) );

1213

BOOST_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 \ 1256

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1262

BOOST_CHECK_NO_THROW(trimmed_align->

Validate

(

true

));

1268

BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),

TSeqPos

(1653) );

1269

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(1655) );

1295

exon->SetProduct_start().SetProtpos().SetAmin(3);

1296

exon->SetProduct_start().SetProtpos().SetFrame(1);

1297

exon->SetProduct_end().SetProtpos().SetAmin(3);

1298

exon->SetProduct_end().SetProtpos().SetFrame(2);

1299

exon->SetGenomic_start(20);

1300

exon->SetGenomic_end(21);

1301

exons.push_back(exon);

1304

exon->SetProduct_start().SetProtpos().SetAmin(5);

1305

exon->SetProduct_start().SetProtpos().SetFrame(2);

1306

exon->SetProduct_end().SetProtpos().SetAmin(7);

1307

exon->SetProduct_end().SetProtpos().SetFrame(2);

1308

exon->SetGenomic_start(31);

1309

exon->SetGenomic_end(37);

1313

chunk->SetProduct_ins(1);

1314

exon->SetParts().push_back(chunk);

1318

exon->SetParts().push_back(chunk);

1321

chunk->SetGenomic_ins(1);

1322

exon->SetParts().push_back(chunk);

1326

exon->SetParts().push_back(chunk);

1327

exons.push_back(exon);

1330

exon->SetProduct_start().SetProtpos().SetAmin(36);

1331

exon->SetProduct_start().SetProtpos().SetFrame(3);

1332

exon->SetProduct_end().SetProtpos().SetAmin(70);

1333

exon->SetProduct_end().SetProtpos().SetFrame(1);

1334

exon->SetGenomic_start(137);

1335

exon->SetGenomic_end(237);

1336

exons.push_back(exon);

1338

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1343

BOOST_CHECK_NO_THROW(modified_align->

Validate

(

true

));

1349

BOOST_CHECK_EQUAL((*i)->GetGenomic_start(),

TSeqPos

(20) );

1350

BOOST_CHECK_EQUAL((*i)->GetGenomic_end(),

TSeqPos

(237) );

1364  for

(

int

strand = -1 ; strand <= 1; strand +=2) {

1386

exon->SetProduct_start().SetProtpos().SetAmin(3);

1387

exon->SetProduct_start().SetProtpos().SetFrame(3);

1388

exon->SetProduct_end().SetProtpos().SetAmin(75);

1389

exon->SetProduct_end().SetProtpos().SetFrame(1);

1390

exon->SetGenomic_start(22);

1391

exon->SetGenomic_end(237);

1398

exon->SetParts().push_back(chunk);

1401

chunk->SetGenomic_ins(1);

1402

exon->SetParts().push_back(chunk);

1406

exon->SetParts().push_back(chunk);

1409

chunk->SetProduct_ins(1);

1410

exon->SetParts().push_back(chunk);

1414

exon->SetParts().push_back(chunk);

1417

chunk->SetGenomic_ins(1);

1418

exon->SetParts().push_back(chunk);

1421

chunk->SetDiag(204);

1422

exon->SetParts().push_back(chunk);

1424

exons.push_back(exon);

1426

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1437

BOOST_CHECK_NO_THROW(modified_align->

Validate

(

true

));

1441  int

cumulative_indel_len = 0;

1445  switch

(chunk.

Which

()) {

1454

cumulative_indel_len += 1;

1458

BOOST_CHECK_EQUAL(product_pos % 3,

TSeqPos

(0) );

1460

cumulative_indel_len -= 1;

1490  for

(

int

strand = -1 ; strand <= 1; strand +=2) {

1512

exon->SetProduct_start().SetProtpos().SetAmin(3);

1513

exon->SetProduct_start().SetProtpos().SetFrame(3);

1514

exon->SetProduct_end().SetProtpos().SetAmin(75);

1515

exon->SetProduct_end().SetProtpos().SetFrame(1);

1516

exon->SetGenomic_start(22);

1517

exon->SetGenomic_end(237);

1524

exon->SetParts().push_back(chunk);

1527

chunk->SetGenomic_ins(1);

1528

exon->SetParts().push_back(chunk);

1532

exon->SetParts().push_back(chunk);

1535

chunk->SetProduct_ins(1);

1536

exon->SetParts().push_back(chunk);

1540

exon->SetParts().push_back(chunk);

1543

chunk->SetGenomic_ins(1);

1544

exon->SetParts().push_back(chunk);

1547

chunk->SetDiag(204);

1548

exon->SetParts().push_back(chunk);

1550

exons.push_back(exon);

1552

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1563

BOOST_CHECK_NO_THROW(modified_align->

Validate

(

true

));

1567  int

cumulative_indel_len = 0;

1571  switch

(chunk.

Which

()) {

1580

cumulative_indel_len += 1;

1584

BOOST_CHECK_EQUAL(product_pos % 3,

TSeqPos

(0) );

1586

cumulative_indel_len -= 1;

1617  for

(

int

strand = -1 ; strand <= 1; strand +=2) {

1639

exon->SetProduct_start().SetProtpos().SetAmin(3);

1640

exon->SetProduct_start().SetProtpos().SetFrame(3);

1641

exon->SetProduct_end().SetProtpos().SetAmin(75);

1642

exon->SetProduct_end().SetProtpos().SetFrame(1);

1643

exon->SetGenomic_start(10);

1644

exon->SetGenomic_end(225);

1651

exon->SetParts().push_back(chunk);

1654

chunk->SetGenomic_ins(1);

1655

exon->SetParts().push_back(chunk);

1659

exon->SetParts().push_back(chunk);

1662

chunk->SetProduct_ins(1);

1663

exon->SetParts().push_back(chunk);

1667

exon->SetParts().push_back(chunk);

1670

chunk->SetGenomic_ins(1);

1671

exon->SetParts().push_back(chunk);

1674

chunk->SetDiag(204);

1675

exon->SetParts().push_back(chunk);

1677

exons.push_back(exon);

1683

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1690

BOOST_CHECK_NO_THROW(modified_align->

Validate

(

true

));

1717  for

(

int

strand = -1 ; strand <= 1; strand +=2) {

1739

exon->SetProduct_start().SetProtpos().SetAmin(strand > 0 ? 0 : 2);

1740

exon->SetProduct_start().SetProtpos().SetFrame(strand > 0 ? 1 : 3);

1741

exon->SetProduct_end().SetProtpos().SetAmin(strand > 0 ? 1 : 3);

1742

exon->SetProduct_end().SetProtpos().SetFrame(strand > 0 ? 1 : 3);

1743

exon->SetGenomic_start(5580);

1744

exon->SetGenomic_end(5583);

1747

exons.push_back(exon);

1750

exon->SetProduct_start().SetProtpos().SetAmin(strand > 0 ? 1 : 0);

1751

exon->SetProduct_start().SetProtpos().SetFrame(strand > 0 ? 2 : 1);

1752

exon->SetProduct_end().SetProtpos().SetAmin(strand > 0 ? 3 : 2);

1753

exon->SetProduct_end().SetProtpos().SetFrame(strand > 0 ? 3 : 2);

1754

exon->SetGenomic_start(0);

1755

exon->SetGenomic_end(7);

1759

exons.push_back(exon);

1761

exons.insert(exons.begin(), exon);

1763

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1774

BOOST_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  TSeqPos

genomic_size = 321744;

1840  for

(

int

strand = -1 ; strand <= 1; strand +=2) {

1841  for

(

int

side = -1 ; side <= 1; side +=2) {

1846

exon->

SetProduct_end

().SetProtpos().SetAmin(side != strand ? 0 : 1);

1852

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1862

BOOST_CHECK_NO_THROW(modified_align->

Validate

(

true

));

1868

BOOST_CHECK_EQUAL(exon->

GetGenomic_end

(), strand > 0 ? genomic_size - 1 : range.

GetTo

());

1873

BOOST_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, \ 1987

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

1993

annot.

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 \ 2056

BOOST_CHECK_NO_THROW(align.

Validate

(

true

));

2062

annot.

SetData

().SetFtable();

2075  if

((*it)->GetData().IsGene()) {

2089 Seq-loc ::= packed-int { \ 2108

annot.

SetData

().SetFtable();

2119  int

protein_length = seqs.

GetSeq_set

().front()->GetSeq().GetLength();

2120

BOOST_CHECK_EQUAL(protein_length, 401);

2132 Seq-loc ::= packed-int { \ 2137  id general { db \"PRJNA205468\" , \ 2138  tag str \"contig_484\" }, \ 2144 string

fasta_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\ 2165

annot.

SetData

().SetFtable();

2177  bool

no_exceptions_set = !annot.

GetData

().

GetFtable

().back()->IsSetExcept();

2178

BOOST_CHECK(no_exceptions_set);

2190 Seq-loc ::= packed-int { \ 2209

annot.

SetData

().SetFtable();

2226

BOOST_CHECK(annot.

GetData

().

GetFtable

().front()->GetLocation().Compare(

2241 Seq-loc ::= packed-int { \ 2265

annot.

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