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/traceback__unit__test_8cpp_source.html below:

NCBI C++ ToolKit: src/algo/blast/unit_tests/api/traceback_unit_test.cpp Source File

91 using namespace ncbi

;

110

m_LookupSegments=

NULL

;

111

m_BlastMessage=

NULL

;

112

m_ScoreParams =

NULL

;

115

m_EffLenParams=

NULL

;

137

BOOST_REQUIRE(writer_info ==

NULL

);

148

query_blk, query_info, 1.0, &m_LookupSegments,

NULL

,

160

query_info, m_ScoreBlk, &m_ScoreParams,

161

&m_ExtParams, &m_HitParams, &m_EffLenParams,

172

hsp_stream, query_blk, query_info, seq_src,

173

m_GapAlign, m_ScoreParams, m_ExtParams, m_HitParams, m_EffLenParams,

205

BOOST_REQUIRE(new_hsp ==

NULL

);

207

BOOST_REQUIRE(gap_align ==

NULL

);

211  const int

k_num_hsps_start = 9;

212  const int

k_num_hsps_end = 7;

215

unique_ptr<SSeqLoc> qsl(

218

unique_ptr<SSeqLoc> ssl(

232  prog

, strand_opt, &query_info);

234

query_info, &query_blk,

prog

, strand_opt, blast_msg);

236

BOOST_REQUIRE(m->empty());

248

hsp_list->

hspcnt

= k_num_hsps_start;

250

hsp_list->

hsp_max

= k_num_hsps_start;

256  const int

query_offset[k_num_hsps_start] = { 6020, 6022, 6622, 6622, 5295, 5199, 7191, 3818, 7408};

257  const int

query_end[k_num_hsps_start] = { 6032, 6161, 6730, 6753, 5386, 5219, 7227, 3830, 7419};

258  const int

subject_offset[k_num_hsps_start] = { 98, 104, 241, 241, 16, 0, 378, 71, 63};

259  const int

subject_end[k_num_hsps_start] = { 110, 241, 350, 376, 107, 20, 415, 83, 74};

260  const int

score[k_num_hsps_start] = { 17, 115, 93, 91, 91, 20, 17, 12, 11};

261  const int context

[k_num_hsps_start] = { 0, 0, 0, 0, 0, 0, 0, 1, 1};

262  const int

subject_frame[k_num_hsps_start] = { 1, 1, 1, 1, 1, 1, 1, 1, 1};

263  const int

query_gapped_start[k_num_hsps_start] = { 20, 6035, 6625, 6745, 5295, 5199, 7193, 3819, 7409};

264  const int

subject_gapped_start[k_num_hsps_start] = { 115, 116, 244, 368, 16, 0, 380, 72, 64};

266  for

(

int

index=0; index<k_num_hsps_start; index++)

298

hsp_stream, query_blk, query_info, seq_src, &

results

);

302  const int

query_offset_final[k_num_hsps_end] = { 6022, 6622, 5295, 7191, 5199, 7396, 3818};

303  const int

query_end_final[k_num_hsps_end] = { 6161, 6759, 5386, 7231, 5219, 7425, 3830};

304  const int

subject_offset_final[k_num_hsps_end] = { 104, 241, 16, 378, 0, 51, 71};

305  const int

subject_end_final[k_num_hsps_end] = { 241, 383, 107, 419, 20, 80, 83};

306  const int

score_final[k_num_hsps_end] = { 252, 226, 182, 54, 40, 27, 24};

307  const int

context_final[k_num_hsps_end] = { 0, 0, 0, 0, 0, 1, 1};

308  const int

subject_frame_final[k_num_hsps_end] = { 1, 1, 1, 1, 1, 1, 1};

309  const int

query_gapped_start_final[k_num_hsps_end] = { 6035, 6625, 5295, 7193, 5199, 7409, 3819};

310  const int

subject_gapped_start_final[k_num_hsps_end] = { 116, 244, 16, 380, 0, 64, 72};

311  const int

num_ident_final[k_num_hsps_end] = { 135, 134, 91, 36, 20, 25, 12};

317

BOOST_REQUIRE(hsp_list !=

NULL

);

318

BOOST_REQUIRE_EQUAL(k_num_hsps_end, hsp_list->

hspcnt

);

319  for

(

int

index=0; index<k_num_hsps_end; index++)

322

BOOST_REQUIRE_EQUAL(query_offset_final[index], tmp_hsp->

query

.

offset

);

323

BOOST_REQUIRE_EQUAL(query_end_final[index], tmp_hsp->

query

.

end

);

324

BOOST_REQUIRE_EQUAL(subject_offset_final[index], tmp_hsp->

subject

.

offset

);

325

BOOST_REQUIRE_EQUAL(subject_end_final[index], tmp_hsp->

subject

.

end

);

326

BOOST_REQUIRE_EQUAL(score_final[index], tmp_hsp->

score

);

327

BOOST_REQUIRE_EQUAL(context_final[index], (

int

) tmp_hsp->

context

);

328

BOOST_REQUIRE_EQUAL(subject_frame_final[index], (

int

) tmp_hsp->

subject

.

frame

);

329

BOOST_REQUIRE_EQUAL(query_gapped_start_final[index], tmp_hsp->

query

.

gapped_start

);

331

BOOST_REQUIRE_EQUAL(num_ident_final[index], tmp_hsp->

num_ident

);

337

BOOST_REQUIRE(seq_src ==

NULL

);

341  const int

k_num_hsps_start = 3;

342  const int

k_num_hsps_end = 1;

345

unique_ptr<SSeqLoc> qsl(

348

unique_ptr<SSeqLoc> ssl(

356  CBl2Seq

blaster(*qsl, *ssl, opts_handle);

367  prog

, strand_opt, &query_info);

369

query_info, &query_blk,

prog

, strand_opt, blast_msg);

372

BOOST_REQUIRE(m->empty());

384

hsp_list->

hspcnt

= k_num_hsps_start;

386

hsp_list->

hsp_max

= k_num_hsps_start;

392  const int

query_offset[k_num_hsps_start] = { 25194, 13986, 22457};

393  const int

query_end[k_num_hsps_start] = { 31512, 17712, 25019};

394  const int

subject_offset[k_num_hsps_start] = {11211, 0, 8471};

395  const int

subject_end[k_num_hsps_start] = { 17529, 3726, 11036};

396  const int

score[k_num_hsps_start] = { 12433, 7421, 4870};

397  const int context

[k_num_hsps_start] = { 1, 1, 1};

398  const int

subject_frame[k_num_hsps_start] = { 1, 1, 1};

399  const int

query_gapped_start[k_num_hsps_start] = { 26671, 13986, 23372};

400  const int

subject_gapped_start[k_num_hsps_start] = { 12688, 0, 9388};

402  for

(

int

index=0; index<k_num_hsps_start; index++)

434

hsp_stream, query_blk, query_info, seq_src, &

results

);

438  const int

query_offset_final[k_num_hsps_end] = { 13986};

439  const int

query_end_final[k_num_hsps_end] = { 41877};

440  const int

subject_offset_final[k_num_hsps_end] = { 0};

441  const int

subject_end_final[k_num_hsps_end] = { 27888};

442  const int

score_final[k_num_hsps_end] = { 55540};

443  const int

context_final[k_num_hsps_end] = { 1};

444  const int

subject_frame_final[k_num_hsps_end] = { 1};

445  const int

query_gapped_start_final[k_num_hsps_end] = { 26671};

446  const int

subject_gapped_start_final[k_num_hsps_end] = { 12688};

447  const int

num_ident_final[k_num_hsps_end] = { 27856};

453

BOOST_REQUIRE(hsp_list !=

NULL

);

454

BOOST_REQUIRE_EQUAL(k_num_hsps_end, hsp_list->

hspcnt

);

455  for

(

int

index=0; index<k_num_hsps_end; index++)

458

BOOST_REQUIRE_EQUAL(query_offset_final[index], tmp_hsp->

query

.

offset

);

459

BOOST_REQUIRE_EQUAL(query_end_final[index], tmp_hsp->

query

.

end

);

460

BOOST_REQUIRE_EQUAL(subject_offset_final[index], tmp_hsp->

subject

.

offset

);

461

BOOST_REQUIRE_EQUAL(subject_end_final[index], tmp_hsp->

subject

.

end

);

462

BOOST_REQUIRE_EQUAL(score_final[index], tmp_hsp->

score

);

463

BOOST_REQUIRE_EQUAL(context_final[index], (

int

) tmp_hsp->

context

);

464

BOOST_REQUIRE_EQUAL(subject_frame_final[index], (

int

) tmp_hsp->

subject

.

frame

);

465

BOOST_REQUIRE_EQUAL(query_gapped_start_final[index], tmp_hsp->

query

.

gapped_start

);

467

BOOST_REQUIRE_EQUAL(num_ident_final[index], tmp_hsp->

num_ident

);

473

BOOST_REQUIRE(seq_src ==

NULL

);

477  const int

k_num_hsps_start = 12;

478  const int

k_num_hsps_end = 10;

483

unique_ptr<SSeqLoc> qsl(

485

unique_ptr<SSeqLoc> ssl(

489  CBl2Seq

blaster(*qsl, *ssl, opts_handle);

500  prog

, strand_opt, &query_info);

502

query_info, &query_blk,

prog

, strand_opt, blast_msg);

504

BOOST_REQUIRE(m->empty());

516

hsp_list->

hspcnt

= k_num_hsps_start;

518

hsp_list->

hsp_max

= k_num_hsps_start;

524  const int

query_offset[k_num_hsps_start] = { 0, 3864, 3254, 1828, 2189, 795, 607, 1780, 1363, 2751, 3599, 242};

525  const int

query_end[k_num_hsps_start] = { 307, 4287, 3556, 2058, 2269, 914, 741, 1821, 1451, 2810, 3631, 285};

526  const int

subject_offset[k_num_hsps_start] = { 1, 2723, 2267, 1028, 1292, 634, 501, 925, 1195, 1795, 477, 1233};

527  const int

subject_end[k_num_hsps_start] = { 321, 3171, 2537, 1243, 1371, 749, 618, 966, 1286, 1869, 509, 1276};

528  const int

score[k_num_hsps_start] = { 370, 319, 139, 120, 89, 84, 75, 70, 69, 60, 47, 43};

529  const int

query_gapped_start[k_num_hsps_start] = { 47, 4181, 3286, 2034, 2228, 871, 632, 1798, 1383, 2759, 3606, 259};

530  const int

subject_gapped_start[k_num_hsps_start] = { 48, 3073, 2299, 1219, 1330, 709, 526, 943, 1215, 1803, 484, 1250};

532  for

(

int

index=0; index<k_num_hsps_start; index++)

562

hsp_stream, query_blk, query_info, seq_src, &

results

);

566  const int

query_offset_final[k_num_hsps_end] = { 0, 3864, 3254, 1780, 2189, 607, 1363, 2751, 3599, 242};

567  const int

query_end_final[k_num_hsps_end] = { 307, 4287, 3556, 2058, 2599, 914, 1451, 2810, 3631, 285};

568  const int

subject_offset_final[k_num_hsps_end] = { 1, 2723, 2267, 925, 1292, 501, 1195, 1795, 477, 1233};

569  const int

subject_end_final[k_num_hsps_end] = { 321, 3171, 2537, 1243, 1704, 749, 1286, 1869, 509, 1276};

570  const int

score_final[k_num_hsps_end] = { 367, 319, 139, 131, 122, 104, 69, 60, 47, 43};

571  const int

query_gapped_start_final[k_num_hsps_end] = { 47, 4181, 3286, 2034, 2228, 871, 1383, 2759, 3606, 259};

572  const int

subject_gapped_start_final[k_num_hsps_end] = { 48, 3073, 2299, 1219, 1330, 709, 1215, 1803, 484, 1250};

573  const int

num_ident_final[k_num_hsps_end] = { 100, 122, 70, 61, 92, 54, 22, 18, 11, 9};

579

BOOST_REQUIRE(hsp_list !=

NULL

);

580

BOOST_REQUIRE_EQUAL(k_num_hsps_end, hsp_list->

hspcnt

);

581  for

(

int

index=0; index<k_num_hsps_end; index++)

584

BOOST_REQUIRE_EQUAL(query_offset_final[index], tmp_hsp->

query

.

offset

);

585

BOOST_REQUIRE_EQUAL(query_end_final[index], tmp_hsp->

query

.

end

);

586

BOOST_REQUIRE_EQUAL(subject_offset_final[index], tmp_hsp->

subject

.

offset

);

587

BOOST_REQUIRE_EQUAL(subject_end_final[index], tmp_hsp->

subject

.

end

);

588

BOOST_REQUIRE_EQUAL(score_final[index], tmp_hsp->

score

);

589

BOOST_REQUIRE_EQUAL(query_gapped_start_final[index], tmp_hsp->

query

.

gapped_start

);

591

BOOST_REQUIRE_EQUAL(num_ident_final[index], tmp_hsp->

num_ident

);

597

BOOST_REQUIRE(seq_src ==

NULL

);

601  const int

k_num_hsps_start = 16;

602  const int

k_num_hsps_end = 11;

607

unique_ptr<SSeqLoc> qsl(

609

unique_ptr<SSeqLoc> ssl(

616  CBl2Seq

blaster(*qsl, *ssl, opts_handle);

627  prog

, strand_opt, &query_info);

629

query_info, &query_blk,

prog

, strand_opt, blast_msg);

631

BOOST_REQUIRE(m->empty());

643

hsp_list->

hspcnt

= k_num_hsps_start;

645

hsp_list->

hsp_max

= k_num_hsps_start;

651  const int

query_offset[k_num_hsps_start] = { 149, 606, 656, 313, 221, 701, 57,

652

472, 0, 532, 404, 279, 125, 32, 371, 913};

653  const int

query_end[k_num_hsps_start] = { 189, 662, 705, 377, 281, 747, 138,

654

533, 33, 575, 472, 312, 150, 59, 405, 941};

655  const int

subject_offset[k_num_hsps_start] = { 58604, 59751, 59831, 58974,

656

58732, 59910, 58411, 59474, 58102, 59566, 59363, 58890, 58552, 58165, 59129, 9193};

657  const int

subject_end[k_num_hsps_start] = { 58644, 59807, 59880, 59038, 58792,

658

59956, 58489, 59535, 58135, 59609, 59432, 58923, 58577, 58192, 59163, 9221};

659  const int

score[k_num_hsps_start] = { 253, 237, 214, 193, 183, 178, 168, 165, 162,

660

149, 125, 120, 120, 113, 100, 55};

661  const int

subject_frame[k_num_hsps_start] = { -3, -2, -2, -2, -3, -2, -1, -3, -2,

662

-1, -2, -2, -3, -3, -3, 3};

663  const int

query_gapped_start[k_num_hsps_start] = { 173, 611, 662, 319, 254, 719, 72,

664

491, 11, 554, 438, 286, 131, 39, 379, 929};

665  const int

subject_gapped_start[k_num_hsps_start] = { 58629, 59756, 59837, 58980, 58765,

666

59928, 58426, 59493, 58113, 59588, 59399, 58897, 58558, 58172, 59137, 9209};

668  for

(

int

index=0; index<k_num_hsps_start; index++)

699

hsp_stream, query_blk, query_info, seq_src, &

results

);

703  const int

query_offset_final[k_num_hsps_end] = {606, 125, 279, 57, 472, 0, 532,

705  const int

query_end_final[k_num_hsps_end] = {747, 281, 377, 138, 533, 33, 575,

707  const int

subject_offset_final[k_num_hsps_end] = {59751, 58552, 58890, 58411, 59474,

708

58102, 59566, 59389, 58165, 59129, 9193};

709  const int

subject_end_final[k_num_hsps_end] = {59956, 58792, 59038, 58489, 59535,

710

58135, 59609, 59432, 58192, 59163, 9221};

711  const int

score_final[k_num_hsps_end] = {525, 465, 250, 167, 165, 162, 149,

713  const int

subject_frame_final[k_num_hsps_end] = {-2, -3, -2, -1, -3, -2,

715  const int

query_gapped_start_final[k_num_hsps_end] = {611, 173, 319, 72, 491,

716

11, 554, 438, 39, 379, 929};

717  const int

subject_gapped_start_final[k_num_hsps_end] = {59756, 58629,

718

58980, 58426, 59493, 58113, 59588, 59399, 58172, 59137, 9209};

719  const int

num_ident_final[k_num_hsps_end] = {116, 105, 54, 44, 27, 31, 29,

721  const int

nums[k_num_hsps_end] = {1, 1, 1, 1, 2, 2, 2, 1, 2, 1, 1};

726

BOOST_REQUIRE(hsp_list !=

NULL

);

727

BOOST_REQUIRE_EQUAL(k_num_hsps_end, hsp_list->

hspcnt

);

728  for

(

int

index=0; index<k_num_hsps_end; index++)

732

BOOST_REQUIRE_EQUAL(query_offset_final[index], tmp_hsp->

query

.

offset

);

733

BOOST_REQUIRE_EQUAL(query_end_final[index], tmp_hsp->

query

.

end

);

734

BOOST_REQUIRE_EQUAL(subject_offset_final[index], tmp_hsp->

subject

.

offset

);

735

BOOST_REQUIRE_EQUAL(subject_end_final[index], tmp_hsp->

subject

.

end

);

736

BOOST_REQUIRE_EQUAL(score_final[index], tmp_hsp->

score

);

737

BOOST_REQUIRE_EQUAL(subject_frame_final[index], (

int

) tmp_hsp->

subject

.

frame

);

738

BOOST_REQUIRE_EQUAL(query_gapped_start_final[index], tmp_hsp->

query

.

gapped_start

);

740

BOOST_REQUIRE_EQUAL(num_ident_final[index], tmp_hsp->

num_ident

);

741

BOOST_REQUIRE_EQUAL(nums[index], tmp_hsp->

num

);

747

BOOST_REQUIRE(seq_src ==

NULL

);

753  const int

kNumHsps = 3;

754  const int

q_offsets[kNumHsps] = { 1, 144, 203 };

755  const int

q_ends[kNumHsps] = { 151, 191, 226 };

756  const int

q_gapped_starts[kNumHsps] = { 23, 153, 209 };

757  const int

s_offsets[kNumHsps] = { 501, 655, 736 };

758  const int

s_ends[kNumHsps] = { 648, 702, 756 };

759  const int

s_gapped_starts[kNumHsps] = { 523, 664, 742 };

760  const int

s_frames[kNumHsps] = { 3, 1, 3 };

761  const int

scores[kNumHsps] = { 211, 91, 52 };

762  const Int8

kSearchSp = 20763230804LL;

763  const string

kDbName(

"data/nt.41646578"

);

778  for

(

int

index = 0; index < kNumHsps; ++index) {

780

hsp->

score

= scores[index];

789

hsp_list->

hspcnt

= kNumHsps;

807

BOOST_REQUIRE(writer_info ==

NULL

);

809

kProgramType, ext_options,

FALSE

, 1, writer);

812

BOOST_REQUIRE(hit_options ==

NULL

);

814

BOOST_REQUIRE(scoring_options ==

NULL

);

816

BOOST_REQUIRE(ext_options ==

NULL

);

843

BOOST_REQUIRE_EQUAL(kNumHsps, (

int

)crs[0].GetSeqAlign()->Size());

847  const int

k_num_hsps_start = 12;

848  const int

k_num_hsps_filtered = 6;

853

unique_ptr<SSeqLoc> qsl(

855

unique_ptr<SSeqLoc> ssl(

859  CBl2Seq

blaster(*qsl, *ssl, opts_handle);

870  prog

, strand_opt, &query_info);

872

query_info, &query_blk,

prog

, strand_opt, blast_msg);

874

BOOST_REQUIRE(m->empty());

886

hsp_list->

hspcnt

= k_num_hsps_start;

888

hsp_list->

hsp_max

= k_num_hsps_start;

894  const int

query_offset[k_num_hsps_start] = { 0, 3864, 3254, 1828, 2189, 795, 607, 1780, 1363, 2751, 3599, 242};

895  const int

query_end[k_num_hsps_start] = { 307, 4287, 3556, 2058, 2269, 914, 741, 1821, 1451, 2810, 3631, 285};

896  const int

subject_offset[k_num_hsps_start] = { 1, 2723, 2267, 1028, 1292, 634, 501, 925, 1195, 1795, 477, 1233};

897  const int

subject_end[k_num_hsps_start] = { 321, 3171, 2537, 1243, 1371, 749, 618, 966, 1286, 1869, 509, 1276};

898  const int

score[k_num_hsps_start] = { 370, 319, 139, 120, 89, 84, 75, 70, 69, 60, 47, 43};

899  const int

query_gapped_start[k_num_hsps_start] = { 47, 4181, 3286, 2034, 2228, 871, 632, 1798, 1383, 2759, 3606, 259};

900  const int

subject_gapped_start[k_num_hsps_start] = { 48, 3073, 2299, 1219, 1330, 709, 526, 943, 1215, 1803, 484, 1250};

902  for

(

int

index=0; index<k_num_hsps_start; index++)

933

hsp_stream, query_blk, query_info, seq_src, &

results

);

941

BOOST_REQUIRE(hsp_list !=

NULL

);

942

BOOST_REQUIRE_EQUAL(k_num_hsps_filtered, hsp_list->

hspcnt

);

947

BOOST_REQUIRE(seq_src ==

NULL

);

952  const int

k_num_hsps_start = 9;

953  const int

k_num_hsps_filtered = 4;

956

unique_ptr<SSeqLoc> qsl(

959

unique_ptr<SSeqLoc> ssl(

973  prog

, strand_opt, &query_info);

975

query_info, &query_blk,

prog

, strand_opt, blast_msg);

977

BOOST_REQUIRE(m->empty());

989

hsp_list->

hspcnt

= k_num_hsps_start;

991

hsp_list->

hsp_max

= k_num_hsps_start;

997  const int

query_offset[k_num_hsps_start] = { 6020, 6022, 6622, 6622, 5295, 5199, 7191, 3818, 7408};

998  const int

query_end[k_num_hsps_start] = { 6032, 6161, 6730, 6753, 5386, 5219, 7227, 3830, 7419};

999  const int

subject_offset[k_num_hsps_start] = { 98, 104, 241, 241, 16, 0, 378, 71, 63};

1000  const int

subject_end[k_num_hsps_start] = { 110, 241, 350, 376, 107, 20, 415, 83, 74};

1001  const int

score[k_num_hsps_start] = { 17, 115, 93, 91, 91, 20, 17, 12, 11};

1002  const int context

[k_num_hsps_start] = { 0, 0, 0, 0, 0, 0, 0, 1, 1};

1003  const int

subject_frame[k_num_hsps_start] = { 1, 1, 1, 1, 1, 1, 1, 1, 1};

1004  const int

query_gapped_start[k_num_hsps_start] = { 20, 6035, 6625, 6745, 5295, 5199, 7193, 3819, 7409};

1005  const int

subject_gapped_start[k_num_hsps_start] = { 115, 116, 244, 368, 16, 0, 380, 72, 64};

1007  for

(

int

index=0; index<k_num_hsps_start; index++)

1040

hsp_stream, query_blk, query_info, seq_src, &

results

);

1048

BOOST_REQUIRE(hsp_list !=

NULL

);

1049

BOOST_REQUIRE_EQUAL(k_num_hsps_filtered, hsp_list->

hspcnt

);

1054

BOOST_REQUIRE(seq_src ==

NULL

);

1060

hsp_list->

oid

= oid;

1061

hsp_list->

hspcnt

= num_hsps;

1063

hsp_list->

hsp_max

= num_hsps;

1067

vector<int> subject_offset;

1068  for

(

int i

=0;

i

< num_hsps;

i

++) {

1069

subject_offset.push_back(rand()%(

len

-range_len));

1072  for

(

int

index=0; index < num_hsps; index++) {

1089  string

rel_path =

"blast/algo/unit_tests/api/data/long_seqs"

;

1096

cout <<

"testUnit_TestsDataPath: Can't access: "

<< (

NCBI_GetTestDataPath

() + rel_path ) << endl;

1098

BOOST_REQUIRE(seqSrc !=

NULL

);

1104  string

rel_path =

"blast/algo/unit_tests/api/data/long_seqs"

;

1109

BOOST_REQUIRE(seqSrc !=

NULL

);

1112  const int

k_num_hsps = 6;

1115

hsp_list->

hspcnt

= k_num_hsps;

1117

hsp_list->

hsp_max

= k_num_hsps;

1121  const int

subject_offset[k_num_hsps] = { 0, 1110000, 98765, 1430868, 2134657, 25285936};

1123  for

(

int

index=0; index<k_num_hsps; index++) {

1141

BOOST_REQUIRE_EQUAL(ranges->

num_ranges

, 6);

1142

BOOST_REQUIRE_EQUAL(ranges->

ranges

[0], 0);

1143

BOOST_REQUIRE_EQUAL(ranges->

ranges

[11],

len

);

1148  string

rel_path =

"blast/algo/unit_tests/api/data/long_seqs"

;

1153

BOOST_REQUIRE(seqSrc !=

NULL

);

1156  const int

kMaxNum = 36;

1157  const int

kRangeLen = 10000;

1162

seq_arg_ref.

oid

= kOid;

1174 #pragma omp parallel for default(none) num_threads(8) schedule(guided) shared(seqSrc, len, kOid, seq_arg_array, hsp_list_array) 1175  for

(

i

= 0;

i

< kMaxNum;

i

++) {

1177

hsp_list_array[

i

] = hsp_list;

1180

seq_arg->

oid

= hsp_list->

oid

;

1186

seq_arg_array[

i

] = seq_arg;

1194  for

(

int

k=0; k < kMaxNum; k++) {

1197  for

(

int

j =0; j < hsp_list->

hspcnt

; j++){

1204  free

(seq_arg_array[k]);

1205  free

(hsp_list_array[k]);

1207  free

(seq_arg_array);

1208  free

(hsp_list_array);

Declares the CBl2Seq (BLAST 2 Sequences) class.

BlastSeqLoc * BlastSeqLocFree(BlastSeqLoc *loc)

Deallocate all BlastSeqLoc objects in a chain.

Structures and functions prototypes used for BLAST gapped extension.

BlastGapAlignStruct * BLAST_GapAlignStructFree(BlastGapAlignStruct *gap_align)

Deallocates memory in the BlastGapAlignStruct structure.

BlastHSP * Blast_HSPNew(void)

Allocate and zeros out memory for an HSP structure.

BlastHSPResults * Blast_HSPResultsFree(BlastHSPResults *results)

Deallocate memory for BLAST results.

BlastHSPList * Blast_HSPListNew(Int4 hsp_max)

Creates HSP list structure with a default size HSP array.

BlastHSP * Blast_HSPFree(BlastHSP *hsp)

Deallocate memory for an HSP structure.

void Blast_HSPListSortByScore(BlastHSPList *hsp_list)

Sort the HSPs in an HSP list by score.

BlastHSPWriter * BlastHSPWriterNew(BlastHSPWriterInfo **writer_info, BlastQueryInfo *query_info, BLAST_SequenceBlk *query)

A generic function to create writer.

Declaration of ADT to save and retrieve lists of HSPs in the BLAST engine.

int BlastHSPStreamWrite(BlastHSPStream *hsp_stream, BlastHSPList **hsp_list)

Invokes the user-specified write function for this BlastHSPStream implementation.

BlastHSPStream * BlastHSPStreamFree(BlastHSPStream *hsp_stream)

Frees the BlastHSPStream structure by invoking the destructor function set by the user-defined constr...

BlastHSPStream * BlastHSPStreamNew(EBlastProgramType program, const BlastExtensionOptions *extn_opts, Boolean sort_on_read, Int4 num_queries, BlastHSPWriter *writer)

Initialize the HSP stream.

Common definitions for protein and nucleotide lookup tables.

Blast_Message * Blast_MessageFree(Blast_Message *blast_msg)

Deallocates message memory.

Declares the CBlastNucleotideOptionsHandle class.

Definitions which are dependant on the NCBI C++ Object Manager.

BlastHitSavingOptions * BlastHitSavingOptionsFree(BlastHitSavingOptions *options)

Deallocate memory for BlastHitSavingOptions.

Int2 BlastScoringOptionsNew(EBlastProgramType program, BlastScoringOptions **options)

Allocate memory for BlastScoringOptions and fill with default values.

BlastExtensionOptions * BlastExtensionOptionsFree(BlastExtensionOptions *options)

Deallocate memory for BlastExtensionOptions.

Int2 BlastHitSavingOptionsNew(EBlastProgramType program, BlastHitSavingOptions **options, Boolean gapped_calculation)

Allocate memory for BlastHitSavingOptions.

BlastScoringOptions * BlastScoringOptionsFree(BlastScoringOptions *options)

Deallocate memory for BlastScoringOptions.

Int2 BlastExtensionOptionsNew(EBlastProgramType program, BlastExtensionOptions **options, Boolean gapped)

Allocate memory for BlastExtensionOptions and fill with default values.

Declares the CBlastOptionsHandle and CBlastOptionsFactory classes.

BlastHitSavingParameters * BlastHitSavingParametersFree(BlastHitSavingParameters *parameters)

Deallocate memory for BlastHitSavingOptions*.

BlastEffectiveLengthsParameters * BlastEffectiveLengthsParametersFree(BlastEffectiveLengthsParameters *parameters)

Deallocate memory for BlastEffectiveLengthsParameters*.

BlastExtensionParameters * BlastExtensionParametersFree(BlastExtensionParameters *parameters)

Deallocate memory for BlastExtensionParameters.

BlastScoringParameters * BlastScoringParametersFree(BlastScoringParameters *parameters)

Deallocate memory for BlastScoringParameters.

EBlastProgramType

Defines the engine's notion of the different applications of the BLAST algorithm.

Declares the CBlastProteinOptionsHandle class.

Defines interface for retrieving sequence identifiers.

Int4 BlastSeqSrcGetSeqLen(const BlastSeqSrc *seq_src, void *oid)

Retrieve sequence length (number of residues/bases)

BlastSeqSrc * BlastSeqSrcCopy(const BlastSeqSrc *seq_src)

Copy function: needed to guarantee thread safety.

char * BlastSeqSrcGetInitError(const BlastSeqSrc *seq_src)

Function to retrieve NULL terminated string containing the description of an initialization error or ...

BlastSeqSrc * BlastSeqSrcFree(BlastSeqSrc *seq_src)

Frees the BlastSeqSrc structure by invoking the destructor function set by the user-defined construct...

Int2 BlastSeqSrcGetSequence(const BlastSeqSrc *seq_src, BlastSeqSrcGetSeqArg *getseq_arg)

Retrieve an individual sequence.

BlastSeqSrcSetRangesArg * BlastSeqSrcSetRangesArgFree(BlastSeqSrcSetRangesArg *arg)

free setrangearg

Utilities initialize/setup BLAST.

Int2 BLAST_MainSetUp(EBlastProgramType program_number, const QuerySetUpOptions *qsup_options, const BlastScoringOptions *scoring_options, BLAST_SequenceBlk *query_blk, const BlastQueryInfo *query_info, double scale_factor, BlastSeqLoc **lookup_segments, BlastMaskLoc **mask, BlastScoreBlk **sbpp, Blast_Message **blast_message, GET_MATRIX_PATH get_path)

"Main" setup routine for BLAST.

Int2 BLAST_GapAlignSetUp(EBlastProgramType program_number, const BlastSeqSrc *seq_src, const BlastScoringOptions *scoring_options, const BlastEffectiveLengthsOptions *eff_len_options, const BlastExtensionOptions *ext_options, const BlastHitSavingOptions *hit_options, BlastQueryInfo *query_info, BlastScoreBlk *sbp, BlastScoringParameters **score_params, BlastExtensionParameters **ext_params, BlastHitSavingParameters **hit_params, BlastEffectiveLengthsParameters **eff_len_params, BlastGapAlignStruct **gap_align)

Set up the auxiliary structures for gapped alignment / traceback only.

BlastScoreBlk * BlastScoreBlkFree(BlastScoreBlk *sbp)

Deallocates BlastScoreBlk as well as all associated structures.

Functions to do gapped alignment with traceback.

Int2 Blast_HSPUpdateWithTraceback(BlastGapAlignStruct *gap_align, BlastHSP *hsp)

Modifies the HSP data after the final gapped alignment.

BlastSeqSrcSetRangesArg * BLAST_SetupPartialFetching(EBlastProgramType program_number, BlastSeqSrc *seq_src, const BlastHSPList **hsp_list, Int4 num_hsplists)

Attempts to set up partial fetching, if it fails (e.g.

EBlastEncoding Blast_TracebackGetEncoding(EBlastProgramType program_number)

Get the subject sequence encoding type for the traceback, given a program number.

Int2 BLAST_ComputeTraceback(EBlastProgramType program_number, BlastHSPStream *hsp_stream, BLAST_SequenceBlk *query, BlastQueryInfo *query_info, const BlastSeqSrc *seq_src, BlastGapAlignStruct *gap_align, BlastScoringParameters *score_params, const BlastExtensionParameters *ext_params, BlastHitSavingParameters *hit_params, BlastEffectiveLengthsParameters *eff_len_params, const BlastDatabaseOptions *db_options, const PSIBlastOptions *psi_options, const BlastRPSInfo *rps_info, SPHIPatternSearchBlk *pattern_blk, BlastHSPResults **results, TInterruptFnPtr interrupt_search, SBlastProgress *progress_info)

Given the preliminary alignment results from a database search, redo the gapped alignment with traceb...

Definitions of special type used in BLAST.

EProgram

This enumeration is to evolve into a task/program specific list that specifies sets of default parame...

@ eBlastn

Nucl-Nucl (traditional blastn)

@ eTblastn

Protein-Translated nucl.

BLAST_SequenceBlk * BlastSequenceBlkFree(BLAST_SequenceBlk *seq_blk)

Deallocate memory for a sequence block.

BOOST_AUTO_TEST_SUITE_END() static int s_GetSegmentFlags(const CBioseq &bioseq)

Declares the CBlastxOptionsHandle class.

Wrapper class for BLAST_SequenceBlk .

Runs the BLAST algorithm between 2 sequences.

Handle to the nucleotide-nucleotide options to the BLAST algorithm.

Encapsulates ALL the BLAST algorithm's options.

Handle to the protein-protein options to the BLAST algorithm.

Wrapper class for BlastQueryInfo .

Wrapper class for BlastSeqSrc .

NCBI C++ Object Manager dependant implementation of IQueryFactory.

Search Results for All Queries.

Handle to the protein-translated nucleotide options to the BLAST algorithm.

CRef< blast::CBlastSearchQuery > CreateBlastSearchQuery(objects::CSeq_id &id, objects::ENa_strand s=objects::eNa_strand_unknown)

static CTestObjMgr & Instance()

static BlastHSPStream * x_MakeStream(const CBlastOptions &opt)

void x_SetupMain(const CBlastOptions &opt, const CBLAST_SequenceBlk &query_blk, const CBlastQueryInfo &query_info)

void x_SetupGapAlign(const CBlastOptions &opt, const BlastSeqSrc *seq_src, const CBlastQueryInfo &query_info)

void x_ComputeTracebak(const CBlastOptions &opt, BlastHSPStream *hsp_stream, const CBLAST_SequenceBlk &query_blk, const CBlastQueryInfo &query_info, const BlastSeqSrc *seq_src, BlastHSPResults **results)

typedef for the messages for an entire BLAST search, which could be comprised of multiple query seque...

@ eNoCompositionBasedStats

Don't use composition based statistics.

Declares the CDiscNucleotideOptionsHandle class.

BlastHitSavingOptions * GetHitSaveOpts() const

Returns BlastHitSavingOptions for eLocal objects, NULL for eRemote.

void SetCompositionBasedStats(ECompoAdjustModes mode)

BlastSeqSrc * Get() const

const CBlastOptionsHandle & GetOptionsHandle() const

Retrieve the options handle.

void SetQueryCovHspPerc(double p)

Sets QueryCovHspPerc.

void SetDbLength(Int8 len)

Sets DbLength.

void SetMatchReward(int r)

Sets MatchReward.

BlastExtensionOptions * GetExtnOpts() const

Returns BlastExtensionOptions for eLocal objects, NULL for eRemote.

BlastSeqSrc * SeqDbBlastSeqSrcInit(const string &dbname, bool is_prot, Uint4 first_seq=0, Uint4 last_seq=0, Int4 mask_algo_id=-1, ESubjectMaskingType mask_type=eNoSubjMasking)

Initialize the sequence source structure.

CStructWrapper< TData > * WrapStruct(TData *obj, TData *(*del)(TData *))

Auxiliary function to create a CStructWrapper for a pointer to an object.

void SetupQueries(TSeqLocVector &queries, BlastQueryInfo *qinfo, BLAST_SequenceBlk **seqblk, EBlastProgramType prog, objects::ENa_strand strand_opt, TSearchMessages &messages)

Populates BLAST_SequenceBlk with sequence data for use in CORE BLAST.

objects::ENa_strand GetStrandOption() const

void SetEffectiveSearchSpace(Int8 eff)

Sets EffectiveSearchSpace.

CRef< CSearchResultSet > Run()

Run the traceback search.

static CBlastOptionsHandle * Create(EProgram program, EAPILocality locality=CBlastOptions::eLocal)

Creates an options handle object configured with default options for the requested program,...

CBlastOptions & SetOptions()

Returns a reference to the internal options class which this object is a handle for.

void SetTraditionalBlastnDefaults()

Sets TraditionalBlastnDefaults.

BlastSeqSrc * MultiSeqBlastSeqSrcInit(TSeqLocVector &seq_vector, EBlastProgramType program, bool dbscan_mode=false)

Initialize the sequence source structure.

BlastEffectiveLengthsOptions * GetEffLenOpts() const

Returns BlastEffectiveLengthsOptions for eLocal objects, NULL for eRemote.

void SetMaxHspsPerSubject(int m)

Sets MaxHspPerSubjectQueryPair.

EBlastProgramType GetProgramType() const

Returns the CORE BLAST notion of program type.

const CBlastOptions & GetOptions() const

Return the object which this object is a handle for.

BlastScoringOptions * GetScoringOpts() const

Returns BlastScoringOptions for eLocal objects, NULL for eRemote.

char * BlastFindMatrixPath(const char *matrix_name, Boolean is_prot)

Returns the path to a specified matrix.

void SetGapXDropoffFinal(double x)

Sets GapXDropoffFinal.

QuerySetUpOptions * GetQueryOpts() const

Returns QuerySetUpOptions for eLocal objects, NULL for eRemote.

const TSeqLocVector & GetQueries() const

Retrieve a vector of query sequences.

CBlastOptionsHandle & SetOptionsHandle()

Set the options handle.

void SetupQueryInfo(TSeqLocVector &queries, EBlastProgramType prog, objects::ENa_strand strand_opt, BlastQueryInfo **qinfo)

Allocates the query information structure and fills the context offsets, in case of multiple queries,...

BlastDatabaseOptions * GetDbOpts() const

Returns BlastDatabaseOptions for eLocal objects, NULL for eRemote.

void SetSegFiltering(bool val=true)

size_type GetNumResults() const

Return the number of results contained by this object.

const TSeqLocVector & GetSubjects() const

Retrieve a vector of subject sequences.

#define ITERATE(Type, Var, Cont)

ITERATE macro to sequence through container elements.

static char GetPathSeparator(void)

Get path separator symbol specific for the current platform.

static string ConcatPath(const string &first, const string &second)

Concatenate two parts of the path for the current OS.

int32_t Int4

4-byte (32-bit) signed integer

uint32_t Uint4

4-byte (32-bit) unsigned integer

int64_t Int8

8-byte (64-bit) signed integer

ENa_strand

strand of nucleic acid

@ eNa_strand_both

in forward orientation

Implementation of a number of BlastHSPWriters to save hits from a BLAST search, and subsequently retu...

BlastHSPCollectorParams * BlastHSPCollectorParamsNew(const BlastHitSavingOptions *hit_options, Int4 compositionBasedStats, Boolean gapped_calculation)

Sets up parameter set for use by collector.

BlastHSPWriterInfo * BlastHSPCollectorInfoNew(BlastHSPCollectorParams *params)

WriterInfo to create a default writer: the collecter.

Utility functions for lookup table generation.

void CheckForBlastSeqSrcErrors(const BlastSeqSrc *seqsrc)

Magic spell ;-) needed for some weird compilers... very empiric.

#define FALSE

bool replacment for C indicating false.

Defines classes: CDirEntry, CFile, CDir, CSymLink, CMemoryFile, CFileUtil, CFileLock,...

Defines: CTimeFormat - storage class for time format.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

Defines a concrete strategy for the IBlastSeqInfoSrc interface for sequence identifiers retrieval fro...

Implementation of the BlastSeqSrc interface for a vector of sequence locations.

Implementation of the BlastSeqSrc interface using the C++ BLAST databases API.

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

vector< SSeqLoc > TSeqLocVector

Vector of sequence locations.

Uint1 * sequence_start

Start of sequence, usually one byte before sequence as that byte is a NULL sentinel byte.

Parameters for setting up effective lengths and search spaces.

Options used for gapped extension These include: a.

Int4 compositionBasedStats

mode of compositional adjustment to use; if zero then compositional adjustment is not used

Computed values used as parameters for gapped alignments.

Structure supporting the gapped alignment.

Int4 query_stop

query end offseet of current alignment

Int4 subject_start

subject start offset current alignment

Int4 query_start

query start offset of current alignment

Int4 subject_stop

subject end offset of current alignment

Int4 score

Return value: alignment score.

GapEditScript * edit_script

The traceback (gap) information.

The structure to hold all HSPs for a given sequence after the gapped alignment.

Boolean do_not_reallocate

Is reallocation of the hsp_array allowed?

Int4 oid

The ordinal id of the subject sequence this HSP list is for.

Int4 hspcnt

Number of HSPs saved.

BlastHSP ** hsp_array

Array of pointers to individual HSPs.

Int4 hsp_max

The maximal number of HSPs allowed to be saved.

Int4 allocated

The allocated size of the hsp_array.

The structure to contain all BLAST results, for multiple queries.

Default implementation of BlastHSPStream.

A wrap of data structure used to create a writer.

ADT definition of BlastHSPWriter.

Structure holding all information about an HSP.

Int4 num_ident

Number of identical base pairs in this HSP.

BlastSeg query

Query sequence info.

Int4 context

Context number of query.

Int4 num

How many HSP's are linked together for sum statistics evaluation? If unset (0), this HSP is not part ...

BlastSeg subject

Subject sequence info.

GapEditScript * gap_info

ALL gapped alignment is here.

Int4 score

This HSP's raw score.

The structure to contain all BLAST results for one query sequence.

BlastHSPList ** hsplist_array

Array of HSP lists for individual database hits.

Options used when evaluating and saving hits These include: a.

Parameter block that contains a pointer to BlastHitSavingOptions and the values derived from it.

Structure used for scoring calculations.

Scoring options block Used to produce the BlastScoreBlk structure This structure may be needed for lo...

Boolean gapped_calculation

gap-free search if FALSE

Scoring parameters block Contains scoring-related information that is actually used for the blast sea...

Int4 gapped_start

Where the gapped extension started.

Int2 frame

Translation frame.

Int4 offset

Start of hsp.

Used to hold a set of positions, mostly used for filtering.

Structure used as the second argument to functions satisfying the GetSeqBlkFnPtr signature,...

Int4 oid

Oid in BLAST database, index in an array of sequences, etc [in].

Boolean reset_ranges

This option allows the BLAST engine to communicate with the BlastSeqSrc that the offset ranges for a ...

EBlastEncoding encoding

Encoding of sequence, i.e.

Boolean check_oid_exclusion

Check whether an OID is excluded due to overlapping filtering.

BlastSeqSrcSetRangesArg * ranges

BLAST_SequenceBlk * seq

Sequence to return, if NULL, it should allocated by GetSeqBlkFnPtr (using BlastSeqBlkNew or BlastSetU...

Structure used as the argument to function SetRanges.

Int4 * ranges

Ranges in sorted order [in].

Int4 num_ranges

Number of actual ranges contained.

Complete type definition of Blast Sequence Source ADT.

Structure to hold the a message from the core of the BLAST engine.

Edit script: linked list of correspondencies between two sequences.

Declares the CTBlastnOptionsHandle class.

Utility stuff for more convenient using of Boost.Test library.

Defines location of test data folder at NCBI.

static const char * NCBI_GetTestDataPath(void)

Get the directory where test data is stored at NCBI.

NOTE: This file contains work in progress and the APIs are likely to change, please do not rely on th...

BlastHSPList * s_GetHSPList(int num_hsps, int oid, int len, int range_len)

BOOST_AUTO_TEST_CASE(testHSPUpdateWithTraceback)

static CS_CONTEXT * context

voidp calloc(uInt items, uInt size)


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