include/ungappedExtension.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ungappedExtension_DELETED   0
#define ungappedExtension_UNGAPPED   1
#define ungappedExtension_SEMIGAPPED   2
#define ungappedExtension_GAPPED   3
#define ungappedExtension_JOINED   4

Functions

void ungappedExtension_initialize ()
ungappedExtensionungappedExtension_extend (int2 **queryHit, unsigned char *subjectHit, unsigned char *lastHit, struct PSSMatrix PSSMatrix, unsigned char *subject)
ungappedExtensionungappedExtension_oneHitExtend (int2 **queryHit, unsigned char *subjectHit, struct PSSMatrix PSSMatrix, unsigned char *subject)
ungappedExtensionungappedExtension_nucleotideExtend (int4 queryHitOffset, int4 subjectHitOffset, struct PSSMatrix PSSMatrix, unsigned char *subject, uint4 subjectLength)
void ungappedExtension_findSeed (struct ungappedExtension *ungappedExtension, struct PSSMatrix PSSMatrix, unsigned char *subject)
void ungappedExtension_print (struct ungappedExtension *extension)

Variables

unsigned char * ungappedExtension_subjectEndReached
int4 ungappedExtension_bestScore
memBlocksungappedExtension_extensions


Define Documentation

#define ungappedExtension_DELETED   0

Definition at line 10 of file ungappedExtension.h.

Referenced by alignments_checkForJoin(), alignments_findFinalAlignments(), alignments_findGoodAlignments(), alignments_findTopFinalAlignments(), alignments_getTracebacks(), alignments_pruneRegion(), alignments_regularGappedAlignment(), alignments_unpruneRegion(), and unpack_getRegions().

#define ungappedExtension_GAPPED   3

Definition at line 13 of file ungappedExtension.h.

Referenced by alignments_findGoodAlignments(), and alignments_regularGappedAlignment().

#define ungappedExtension_JOINED   4

Definition at line 14 of file ungappedExtension.h.

Referenced by alignments_checkForJoin().

#define ungappedExtension_SEMIGAPPED   2

Definition at line 12 of file ungappedExtension.h.

Referenced by alignments_findGoodAlignments().

#define ungappedExtension_UNGAPPED   1

Definition at line 11 of file ungappedExtension.h.

Referenced by alignments_unpruneRegion(), ungappedExtension_extend(), ungappedExtension_nucleotideExtend(), and ungappedExtension_oneHitExtend().


Function Documentation

struct ungappedExtension* ungappedExtension_extend ( int2 **  queryHit,
unsigned char *  subjectHit,
unsigned char *  lastHit,
struct PSSMatrix  PSSMatrix,
unsigned char *  subject 
) [read]

Definition at line 30 of file ungappedExtension.c.

References blast_ungappedNominalTrigger, ungappedExtension::end, int2, int4, PSSMatrix::matrix, memBlocks_newEntry(), ungappedExtension::next, ungappedExtension::nominalScore, coordinate::queryOffset, ungappedExtension::seed, ungappedExtension::start, statistics_ungappedNominalDropoff, ungappedExtension::status, coordinate::subjectOffset, ungappedExtension_bestScore, ungappedExtension_extensions, ungappedExtension_findProteinSeed(), ungappedExtension_subjectEndReached, and ungappedExtension_UNGAPPED.

Referenced by search_protein2hit().

00032 {
00033         int2 **queryPosition;
00034         unsigned char *subjectPosition, *subjectStart, *subjectEnd;
00035         int4 changeSinceBest = 0;
00036         int4 dropoff, originalDropoff;
00037 
00038     originalDropoff = dropoff = -statistics_ungappedNominalDropoff;
00039         ungappedExtension_bestScore = 0;
00040 
00041         // Start at queryEnd,subjectEnd (right/last hit position)
00042         queryPosition = queryHit;
00043         subjectPosition = subjectStart = subjectHit;
00044 
00045         // Extend the start of the hit backwards until dropoff
00046         while (changeSinceBest > dropoff)
00047         {
00048                 changeSinceBest += (*queryPosition)[*subjectPosition];
00049 
00050         // If we have got a positive score
00051                 if (changeSinceBest > 0)
00052                 {
00053                         // Keep updating best score and resetting change-since-best
00054                         // whilst we are reading positive scores
00055                         do
00056                         {
00057                                 ungappedExtension_bestScore += changeSinceBest;
00058                                 queryPosition--; subjectPosition--;
00059                                 changeSinceBest = (*queryPosition)[*subjectPosition];
00060                         }
00061                         while (changeSinceBest > 0);
00062 
00063                         subjectStart = subjectPosition;
00064                 }
00065                 queryPosition--; subjectPosition--;
00066         }
00067 
00068         // Correct for extra decrement
00069         subjectStart++;
00070 
00071         // If best start point is right of previous hit which helped trigger this extension
00072         // then stop now
00073         if (subjectStart > lastHit)
00074         {
00075                 ungappedExtension_subjectEndReached = subjectHit;
00076                 return NULL;
00077         }
00078 
00079         // Starting at right/last hit position again
00080         queryPosition = queryHit + 1;
00081     subjectEnd = subjectHit;
00082         subjectPosition = subjectHit + 1;
00083     changeSinceBest = 0;
00084 
00085     // May need to alter dropoff so we also dropoff if below zero
00086     if (-ungappedExtension_bestScore > originalDropoff)
00087     {
00088         dropoff = -ungappedExtension_bestScore;
00089     }
00090 
00091         // Extend end of alignment until dropoff
00092         while (changeSinceBest > dropoff)
00093         {
00094                 changeSinceBest += (*queryPosition)[*subjectPosition];
00095 
00096         // If we have got a positive score
00097                 if (changeSinceBest > 0)
00098                 {
00099                         // Keep updating best score and resetting change-since-best
00100                         // whilst we are reading positive scores
00101                         do
00102                         {
00103                                 ungappedExtension_bestScore += changeSinceBest;
00104                                 queryPosition++; subjectPosition++;
00105                                 changeSinceBest = (*queryPosition)[*subjectPosition];
00106                         }
00107                         while (changeSinceBest > 0);
00108 
00109                         subjectEnd = subjectPosition;
00110 
00111                         // Check need for change in dropoff
00112             if ((dropoff = -ungappedExtension_bestScore) < originalDropoff)
00113             {
00114                 dropoff = originalDropoff;
00115             }
00116         }
00117                 queryPosition++; subjectPosition++;
00118         }
00119 
00120         // Correct for extra increment
00121         subjectEnd--;
00122         ungappedExtension_subjectEndReached = subjectEnd;
00123 
00124     // If extension scored above trigger for gapping, create object and return it
00125     if (ungappedExtension_bestScore >= blast_ungappedNominalTrigger)
00126     {
00127         int4 diagonal;
00128         struct ungappedExtension* newUngappedExtension;
00129         newUngappedExtension = memBlocks_newEntry(ungappedExtension_extensions);
00130 
00131         // Calculate diagonal
00132         diagonal = (subjectHit - subject) - (queryHit - PSSMatrix.matrix);
00133 
00134         // Determine offsets from pointers
00135         newUngappedExtension->start.subjectOffset = subjectStart - subject;
00136         newUngappedExtension->end.subjectOffset = subjectEnd - subject;
00137         newUngappedExtension->start.queryOffset = newUngappedExtension->start.subjectOffset - diagonal;
00138         newUngappedExtension->end.queryOffset = newUngappedExtension->end.subjectOffset - diagonal;
00139 
00140         // Find the seed point
00141         newUngappedExtension->seed = ungappedExtension_findProteinSeed(newUngappedExtension, PSSMatrix, subject);
00142         // Initialize next to null
00143         newUngappedExtension->next = NULL;
00144         newUngappedExtension->nominalScore = ungappedExtension_bestScore;
00145         newUngappedExtension->status = ungappedExtension_UNGAPPED;
00146 
00147         return newUngappedExtension;
00148     }
00149     else
00150     {
00151         return NULL;
00152     }
00153 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ungappedExtension_findSeed ( struct ungappedExtension ungappedExtension,
struct PSSMatrix  PSSMatrix,
unsigned char *  subject 
) [inline]

Definition at line 607 of file ungappedExtension.c.

References encoding_alphabetType, encoding_protein, coordinate::queryOffset, ungappedExtension::seed, coordinate::subjectOffset, ungappedExtension_findNucleotideSeed(), and ungappedExtension_findProteinSeed().

Referenced by alignments_findGoodAlignments(), and alignments_unpruneRegion().

00609 {
00610         // Find seed if not already recorded
00611         if (ungappedExtension->seed.queryOffset == -1 && ungappedExtension->seed.subjectOffset == -1)
00612     {
00613         if (encoding_alphabetType == encoding_protein)
00614         {
00615             ungappedExtension->seed
00616                 = ungappedExtension_findProteinSeed(ungappedExtension, PSSMatrix, subject);
00617         }
00618         else
00619         {
00620             ungappedExtension->seed
00621                 = ungappedExtension_findNucleotideSeed(ungappedExtension, PSSMatrix, subject);
00622         }
00623         }
00624 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ungappedExtension_initialize (  ) 

Definition at line 20 of file ungappedExtension.c.

References constants_initialAllocUngappedExtensions, memBlocks_initialize(), parameters_matchScore, parameters_wordTableLetters, ungappedExtension_extensions, ungappedExtension_minus3reward, and ungappedExtension_tableMatchesReward.

Referenced by blast_search().

Here is the call graph for this function:

Here is the caller graph for this function:

struct ungappedExtension* ungappedExtension_nucleotideExtend ( int4  queryHitOffset,
int4  subjectHitOffset,
struct PSSMatrix  PSSMatrix,
unsigned char *  subject,
uint4  subjectLength 
) [read]

Definition at line 274 of file ungappedExtension.c.

References blast_dloc, blast_ungappedNominalTrigger, PSSMatrix::bytePackedCodes, encoding_printLetters(), ungappedExtension::end, int4, PSSMatrix::length, memBlocks_newEntry(), ungappedExtension::next, ungappedExtension::nominalScore, parameters_verboseDloc, parameters_wordTableBytes, parameters_wordTableLetters, PSSMatrix_packedLeftMatchScores, PSSMatrix_packedRightMatchScores, PSSMatrix_packedScore, coordinate::queryOffset, ungappedExtension::seed, ungappedExtension::start, statistics_ungappedNominalDropoff, ungappedExtension::status, PSSMatrix::strandLength, coordinate::subjectOffset, ungappedExtension_bestScore, ungappedExtension_extensions, ungappedExtension_minus3reward, ungappedExtension_subjectEndReached, ungappedExtension_tableMatchesReward, and ungappedExtension_UNGAPPED.

Referenced by search_nucleotide(), search_nucleotide_largeTable(), and search_nucleotide_longWord().

00277 {
00278         unsigned char* queryPosition, *minQueryPosition, *maxQueryPosition;
00279         unsigned char* subjectPosition, *subjectStart, *subjectEnd;
00280         int4 dropoff, originalDropoff;
00281     int4 changeSinceBest = 0;
00282     int4 matchLettersScore;
00283 
00284         originalDropoff = dropoff = -statistics_ungappedNominalDropoff;
00285 
00286     // Start with score for lookup-table nucleotide match that is not aligned
00287     ungappedExtension_bestScore = ungappedExtension_tableMatchesReward;
00288 
00289     // Determine minimum query position; either start of the query or start of the second strand
00290     if (queryHitOffset <= PSSMatrix.strandLength)
00291     {
00292         if (queryHitOffset < subjectHitOffset * 4)
00293             minQueryPosition = PSSMatrix.bytePackedCodes;
00294         else
00295             minQueryPosition = PSSMatrix.bytePackedCodes + queryHitOffset - subjectHitOffset * 4;
00296         }
00297     else
00298     {
00299         if (queryHitOffset - PSSMatrix.strandLength < subjectHitOffset * 4)
00300             minQueryPosition = PSSMatrix.bytePackedCodes + PSSMatrix.strandLength;
00301         else
00302             minQueryPosition = PSSMatrix.bytePackedCodes + queryHitOffset - subjectHitOffset * 4;
00303     }
00304 
00305         // Start left of hit location
00306         queryPosition = PSSMatrix.bytePackedCodes + queryHitOffset - parameters_wordTableLetters - 4;
00307         subjectPosition = subjectStart = subject + subjectHitOffset - parameters_wordTableBytes - 1;
00308 
00309     // Consider partial match of first byte before hit
00310         matchLettersScore = PSSMatrix_packedLeftMatchScores[*queryPosition ^ *subjectPosition];
00311     ungappedExtension_bestScore += matchLettersScore;
00312         changeSinceBest = -matchLettersScore;
00313 
00314     // Move back through alignment until start of query or subject, or until dropoff
00315     while (queryPosition > minQueryPosition)
00316     {
00317         // Add score of matching entire bytes
00318                 changeSinceBest += PSSMatrix_packedScore[*queryPosition ^ *subjectPosition];
00319 
00320         #ifdef VERBOSE
00321         if (parameters_verboseDloc == blast_dloc)
00322         {
00323                 printf("<%d< ", PSSMatrix_packedScore[*queryPosition ^ *subjectPosition]);
00324             printf("["); encoding_printLetters(*queryPosition, 4);
00325             printf(","); encoding_printLetters(*subjectPosition, 4); printf("]\n");
00326                 }
00327         #endif
00328 
00329         // If we possibly have a new best score
00330         if (changeSinceBest > ungappedExtension_minus3reward)
00331         {
00332             // Get score for matching individual letters in next byte
00333                 queryPosition-=4; subjectPosition--;
00334                 matchLettersScore = PSSMatrix_packedLeftMatchScores[*queryPosition ^ *subjectPosition];
00335 
00336             // If best score
00337             if (changeSinceBest + matchLettersScore > 0)
00338             {
00339                 // Mark new best position
00340                 subjectStart = subjectPosition;
00341 
00342                 // Update best score and change since best
00343                 ungappedExtension_bestScore += changeSinceBest + matchLettersScore;
00344                 changeSinceBest = -matchLettersScore;
00345 
00346                 #ifdef VERBOSE
00347                 if (parameters_verboseDloc == blast_dloc)
00348                     printf("(Best=%d)\n", ungappedExtension_bestScore);
00349                 #endif
00350             }
00351         }
00352         else
00353         {
00354                 // Decrease in score, check dropoff
00355                         if (changeSinceBest < dropoff)
00356                 break;
00357 
00358             queryPosition-=4; subjectPosition--;
00359         }
00360     }
00361 
00362     // Determine maximum query position; either end of the query or end of the first strand
00363     if (queryHitOffset <= PSSMatrix.strandLength)
00364     {
00365         if (PSSMatrix.strandLength - queryHitOffset < subjectLength - subjectHitOffset * 4)
00366             maxQueryPosition = PSSMatrix.bytePackedCodes + PSSMatrix.strandLength - 4;
00367         else
00368             maxQueryPosition = PSSMatrix.bytePackedCodes + (subjectLength - subjectHitOffset * 4)
00369                              + queryHitOffset - 4;
00370         }
00371     else
00372     {
00373         if (PSSMatrix.length - queryHitOffset < subjectLength - subjectHitOffset * 4)
00374             maxQueryPosition = PSSMatrix.bytePackedCodes + PSSMatrix.length - 4;
00375         else
00376             maxQueryPosition = PSSMatrix.bytePackedCodes + (subjectLength - subjectHitOffset * 4)
00377                              + queryHitOffset - 4;
00378     }
00379 
00380     // Starting right of hit position
00381         queryPosition = PSSMatrix.bytePackedCodes + queryHitOffset;
00382         subjectPosition = subjectEnd = subject + subjectHitOffset;
00383         changeSinceBest = 0;
00384 
00385     // May need to alter dropoff so we also dropoff if below zero
00386     if (-ungappedExtension_bestScore > originalDropoff)
00387     {
00388         dropoff = -ungappedExtension_bestScore;
00389     }
00390 
00391     // Consider partial match of first byte after hit
00392         matchLettersScore = PSSMatrix_packedRightMatchScores[*queryPosition ^ *subjectPosition];
00393     ungappedExtension_bestScore += matchLettersScore;
00394         changeSinceBest = -matchLettersScore;
00395 
00396     // Move forward through alignment until end of query or subject, or until dropoff
00397     while (queryPosition < maxQueryPosition)
00398     {
00399                 // Score of matching entire bytes
00400                 changeSinceBest += PSSMatrix_packedScore[*queryPosition ^ *subjectPosition];
00401 
00402         #ifdef VERBOSE
00403         if (parameters_verboseDloc == blast_dloc)
00404         {
00405                 printf(">%d> ", PSSMatrix_packedScore[*queryPosition ^ *subjectPosition]);
00406             printf("["); encoding_printLetters(*queryPosition, 4);
00407             printf(","); encoding_printLetters(*subjectPosition, 4); printf("]\n");
00408             printf("changeSinceBest=%d\n", changeSinceBest);
00409                 }
00410         #endif
00411 
00412         // If we possibly have a new best score
00413         if (changeSinceBest > ungappedExtension_minus3reward)
00414         {
00415             // Get score for matching individual letters in next byte
00416                 queryPosition+=4; subjectPosition++;
00417                 matchLettersScore = PSSMatrix_packedRightMatchScores[*queryPosition ^ *subjectPosition];
00418 
00419             // If best score
00420             if (changeSinceBest + matchLettersScore > 0)
00421             {
00422                 // Mark new best position
00423                 subjectEnd = subjectPosition;
00424 
00425                 // Update best score and change since best
00426                 ungappedExtension_bestScore += changeSinceBest + matchLettersScore;
00427                 changeSinceBest = -matchLettersScore;
00428 
00429                 #ifdef VERBOSE
00430                 if (parameters_verboseDloc == blast_dloc)
00431                     printf("(Best=%d)\n", ungappedExtension_bestScore);
00432                 #endif
00433             }
00434         }
00435         else
00436         {
00437                 // Decrease in score, check dropoff
00438                         if (changeSinceBest < dropoff)
00439                 break;
00440 
00441             queryPosition+=4; subjectPosition++;
00442         }
00443     }
00444 
00445     // Record the point we got to extending forwards
00446     ungappedExtension_subjectEndReached = subjectPosition;
00447 
00448     // If extension scored above trigger for gapping, create object and return it
00449     if (ungappedExtension_bestScore >= blast_ungappedNominalTrigger)
00450     {
00451         int4 diagonal;
00452         struct ungappedExtension* newUngappedExtension;
00453         newUngappedExtension = memBlocks_newEntry(ungappedExtension_extensions);
00454 
00455         // Correct for extra decrement
00456         subjectStart++;
00457         // Correct for extra increment
00458         subjectEnd--;
00459 
00460         // Calculate diagonal
00461         diagonal = subjectHitOffset * 4 - queryHitOffset;
00462 
00463         // Determine offsets from pointers
00464         newUngappedExtension->start.subjectOffset = (subjectStart - subject) * 4;
00465         newUngappedExtension->end.subjectOffset = (subjectEnd - subject) * 4;
00466         newUngappedExtension->start.queryOffset = newUngappedExtension->start.subjectOffset - diagonal;
00467         newUngappedExtension->end.queryOffset = newUngappedExtension->end.subjectOffset - diagonal;
00468 
00469                 newUngappedExtension->seed.queryOffset = -1;
00470                 newUngappedExtension->seed.subjectOffset = -1;
00471 
00472         // Initialize next to null
00473         newUngappedExtension->next = NULL;
00474         newUngappedExtension->nominalScore = ungappedExtension_bestScore;
00475         newUngappedExtension->status = ungappedExtension_UNGAPPED;
00476 
00477         #ifdef VERBOSE
00478         if (parameters_verboseDloc == blast_dloc)
00479         {
00480             printf("Hit=%d,%d\n", queryHitOffset, subjectHitOffset);
00481             printf("%d,%d - %d,%d\n", newUngappedExtension->start.queryOffset, newUngappedExtension->start.subjectOffset,
00482                                       newUngappedExtension->end.queryOffset, newUngappedExtension->end.subjectOffset);
00483                                       fflush(stdout);
00484             printf("seed=%d,%d\n", newUngappedExtension->seed.queryOffset, newUngappedExtension->seed.subjectOffset);
00485                 }
00486                 #endif
00487 
00488         return newUngappedExtension;
00489     }
00490     else
00491     {
00492         return NULL;
00493     }
00494 }

Here is the call graph for this function:

Here is the caller graph for this function:

struct ungappedExtension* ungappedExtension_oneHitExtend ( int2 **  queryHit,
unsigned char *  subjectHit,
struct PSSMatrix  PSSMatrix,
unsigned char *  subject 
) [read]

Definition at line 157 of file ungappedExtension.c.

References blast_ungappedNominalTrigger, ungappedExtension::end, int2, int4, PSSMatrix::matrix, memBlocks_newEntry(), ungappedExtension::next, ungappedExtension::nominalScore, coordinate::queryOffset, ungappedExtension::seed, ungappedExtension::start, statistics_ungappedNominalDropoff, ungappedExtension::status, coordinate::subjectOffset, ungappedExtension_bestScore, ungappedExtension_extensions, ungappedExtension_findProteinSeed(), ungappedExtension_subjectEndReached, and ungappedExtension_UNGAPPED.

Referenced by search_protein1hit().

00159 {
00160         int2** queryPosition;
00161         unsigned char* subjectPosition, *subjectStart, *subjectEnd;
00162         int4 changeSinceBest = 0;
00163         int4 dropoff, originalDropoff;
00164 
00165         originalDropoff = dropoff = -statistics_ungappedNominalDropoff;
00166     ungappedExtension_bestScore = 0;
00167 
00168         // Start at queryEnd,subjectEnd (right/last hit position)
00169         queryPosition = queryHit;
00170         subjectPosition = subjectStart = subjectHit;
00171 
00172         // Extend the start of the hit forwards until dropoff
00173         while (changeSinceBest > dropoff)
00174         {
00175                 changeSinceBest += (*queryPosition)[*subjectPosition];
00176                 // If we have got a positive score
00177                 if (changeSinceBest > 0)
00178                 {
00179                         // Keep updating best score and resetting change-since-best
00180                         // whilst we are reading positive scores
00181                         do
00182                         {
00183                                 ungappedExtension_bestScore += changeSinceBest;
00184                                 queryPosition--; subjectPosition--;
00185                                 changeSinceBest = (*queryPosition)[*subjectPosition];
00186                         }
00187                         while (changeSinceBest > 0);
00188 
00189                         subjectStart = subjectPosition;
00190                 }
00191                 queryPosition--; subjectPosition--;
00192         }
00193 
00194         // Correct for extra decrement
00195         subjectStart++;
00196 
00197         // Starting at right/last hit position again
00198         queryPosition = queryHit + 1;
00199         subjectPosition = subjectEnd = subjectHit + 1;
00200         changeSinceBest = 0;
00201 
00202     // May need to alter dropoff so we also dropoff if below zero
00203     if (-ungappedExtension_bestScore > originalDropoff)
00204     {
00205         dropoff = -ungappedExtension_bestScore;
00206     }
00207 
00208         // Extend end of alignment until dropoff
00209         while (changeSinceBest > dropoff)
00210         {
00211                 changeSinceBest += (*queryPosition)[*subjectPosition];
00212                 // If we have got a positive score
00213                 if (changeSinceBest > 0)
00214                 {
00215                         // Keep updating best score and resetting change-since-best
00216                         // whilst we are reading positive scores
00217                         do
00218                         {
00219                                 ungappedExtension_bestScore += changeSinceBest;
00220                                 queryPosition++; subjectPosition++;
00221                                 changeSinceBest = (*queryPosition)[*subjectPosition];
00222                         }
00223                         while (changeSinceBest > 0);
00224 
00225                         subjectEnd = subjectPosition;
00226 
00227                         // Check need for change in dropoff
00228             if ((dropoff = -ungappedExtension_bestScore) < originalDropoff)
00229             {
00230                 dropoff = originalDropoff;
00231             }
00232         }
00233                 queryPosition++; subjectPosition++;
00234         }
00235 
00236         // Correct for extra increment
00237         subjectEnd--;
00238 
00239     // Record the point we got to extending forwards
00240     ungappedExtension_subjectEndReached = subjectPosition;
00241 
00242     // If extension scored above trigger for gapping, create object and return it
00243     if (ungappedExtension_bestScore >= blast_ungappedNominalTrigger)
00244     {
00245         int4 diagonal;
00246         struct ungappedExtension* newUngappedExtension;
00247         newUngappedExtension = memBlocks_newEntry(ungappedExtension_extensions);
00248 
00249         // Calculate diagonal
00250         diagonal = (subjectHit - subject) - (queryHit - PSSMatrix.matrix);
00251 
00252         // Determine offsets from pointers
00253         newUngappedExtension->start.subjectOffset = subjectStart - subject;
00254         newUngappedExtension->end.subjectOffset = subjectEnd - subject;
00255         newUngappedExtension->start.queryOffset = newUngappedExtension->start.subjectOffset - diagonal;
00256         newUngappedExtension->end.queryOffset = newUngappedExtension->end.subjectOffset - diagonal;
00257 
00258         // Find the seed point
00259         newUngappedExtension->seed = ungappedExtension_findProteinSeed(newUngappedExtension, PSSMatrix, subject);
00260         // Initialize next to null
00261         newUngappedExtension->next = NULL;
00262         newUngappedExtension->nominalScore = ungappedExtension_bestScore;
00263         newUngappedExtension->status = ungappedExtension_UNGAPPED;
00264 
00265         return newUngappedExtension;
00266     }
00267     else
00268     {
00269         return NULL;
00270     }
00271 }

Here is the call graph for this function:

Here is the caller graph for this function:

void ungappedExtension_print ( struct ungappedExtension extension  ) 

Definition at line 766 of file ungappedExtension.c.

References ungappedExtension::end, ungappedExtension::nominalScore, coordinate::queryOffset, ungappedExtension::seed, ungappedExtension::start, ungappedExtension::status, and coordinate::subjectOffset.

Referenced by alignments_checkForJoin(), alignments_findFinalAlignments(), alignments_unpruneRegion(), search_nucleotide(), search_nucleotide_largeTable(), and search_nucleotide_longWord().

00767 {
00768         printf("Ungapped extension %d,%d to %d,%d score=%d status=%d seed=%d,%d\n",
00769         extension->start.queryOffset, extension->start.subjectOffset,
00770         extension->end.queryOffset, extension->end.subjectOffset,
00771         extension->nominalScore, extension->status,
00772     extension->seed.queryOffset, extension->seed.subjectOffset);
00773 }

Here is the caller graph for this function:


Variable Documentation

int4 ungappedExtension_bestScore

Definition at line 6 of file ungappedExtension.h.

Referenced by search_nucleotide(), search_nucleotide_largeTable(), search_nucleotide_longWord(), ungappedExtension_checkHit(), ungappedExtension_extend(), ungappedExtension_nucleotideExtend(), ungappedExtension_oneHitExtend(), and ungappedExtension_simpleScoring().

struct memBlocks* ungappedExtension_extensions

Definition at line 7 of file ungappedExtension.h.

Referenced by alignments_free(), ungappedExtension_extend(), ungappedExtension_initialize(), ungappedExtension_nucleotideExtend(), and ungappedExtension_oneHitExtend().

unsigned char* ungappedExtension_subjectEndReached

Definition at line 5 of file ungappedExtension.h.

Referenced by search_nucleotide(), search_nucleotide_largeTable(), search_nucleotide_longWord(), search_protein1hit(), search_protein2hit(), ungappedExtension_checkHit(), ungappedExtension_extend(), ungappedExtension_nucleotideExtend(), and ungappedExtension_oneHitExtend().


Generated on Wed Dec 19 20:52:30 2007 for fsa-blast by  doxygen 1.5.2