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

NCBI C++ ToolKit: src/algo/blast/core/link_hsps.c Source File

161  Int4

context1, context2;

171  if

(context1 < context2)

173  else if

(context1 > context2)

239  Int4

context1, context2;

249  if

(context1 < context2)

251  else if

(context1 > context2)

336  Int4

context1, context2;

346  if

(context1 < context2)

348  else if

(context1 > context2)

396

memset(hsp, 0,

sizeof

(

BlastHSP

));

420  LinkHSPStruct

*

H

,* H2,* best[2],* first_hsp,* last_hsp,** hp_frame_start;

425  Int4

maxscore, cutoff[2];

426  Boolean

linked_set, ignore_small_gaps;

427  double

gap_decay_rate, gap_prob,

prob

[2];

428  Int4

index, index1, num_links, frame_index;

430  Int4

num_query_frames, num_subject_frames;

431  Int4

*hp_frame_number;

433  Int4

number_of_hsps, total_number_of_hsps;

434  Int4

query_length, length_adjustment;

435  Int4

subject_length_orig = subject_length;

437  Int4

H2_index,H_index;

440  Int4

first_pass, use_current_max;

447  if

(hsp_list ==

NULL

)

452

lh_helper_size =

MAX

(1024,hsp_list->

hspcnt

+5);

456  if

(gapped_calculation)

461

total_number_of_hsps = hsp_list->

hspcnt

;

463

number_of_hsps = total_number_of_hsps;

468

gap_prob = link_hsp_params->

gap_prob

;

474

num_subject_frames = 1;

478  for

(index = 0; index < total_number_of_hsps; ++index) {

480

link_hsp_array[index]->

hsp

= hsp_array[index];

484  if

(kTranslatedQuery) {

485

qsort(link_hsp_array,total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

488

qsort(link_hsp_array,total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

495

ignore_small_gaps = (cutoff[0] == 0);

505

hp_frame_number =

calloc

(num_subject_frames*num_query_frames,

sizeof

(

Int4

));

508

hp_frame_start[0] = link_hsp_array[0];

513  Int4

strand_factor = (kTranslatedQuery ? 3 : 1);

514  for

(index=0;index<number_of_hsps;index++)

516  H

=link_hsp_array[index];

517  H

->start_of_chain =

FALSE

;

518

hp_frame_number[cur_frame]++;

520  H

->prev= index ? link_hsp_array[index-1] :

NULL

;

521  H

->next= index<(number_of_hsps-1) ? link_hsp_array[index+1] :

NULL

;

522  if

(

H

->prev !=

NULL

&&

523

((

H

->hsp->context/strand_factor) !=

524

(

H

->prev->hsp->context/strand_factor) ||

525

(

SIGN

(

H

->hsp->subject.frame) !=

SIGN

(

H

->prev->hsp->subject.frame))))

527

hp_frame_number[cur_frame]--;

528

hp_frame_number[++cur_frame]++;

529

hp_frame_start[cur_frame] =

H

;

530  H

->prev->next =

NULL

;

534

num_query_frames = cur_frame+1;

540  for

(index=0;index<number_of_hsps;index++)

542  Int4

q_length, s_length;

543  H

= link_hsp_array[index];

548  H

->q_end_trim = hsp->

query

.

end

-

MIN

(q_length, trim_size);

553  for

(frame_index=0; frame_index<num_query_frames; frame_index++)

556

hp_start->

next

= hp_frame_start[frame_index];

557

hp_frame_start[frame_index]->

prev

= hp_start;

558

number_of_hsps = hp_frame_number[frame_index];

562

query_length =

MAX

(query_length - length_adjustment, 1);

563

subject_length = subject_length_orig;

571

subject_length =

MAX

(subject_length - length_adjustment, 1);

573

lh_helper[0].

ptr

= hp_start;

576

lh_helper[0].

maxsum1

= -10000;

587  H

->hsp_link.changed=1;

589  while

(number_of_hsps > 0)

594

best[0] = best[1] =

NULL

;

607  if

(!ignore_small_gaps){

611  Int4

sum0=

H

->hsp_link.sum[0];

612  Int4

sum1=

H

->hsp_link.sum[1];

625

maxscore = -cutoff[1];

627  Int4

sum=

H

->hsp_link.sum[1];

635  if

(path_changed==0){

643  if

(!ignore_small_gaps){

644  for

(

H

=best[0];

H

!=

NULL

;

H

=

H

->hsp_link.link[0])

645  if

(

H

->linked_to==-1000) {use_current_max=0;

break

;}

648  for

(

H

=best[1];

H

!=

NULL

;

H

=

H

->hsp_link.link[1])

649  if

(

H

->linked_to==-1000) {use_current_max=0;

break

;}

659  if

(!use_current_max){

660  for

(

H

=hp_start,H_index=1;

H

!=

NULL

;

H

=

H

->next,H_index++) {

661  Int4

s_frame =

H

->hsp->subject.frame;

662  Int4

s_off_t =

H

->s_offset_trim;

663  Int4

q_off_t =

H

->q_offset_trim;

664

lh_helper[H_index].

ptr

=

H

;

668

lh_helper[H_index].sum[

i

] =

H

->hsp_link.sum[

i

];

670  MAX

(

max

[

SIGN

(s_frame)+1],

H

->hsp_link.sum[1]);

676  Int4

cur_sum=lh_helper[H_index].

sum

[1];

679  while

((cur_sum>=prev_sum) && (

prev

>0)){

681

prev_sum = lh_helper[

prev

].

sum

[1];

688

lh_helper[1].

maxsum1

= -10000;

691  if

(!ignore_small_gaps)

694

maxscore = -cutoff[index];

696  for

(

H

=hp_start->

next

;

H

!=

NULL

;

H

=

H

->next,H_index++)

700  double

H_hsp_xsum=0.0;

702  if

(

H

->hsp->score > cutoff[index]) {

703  Int4

H_query_etrim =

H

->q_end_trim;

704  Int4

H_sub_etrim =

H

->s_end_trim;

710  for

(H2_index=H_index-1; H2_index>1; H2_index=H2_index-1)

713  Int4

q_off_t,s_off_t,sum;

720

b1 = q_off_t <= H_query_etrim;

721

b2 = s_off_t <= H_sub_etrim;

722

sum = lh_helper[H2_index].

sum

[index];

725

b4 = ( q_off_t > H_q_et_gap ) ;

726

b5 = ( s_off_t > H_s_et_gap ) ;

733  if

(q_off_t > (H_q_et_gap+trim_size))

736  if

(b1|b2|b5|b4)

continue

;

740

H2=lh_helper[H2_index].

ptr

;

749  Int4

score=

H

->hsp->score;

751

H_hsp_xsum + score*kbp[

H

->hsp->context]->

Lambda

-

752

kbp[

H

->hsp->context]->

logK

;

753  Int4

new_sum = H_hsp_sum + (score - cutoff[index]);

755  H

->hsp_link.sum[index] = new_sum;

756  H

->hsp_link.num[index] = H_hsp_num+1;

757  H

->hsp_link.link[index] = H_hsp_link;

758

lh_helper[H_index].

sum

[index] = new_sum;

759  if

(new_sum >= maxscore)

764  H

->hsp_link.xsum[index] = new_xsum;

772

maxscore = -cutoff[index];

774  for

(

H

=hp_start->

next

;

H

!=

NULL

;

H

=

H

->next,H_index++)

778  double

H_hsp_xsum=0.0;

781  H

->hsp_link.changed=1;

782

H2 =

H

->hsp_link.link[index];

794  H

->hsp_link.changed=0;

795

}

else if

(

H

->hsp->score > cutoff[index]) {

796  Int4

H_query_etrim =

H

->q_end_trim;

797  Int4

H_sub_etrim =

H

->s_end_trim;

812  if

(!first_pass&&H2&&H2->

linked_to

>=0){

827  for

(H2_index=H_index-1; H2_index>1;)

830  Int4

q_off_t,s_off_t,sum,next_larger;

832

sum = H2_helper->

sum

[index];

838

b0 = sum <= H_hsp_sum;

843

H2_index=next_larger;

847

b1 = q_off_t <= H_query_etrim;

848

b2 = s_off_t <= H_sub_etrim;

850  if

(0)

if

(H2_helper->

maxsum1

<=H_hsp_sum)

break

;

854

H2 = H2_helper->

ptr

;

864  Int4

score=

H

->hsp->score;

866

H_hsp_xsum + score*kbp[

H

->hsp->context]->

Lambda

-

867

kbp[

H

->hsp->context]->

logK

;

868  Int4

new_sum = H_hsp_sum + (score - cutoff[index]);

870  H

->hsp_link.sum[index] = new_sum;

871  H

->hsp_link.num[index] = H_hsp_num+1;

872  H

->hsp_link.link[index] = H_hsp_link;

873

lh_helper[H_index].

sum

[index] = new_sum;

874

lh_helper[H_index].

maxsum1

=

MAX

(lh_helper[H_index-1].maxsum1, new_sum);

877  Int4

cur_sum=lh_helper[H_index].

sum

[1];

880  while

((cur_sum>=prev_sum) && (

prev

>0)){

882

prev_sum = lh_helper[

prev

].

sum

[1];

887  if

(new_sum >= maxscore)

892  H

->hsp_link.xsum[index] = new_xsum;

901  if

(!ignore_small_gaps)

911

best[0]->hsp_link.num[0], best[0]->

hsp_link

.

xsum

[0],

912

query_length, subject_length,

915

best[0]->hsp_link.num[0]) );

918  if

( best[0]->hsp_link.num[0] > 1 ) {

919  if

( gap_prob == 0 || (

prob

[0] /= gap_prob) >

INT4_MAX

) {

926

query_length, subject_length,

929

best[1]->hsp_link.num[1]));

931  if

( best[1]->hsp_link.num[1] > 1 ) {

932  if

( 1 - gap_prob == 0 || (

prob

[1] /= 1 - gap_prob) >

INT4_MAX

) {

946

best[1]->hsp_link.num[1],

948

query_length, subject_length,

951

best[1]->hsp_link.num[1]));

956

best[ordering_method]->

hsp

->

evalue

=

prob

[ordering_method];

959  if

(best[ordering_method]->hsp_link.link[ordering_method])

964  if

(best[ordering_method]->linked_to>0) path_changed=1;

965  for

(

H

=best[ordering_method];

H

!=

NULL

;

966  H

=

H

->hsp_link.link[ordering_method])

968  if

(

H

->linked_to>1) path_changed=1;

970  H

->hsp_link.changed=1;

972  H

->linked_set = linked_set;

973  H

->ordering_method = ordering_method;

974  H

->hsp->evalue =

prob

[ordering_method];

976

(

H

->next)->

prev

=

H

->prev;

978

(

H

->prev)->

next

=

H

->next;

985  sfree

(hp_frame_start);

986  sfree

(hp_frame_number);

990  if

(kTranslatedQuery) {

991

qsort(link_hsp_array,total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

993

qsort(link_hsp_array, total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

996

qsort(link_hsp_array,total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

998

qsort(link_hsp_array, total_number_of_hsps,

sizeof

(

LinkHSPStruct

*),

1005  for

(index=0, last_hsp=

NULL

;index<total_number_of_hsps; index++)

1007  H

= link_hsp_array[index];

1014  for

(index=0, last_hsp=

NULL

;index<total_number_of_hsps; index++)

1016  H

= link_hsp_array[index];

1019  if

(

H

->linked_set ==

TRUE

&&

H

->start_of_chain ==

FALSE

)

1024  if

(last_hsp ==

NULL

)

1026  H

->prev = last_hsp;

1027

ordering_method =

H

->ordering_method;

1028  if

(

H

->hsp_link.link[ordering_method] ==

NULL

)

1033

H2 = index1<(total_number_of_hsps-1) ? link_hsp_array[index1+1] :

NULL

;

1038

H2 = index1<(total_number_of_hsps-1) ? link_hsp_array[index1+1] :

NULL

;

1045

num_links =

H

->hsp_link.num[ordering_method];

1046

link =

H

->hsp_link.link[ordering_method];

1049  H

->hsp->num = num_links;

1050  H

->xsum =

H

->hsp_link.xsum[ordering_method];

1052  H

->prev = last_hsp;

1056

link =

H

->hsp_link.link[ordering_method];

1061  H

->hsp->num = num_links;

1062  H

->xsum =

H

->hsp_link.xsum[ordering_method];

1065

H2 = index1<(total_number_of_hsps-1) ? link_hsp_array[index1+1] :

NULL

;

1070

H2 = index1<(total_number_of_hsps-1) ? link_hsp_array[index1+1] :

NULL

;

1073  H

->prev = last_hsp;

1080  for

(index = 0,

H

= first_hsp; index < hsp_list->

hspcnt

; index++) {

1087  sfree

(link_hsp_array);

1122  double

gap_decay_rate, sum_evalue;

1124  Int4

subject_eff_length, query_eff_length, len_adj;

1126  Int4

query_window_size;

1127  Int4

subject_window_size;

1132

subject_length/3 : subject_length;

1142

subject_eff_length =

MAX

(subject_eff_length - len_adj, 1);

1148

subject_window_size =

1153

num, *

sum_score

, query_eff_length, subject_eff_length,

1179  if

((*hp1)->queryId != (*hp2)->queryId)

1180  return

(*hp1)->queryId - (*hp2)->queryId;

1245  Int4

index, begin, end;

1249  while

(begin < end) {

1250

index = (begin + end) / 2;

1287  while

(begin < end) {

1288  Int4

right_index = (begin + end) / 2;

1289  Int4

left_index = qend_index_array[right_index];

1292

begin = right_index + 1;

1299

begin = right_index + 1;

1322  while

(hsp_set1->

prev

)

1323

hsp_set1 = hsp_set1->

prev

;

1325  while

(hsp_set2->

prev

)

1326

hsp_set2 = hsp_set2->

prev

;

1328

*merged_size = length = hsp_set1->

hsp

->

num

+ hsp_set2->

hsp

->

num

;

1334  while

(hsp_set1 || hsp_set2) {

1338  if

(!hsp_set2 || (hsp_set1 &&

1340

merged_hsps[index] = hsp_set1;

1341

hsp_set1 = hsp_set1->

next

;

1343

merged_hsps[index] = hsp_set2;

1344

hsp_set2 = hsp_set2->

next

;

1364  Int4

index, new_num;

1373

head_hsp = merged_hsps[0];

1375  for

(index = 0; index < new_num; ++index) {

1377  if

(index < new_num - 1) {

1379

link->

next

= next_link;

1380

next_link->

prev

= link;

1386

link->

hsp

->

num

= new_num;

1389  sfree

(merged_hsps);

1412  Int4

gap_s, gap_q, overlap;

1414  Int4

combined_size = 0;

1417  if

(!hsp_set1 || !hsp_set2 || !link_hsp_params)

1421  if

(hsp_set1->

prev

)

1426  for

( ; hsp_set2->

prev

; hsp_set2 = hsp_set2->

prev

);

1429  if

(hsp_set1 == hsp_set2)

1448

gap_q = link_hsp_params->

gap_size

;

1455

gap_s = link_hsp_params->

gap_size

;

1459  for

(index = 0; index < combined_size - 1; ++index) {

1491  sfree

(merged_hsps);

1493  if

(index < combined_size - 1)

1516  for

(index = 0; index < hspcnt; ++index) {

1518

link_hsp_array[index] =

1521

link_hsp_array[index]->

hsp

=

hsp

;

1525

link_hsp_array[index]->

queryId

=

1529

hsp_array[index]->

num

= 1;

1532  return

link_hsp_array;

1548  for

(index = 0; index < hspcnt; ++index)

1549  sfree

(link_hsp_array[index]);

1551  sfree

(link_hsp_array);

1568  Int4

** qend_index_ptr)

1573  Int4

current_end = 0;

1574  Int4

current_index = 0;

1577

*qend_index_ptr = qend_index_array = (

Int4

*)

calloc

(hspcnt,

sizeof

(

Int4

));

1578  if

(!qend_index_array)

1583  for

(index = 1; index < hspcnt; ++index) {

1584

link = hsp_array[index];

1587

current_index = index;

1590

qend_index_array[index] = current_index;

1624  Int4

hspcnt, index, index1;

1630  if

(!link_hsp_params || !sbp || !query_info)

1634  if

(!hsp_list || hsp_list->

hspcnt

<= 1)

1637  if

(gapped_calculation) {

1640

kbp_array = sbp->

kbp

;

1648

hspcnt = hsp_list->

hspcnt

;

1663

memcpy(offset_hsp_array, link_hsp_array, hspcnt*

sizeof

(

BlastLinkedHSPSet

*));

1672  for

(index = 0; index < hspcnt && score_hsp_array[index]; ) {

1673  double

best_evalue, best_sum_score = 0;

1676  Int4

hsp_index_left, hsp_index_right;

1683  while

(index<hspcnt && score_hsp_array[index] &&

1684

(score_hsp_array[index]->

next

||

1685

score_hsp_array[index]->

prev

))

1689

head_hsp = score_hsp_array[index];

1692  for

(tail_hsp = head_hsp; tail_hsp->

next

; tail_hsp = tail_hsp->

next

);

1694

best_evalue = head_hsp->

hsp

->

evalue

;

1704

head_hsp->

queryId

, left_offset);

1713  for

(index1 = hsp_index_left; index1 < hsp_index_right; ++index1) {

1723

link_hsp_params, program)) {

1727  if

((evalue =

s_SumHSPEvalue

(program, query_info, subject_length,

1728

link_hsp_params, head_hsp, lhsp,

1732

best_evalue = evalue;

1749  sfree

(score_hsp_array);

1750  sfree

(offset_hsp_array);

1751  sfree

(qend_index_array);

1768  if

(!hsp_list || hsp_list->

hspcnt

== 0)

1771  ASSERT

(link_hsp_params);

1775  for

(index = 0; index < hsp_list->

hspcnt

; ++index)

1781

subject_length, sbp, link_hsp_params,

1782

gapped_calculation);

1794

hsp_list, gapped_calculation,

FALSE

,sbp,

1798

subject_length, sbp, link_hsp_params,

1799

gapped_calculation);

1807  for

(index = 1; index < hsp_list->

hspcnt

; ++index) {

#define sfree(x)

Safe free a pointer: belongs to a higher level header.

#define CODON_LENGTH

Codons are always of length 3.

#define NUM_STRANDS

Number of frames in a nucleotide sequence.

#define NUM_FRAMES

Number of frames to which we translate in translating searches.

int ScoreCompareHSPs(const void *h1, const void *h2)

Comparison callback function for sorting HSPs, first by score in descending order,...

Int2 Blast_HSPListGetEvalues(EBlastProgramType program_number, const BlastQueryInfo *query_info, Int4 subject_length, BlastHSPList *hsp_list, Boolean gapped_calculation, Boolean RPS_prelim, const BlastScoreBlk *sbp, double gap_decay_rate, double scaling_factor)

Calculate the expected values for all HSPs in a hit list, without using the sum statistics.

void Blast_HSPListAdjustOddBlastnScores(BlastHSPList *hsp_list, Boolean gapped_calculation, const BlastScoreBlk *sbp)

For nucleotide BLAST, if the match reward score is equal to 2, random alignments are dominated by run...

void Blast_HSPListSortByScore(BlastHSPList *hsp_list)

Sort the HSPs in an HSP list by score.

Utilities for dealing with BLAST HSPs in the core of BLAST.

Boolean Blast_QueryIsTranslated(EBlastProgramType p)

Returns true if the query is translated.

Boolean Blast_QueryIsNucleotide(EBlastProgramType p)

Returns true if the query is nucleotide.

EBlastProgramType

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

Boolean Blast_SubjectIsTranslated(EBlastProgramType p)

Returns true if the subject is translated.

double BLAST_GapDecayDivisor(double decayrate, unsigned nsegs)

Compute a divisor used to weight the evalue of a collection of "nsegs" distinct alignments.

double BLAST_LargeGapSumE(Int2 num, double xsum, Int4 query_length, Int4 subject_length, Int8 searchsp_eff, double weight_divisor)

Calculates the e-value if a collection of distinct alignments with arbitrarily large gaps between the...

double BLAST_UnevenGapSumE(Int4 query_start_points, Int4 subject_start_points, Int2 num, double xsum, Int4 query_length, Int4 subject_length, Int8 searchsp_eff, double weight_divisor)

Calculates the e-value of a collection multiple distinct alignments with asymmetric gaps between the ...

double BLAST_SmallGapSumE(Int4 start_points, Int2 num, double xsum, Int4 query_length, Int4 subject_length, Int8 searchsp_eff, double weight_divisor)

Calculates the e-value for alignments with "small" gaps (typically under fifty residues/basepairs) fo...

Various auxiliary BLAST utility functions.

static DLIST_TYPE *DLIST_NAME() prev(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

static DLIST_TYPE *DLIST_NAME() next(DLIST_LIST_TYPE *list, DLIST_TYPE *item)

int16_t Int2

2-byte (16-bit) signed integer

int32_t Int4

4-byte (32-bit) signed integer

uint32_t Uint4

4-byte (32-bit) unsigned integer

if(yy_accept[yy_current_state])

static int s_RevCompareHSPsTransl(const void *v1, const void *v2)

Like s_RevCompareHSPs, except with additional logic to distinguish HSPs that lie within different str...

struct LinkHelpStruct LinkHelpStruct

The helper array contains the info used frequently in the inner for loops of the HSP linking algorith...

static Int2 s_BlastUnevenGapLinkHSPs(EBlastProgramType program, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation)

Greedy algorithm to link HSPs with uneven gaps.

static Int2 s_BlastEvenGapLinkHSPs(EBlastProgramType program_number, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation)

Perform even gap linking on a list of HSPs.

struct BlastLinkedHSPSet BlastLinkedHSPSet

Simple doubly linked list of HSPs, used for calculating sum statistics.

static int s_FwdCompareHSPsTransl(const void *v1, const void *v2)

Like s_FwdCompareHSPs, except with additional logic to distinguish HSPs that lie within different str...

static int s_FwdCompareLinkedHSPSets(const void *v1, const void *v2)

Callback for sorting an array of HSPs, encapsulated in BlastLinkedHSPSet structures,...

Int2 BLAST_LinkHsps(EBlastProgramType program_number, BlastHSPList *hsp_list, const BlastQueryInfo *query_info, Int4 subject_length, const BlastScoreBlk *sbp, const BlastLinkHSPParameters *link_hsp_params, Boolean gapped_calculation)

Link HSPs using sum statistics.

static int s_FwdCompareHSPs(const void *v1, const void *v2)

Callback used by qsort to sort a list of HSPs, encapsulated in LinkHSPStruct structures,...

static BlastLinkedHSPSet ** s_LinkedHSPSetArrayCleanUp(BlastLinkedHSPSet **link_hsp_array, Int4 hspcnt)

Frees the array of special structures, used for linking HSPs and restores the original contexts and s...

static int s_RevCompareHSPs(const void *v1, const void *v2)

Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of ...

static int s_SumScoreCompareLinkedHSPSets(const void *v1, const void *v2)

Callback used by qsort to sort a list of BlastLinkedHSPSet structures in order of decreasing sum scor...

ELinkOrderingMethod

Describes the method for ordering HSPs.

@ eLinkSmallGaps

favor small gaps when linking an HSP

@ eOrderingMethods

number of methods (last in list)

@ eLinkLargeGaps

favor large gaps when linking an HSP

static Int4 s_HSPOffsetBinarySearch(BlastLinkedHSPSet **hsp_array, Int4 size, Uint4 queryId, Int4 offset)

Find an HSP on the same queryId as the one given, with closest start offset that is greater than a sp...

static int s_RevCompareHSPsTbn(const void *v1, const void *v2)

Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of ...

static BlastLinkedHSPSet ** s_MergeLinkedHSPSets(BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, Int4 *merged_size)

Merges HSPs from two linked HSP sets into an array of HSPs, sorted in increasing order of contexts an...

static int s_RevCompareHSPsTbx(const void *v1, const void *v2)

Callback used by qsort to sort a list of HSPs (encapsulated in LinkHSPStruct structures) in order of ...

struct LinkHSPStruct LinkHSPStruct

Structure containing all information internal to the process of linking HSPs.

static Int2 s_LinkedHSPSetArrayIndexQueryEnds(BlastLinkedHSPSet **hsp_array, Int4 hspcnt, Int4 **qend_index_ptr)

Given an array of HSPs (H), sorted in increasing order of query offsets, fills an array of indices in...

struct BlastHSPLink BlastHSPLink

The following structure is used in "link_hsps" to decide between two different "gapping" models.

static BlastLinkedHSPSet ** s_LinkedHSPSetArraySetUp(BlastHSP **hsp_array, Int4 hspcnt, Blast_KarlinBlk **kbp_array, EBlastProgramType program)

Sets up an array of wrapper structures for an array of BlastHSP's.

static LinkHSPStruct * s_LinkHSPStructReset(LinkHSPStruct *lhsp)

Initialize a LinkHSPStruct.

static Int4 s_HSPOffsetEndBinarySearch(BlastLinkedHSPSet **hsp_array, Int4 size, Int4 *qend_index_array, Uint4 queryId, Int4 offset)

Find an HSP in an array sorted in increasing order of query offsets and increasing order of queryId,...

static Boolean s_LinkedHSPSetsAdmissible(BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, const BlastLinkHSPParameters *link_hsp_params, EBlastProgramType program)

Checks if new candidate HSP is admissible to be linked to a set of HSPs on the left.

static double s_SumHSPEvalue(EBlastProgramType program_number, const BlastQueryInfo *query_info, Int4 subject_length, const BlastLinkHSPParameters *link_hsp_params, BlastLinkedHSPSet *head_hsp, BlastLinkedHSPSet *new_hsp, double *sum_score)

Calculates e-value of a set of HSPs with sum statistics.

static BlastLinkedHSPSet * s_CombineLinkedHSPSets(BlastLinkedHSPSet *hsp_set1, BlastLinkedHSPSet *hsp_set2, double sum_score, double evalue)

Combines two linked sets of HSPs into a single set.

Functions to link HSPs using sum statistics.

const struct ncbi::grid::netcache::search::fields::SIZE size

#define MIN(a, b)

returns smaller of a and b.

#define INT4_MAX

largest nubmer represented by signed int

#define SIGN(a)

return +1 for a > 0, -1 for a < 0

Uint1 Boolean

bool replacment for C

#define TRUE

bool replacment for C indicating true.

#define FALSE

bool replacment for C indicating false.

#define ASSERT

macro for assert.

#define MAX(a, b)

returns larger of a and b.

Int4 query_length

Length of this query, strand or frame.

Int4 length_adjustment

Length adjustment for boundary conditions.

Int8 eff_searchsp

Effective search space for this context.

The following structure is used in "link_hsps" to decide between two different "gapping" models.

Int2 num[eOrderingMethods]

number of HSP in the ordering.

Int4 changed

Has the link been changed since previous access?

double xsum[eOrderingMethods]

Sum-Score of HSP, multiplied by the appropriate Lambda.

struct LinkHSPStruct * link[eOrderingMethods]

Best choice of HSP to link with.

Int4 sum[eOrderingMethods]

Sum-Score of HSP.

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

Int4 hspcnt

Number of HSPs saved.

BlastHSP ** hsp_array

Array of pointers to individual HSPs.

double best_evalue

Smallest e-value for HSPs in this list.

Structure holding all information about an HSP.

double evalue

This HSP's e-value.

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.

Int4 score

This HSP's raw score.

Parameter block for linking HSPs with sum statistics.

double gap_decay_rate

Decay rate for linking HSPs and calculating cutoff scores.

double gap_prob

Probability of decay for linking HSPs.

Int4 cutoff_big_gap

Cutoff sum score for linked HSPs with big gaps.

Int4 cutoff_small_gap

Cutoff sum score for linked HSPs with small gaps.

Int4 overlap_size

Maximal overlap allowed in successive linked HSPs.

Int4 longest_intron

Length of a longest intron for uneven gap linking of HSPs.

Int4 gap_size

Small gap size for linking HSPs.

Simple doubly linked list of HSPs, used for calculating sum statistics.

Uint4 queryId

Used for support of OOF linking.

BlastHSP * hsp

HSP for the current link in the chain.

struct BlastLinkedHSPSet * next

Next link in the chain.

double sum_score

Sum bit score for the linked set.

struct BlastLinkedHSPSet * prev

Previous link in the chain.

The query related information.

BlastContextInfo * contexts

Information per context.

int num_queries

Number of query sequences.

Structure used for scoring calculations.

Blast_KarlinBlk ** kbp

Karlin-Altschul parameters.

Blast_KarlinBlk ** kbp_gap

K-A parameters for gapped alignments.

Int2 frame

Translation frame.

Int4 offset

Start of hsp.

Structure to hold the Karlin-Altschul parameters.

double Lambda

Lambda value used in statistics.

double logK

natural log of K value used in statistics

Structure containing all information internal to the process of linking HSPs.

Boolean start_of_chain

If TRUE, this HSP starts a chain along the "link" pointer.

Int4 q_offset_trim

Start of trimmed hsp in query.

BlastHSP * hsp

Specific HSP this structure corresponds to.

Int4 s_offset_trim

Start of trimmed hsp in subject.

struct LinkHSPStruct * next

Next HSP in a set, if any.

Int4 linked_to

Where this HSP is linked to?

Int4 s_end_trim

End of trimmed HSP in subject.

Int4 q_end_trim

End of trimmed HSP in query.

struct LinkHSPStruct * prev

Previous HSP in a set, if any.

double xsum

Normalized score of a set of HSPs.

ELinkOrderingMethod ordering_method

Which method (max or no max for gaps) was used for linking HSPs?

BlastHSPLink hsp_link

Auxiliary structure for keeping track of sum scores, etc.

Boolean linked_set

Is this HSp part of a linked set?

The helper array contains the info used frequently in the inner for loops of the HSP linking algorith...

Int4 next_larger

offset into array of HelpStructs containing HSP with higher score, used in bailout calculations

Int4 q_off_trim

query start of trimmed HSP

Int4 maxsum1

threshold for stopping link attempts (?)

LinkHSPStruct * ptr

The HSP to which the info belongs.

Int4 s_off_trim

subject start of trimmed HSP

Int4 sum[eOrderingMethods]

raw score of linked set containing HSP(?)

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