include/oldGappedScoring.h File Reference

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

Go to the source code of this file.

Functions

int4 oldGappedScoring_score (struct ungappedExtension *ungappedExtension, struct PSSMatrix PSSMatrix, int4 subjectSize, unsigned char *subject, int4 dropoff)
void oldGappedScoring_free ()


Function Documentation

void oldGappedScoring_free (  ) 

Definition at line 699 of file oldGappedScoring.c.

References oldGappedScoring_bestRow, and oldGappedScoring_insertQrow.

Referenced by main().

00700 {
00701     free(oldGappedScoring_bestRow);
00702     free(oldGappedScoring_insertQrow);
00703 }

Here is the caller graph for this function:

int4 oldGappedScoring_score ( struct ungappedExtension ungappedExtension,
struct PSSMatrix  PSSMatrix,
int4  subjectSize,
unsigned char *  subject,
int4  dropoff 
)

Definition at line 23 of file oldGappedScoring.c.

References dpResults::best, dpResults::bestScore, ungappedExtension::end, int4, PSSMatrix::length, PSSMatrix::matrix, oldGappedScoring_dpAfterSeed(), oldGappedScoring_dpBeforeSeed(), PSSMatrix_chop(), coordinate::queryOffset, ungappedExtension::seed, ungappedExtension::start, PSSMatrix::strandLength, and coordinate::subjectOffset.

Referenced by gappedScoring_score().

00025 {
00026     struct coordinate seed;
00027     unsigned char *choppedSubject;
00028     struct PSSMatrix choppedPSSMatrix;
00029     int4 choppedSubjectSize;
00030     struct dpResults beforeDpResults, afterDpResults;
00031     int4 strandOffset = 0;
00032 
00033     // Perform dynamic programming for points before the seed
00034     seed = ungappedExtension->seed;
00035     if (seed.queryOffset > PSSMatrix.strandLength)
00036     {
00037             // If query position is in the second strand, remove first strand from PSSM
00038         strandOffset = PSSMatrix.strandLength;
00039                 seed.queryOffset -= PSSMatrix.strandLength;
00040                 PSSMatrix = PSSMatrix_chop(PSSMatrix, PSSMatrix.strandLength);
00041     }
00042     else
00043     {
00044         // Otherwise remove second strand
00045         PSSMatrix.length = PSSMatrix.strandLength;
00046     }
00047 
00048 //    ungappedExtension_print(ungappedExtension);
00049 //    printf("dloc=%d\n", blast_dloc);
00050 //    printf("seed=%d,%d\n", seed.queryOffset, seed.subjectOffset); fflush(stdout);
00051 
00052     beforeDpResults = oldGappedScoring_dpBeforeSeed(subject, PSSMatrix, seed, dropoff);
00053 
00054     // Chop the start off the query and subject so they begin at the seed
00055     choppedPSSMatrix = PSSMatrix_chop(PSSMatrix, seed.queryOffset);
00056     choppedSubject = subject + seed.subjectOffset;
00057     choppedSubjectSize = subjectSize - seed.subjectOffset;
00058 
00059     // Perform dynamic programming for points after the seed
00060     afterDpResults = oldGappedScoring_dpAfterSeed(choppedSubject, choppedPSSMatrix,
00061                                                dropoff, choppedSubjectSize);
00062 
00063     // Re-adjust result change due to chopping subject/query and strand adjustment
00064     afterDpResults.best.queryOffset += seed.queryOffset + strandOffset;
00065     afterDpResults.best.subjectOffset += seed.subjectOffset;
00066     beforeDpResults.best.queryOffset += strandOffset;
00067 
00068     // Associate best scoring start and end points with the ungapped extension
00069     ungappedExtension->start = beforeDpResults.best;
00070     ungappedExtension->end = afterDpResults.best;
00071 
00072 //    if (dloc == 1338183)
00073 //        printf("norm[%d,%d,%d](%d)\n", beforeDpResults.bestScore, afterDpResults.bestScore,
00074 //        choppedPSSMatrix.matrix[0][choppedSubject[0]], seed.queryOffset);
00075 
00076     // Determine score by combining score from the two traces, and the match score at
00077     // the seed position
00078     return beforeDpResults.bestScore + afterDpResults.bestScore +
00079            choppedPSSMatrix.matrix[0][choppedSubject[0]];
00080 }

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Wed Dec 19 20:50:25 2007 for fsa-blast by  doxygen 1.5.2