ptrace.c File Reference

#include <stdio.h>
#include "seqaln.h"

Defines

#define append_score(X, Y)
#define scandiag()
#define scanup()
#define scanleft()

Functions

void ptrace (struct SEQALN_SEQUENCE *seq, struct SEQALN_PROFILE *pro, struct SEQALN_CONSTANTS *scoring, struct SEQALN_RESULTS *results, struct SEQALN_IO *io)

Define Documentation

#define append_score ( X,
Y   ) 

Value:

(scorel = \
                            (SEQALN_TRACE *)newmem(1, sizeof(SEQALN_TRACE)), \
                            scorel->i = i,                               \
                            scorel->j = j,                               \
                            scorel->next = results->trace,               \
                            results->trace = scorel)

Referenced by ptrace(), trace(), and trtrace().

 
#define scandiag (  ) 

Value:

if ((!results->aligned || !results->aligned[i][j]) &&     \
                        i>0 && j>0 && results->S[i][j]==results->S[i-1][j-1]+ \
                        scoring->deltafn(j,seq->code[i],pro)) {               \
                       results->align_len++; i--; j--; foundalign=1; }

Referenced by ptrace(), trace(), and trtrace().

 
#define scanleft (  ) 

Value:

if (j > 0) {                                              \
                       tmplast = results->S[i][j];                            \
                       if (palpha_eq_pbeta) { /* just check one position up */\
                          if (results->S[i][j-1]+scoring->palpha == tmplast) {\
                            results->align_len++;                             \
                            j--;                                              \
                            foundalign = 1;                                   \
                          }                                                   \
                        }                                                     \
                       else {   /* check to start of column if necessary */   \
                         nextj = j;                                           \
                         tmpgap = scoring->palpha - scoring->pbeta;           \
                         Slast = results->S[i][j];                            \
                         do {                                                 \
                           tmpgap += scoring->pbeta;                          \
                           tmplast = results->S[i][--nextj];                  \
                         } while (nextj>0 && Slast != tmplast + tmpgap);      \
                         if (Slast == tmplast + tmpgap) {                     \
                           results->align_len += j - nextj;                   \
                           j = nextj;                                         \
                           foundalign = 1;      /* found a deletion */        \
                         }                                                    \
                       }                                                      \
                     }

Referenced by ptrace(), trace(), and trtrace().

 
#define scanup (  ) 

Value:

if (i > 0) {                                              \
                       tmplast = results->S[i][j];                            \
                       if (alpha_eq_beta) { /* just check one position up   */\
                          if (results->S[i-1][j]+scoring->alpha == tmplast) { \
                            results->align_len++;                             \
                            i--;                                              \
                            foundalign = 1;                                   \
                          }                                                   \
                        }                                                     \
                       else {   /* check to start of column if necessary */   \
                         nexti = i;                                           \
                         tmpgap = scoring->alpha - scoring->beta;             \
                         Slast = results->S[i][j];                            \
                         do {                                                 \
                           tmpgap += scoring->beta;                           \
                           tmplast = results->S[--nexti][j];                  \
                         } while (nexti>0 && Slast != tmplast + tmpgap);      \
                         if (Slast == tmplast + tmpgap) {                     \
                           results->align_len += i - nexti;                   \
                           i = nexti;                                         \
                           foundalign = 1;      /* found a deletion */        \
                         }                                                    \
                       }                                                      \
                     }

Referenced by ptrace(), trace(), and trtrace().


Function Documentation

void ptrace ( struct SEQALN_SEQUENCE seq,
struct SEQALN_PROFILE pro,
struct SEQALN_CONSTANTS scoring,
struct SEQALN_RESULTS results,
struct SEQALN_IO io 
)


Generated on Wed Aug 10 11:57:04 2011 for Softwares from Orpara by  doxygen 1.5.6