ARB
Classes | Macros | Typedefs | Functions | Variables
align.cxx File Reference
#include "mem.h"
#include "trnsprob.h"
#include "i-hopper.h"
#include <cxxforward.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for align.cxx:

Go to the source code of this file.

Classes

struct  score
 
struct  fragment
 
struct  island
 

Macros

#define EXTERN
 
#define MSIZE   512
 
#define ESIZE   36
 
#define MINDIST   0.001
 
#define MAXDIST   1.000
 
#define MAXGAP   16
 
#define NOWHERE   (MAXGAP+1)
 
#define MINLENGTH   5
 

Typedefs

typedef struct score Score
 
typedef struct fragment Fragment
 
typedef struct island Island
 

Functions

static void initScore (double ***pP, double ***pS)
 
static void uninitScore (double ***pP, double ***pS)
 
static void updateScore (double **P, double **S, double F[N], double X[6], double dist)
 
static void initEntropy (double ***EE)
 
static void uninitEntropy (double ***EE)
 
static double getEntropy (double **E, double m, int l)
 
static void updateEntropy (double **P, double **S, double **E)
 
static IslandnewIsland (char *X, char *Y, int i, int j, int d)
 
static void freeIsland (Island **pp)
 
static void registerIsland (Island *f)
 
static IslandselectUpperIslands (Island *f, int nX, int nY, int *incomplete)
 
static IslandselectLowerIslands (Island *f, int *incomplete)
 
static int areEqual (Island *a, Island *b)
 
static int isUnique (Island *f)
 
static int isSignificant (Island *f)
 
static void drawLowerPath (Island *f, int nX, char *X, char *XX, int nY, char *Y, char *YY)
 
static void drawPath (Island *f, int nX, char *X, char *XX, int nY, char *Y, char *YY)
 
static void drawIsland (Island *f)
 
static double secS (int i, int j, char X[], int secX[], char Y[], int secY[])
 
static void AlignTwo (int nX, char X[], int secX[], char XX[], int nY, char Y[], int secY[], char YY[])
 
void Align (int nX, char X[], int secX[], char **XX, int nY, char Y[], int secY[], char **YY, int freqs, double fT, double fC, double fA, double fG, double rTC, double rTA, double rTG, double rCA, double rCG, double rAG, double dist, double supp, double gapA, double gapB, double gapC, double thres)
 

Variables

static double ** GP
 
static double ** GS
 
static Score ** U
 
static double Thres
 
static double LogThres
 
static double Supp
 
static double GapA
 
static double GapB
 
static double GapC
 
static double expectedScore
 
static double ** GE
 
static IslandZ
 
static Island ** ZB
 
static Island ** ZE
 
static int I
 
static int J
 
static int K
 

Macro Definition Documentation

#define EXTERN

Definition at line 14 of file align.cxx.

#define MSIZE   512

Definition at line 22 of file align.cxx.

Referenced by getEntropy(), initEntropy(), matrix_config_changed_cb(), and updateEntropy().

#define ESIZE   36

Definition at line 23 of file align.cxx.

Referenced by initEntropy(), and updateEntropy().

#define MINDIST   0.001

Definition at line 27 of file align.cxx.

Referenced by Align().

#define MAXDIST   1.000

Definition at line 28 of file align.cxx.

Referenced by Align().

#define MAXGAP   16

Definition at line 30 of file align.cxx.

Referenced by AlignTwo().

#define NOWHERE   (MAXGAP+1)

Definition at line 31 of file align.cxx.

Referenced by AlignTwo(), create_new_species(), and newIsland().

#define MINLENGTH   5

Definition at line 33 of file align.cxx.

Referenced by isSignificant().

Typedef Documentation

typedef struct score Score
typedef struct fragment Fragment
typedef struct island Island

Function Documentation

static void initScore ( double ***  pP,
double ***  pS 
)
static

Definition at line 75 of file align.cxx.

References N, N1, and newDoubleMatrix.

Referenced by Align().

static void uninitScore ( double ***  pP,
double ***  pS 
)
static

Definition at line 84 of file align.cxx.

References freeMatrix.

Referenced by Align().

static void updateScore ( double **  P,
double **  S,
double  F[N],
double  X[6],
double  dist 
)
static

Definition at line 93 of file align.cxx.

References A, C, G, getTrnsprob(), initTrnsprob(), N, REV, s, T, uninitTrnsprob(), and updateTrnsprob().

Referenced by Align().

static void initEntropy ( double ***  EE)
static

Definition at line 138 of file align.cxx.

References ESIZE, MSIZE, and newDoubleMatrix.

Referenced by Align().

static void uninitEntropy ( double ***  EE)
static

Definition at line 144 of file align.cxx.

References freeMatrix.

Referenced by Align().

static double getEntropy ( double **  E,
double  m,
int  l 
)
static

Definition at line 150 of file align.cxx.

References M, and MSIZE.

Referenced by isSignificant(), and updateEntropy().

static void updateEntropy ( double **  P,
double **  S,
double **  E 
)
static

Definition at line 211 of file align.cxx.

References ESIZE, getEntropy(), LOG_REAL_MIN, M, MSIZE, N, and REAL_MIN.

Referenced by Align().

static Island* newIsland ( char X,
char Y,
int  i,
int  j,
int  d 
)
static
static void freeIsland ( Island **  pp)
static

Definition at line 375 of file align.cxx.

References island::fragments, freeBlock, and fragment::next.

Referenced by AlignTwo().

static void registerIsland ( Island f)
static
static Island* selectUpperIslands ( Island f,
int  nX,
int  nY,
int incomplete 
)
static
static Island* selectLowerIslands ( Island f,
int incomplete 
)
static
static int areEqual ( Island a,
Island b 
)
static
static int isUnique ( Island f)
static

Definition at line 463 of file align.cxx.

References areEqual(), island::beginX, island::beginY, FALSE, island::nextBeginIndex, and TRUE.

Referenced by AlignTwo().

static int isSignificant ( Island f)
static

Definition at line 474 of file align.cxx.

References FALSE, island::fragments, GE, getEntropy(), fragment::length, LogThres, MINLENGTH, fragment::next, island::score, and TRUE.

Referenced by AlignTwo().

static void drawLowerPath ( Island f,
int  nX,
char X,
char XX,
int  nY,
char Y,
char YY 
)
static
static void drawPath ( Island f,
int  nX,
char X,
char XX,
int  nY,
char Y,
char YY 
)
static
static void drawIsland ( Island f)
static

Definition at line 537 of file align.cxx.

References fragment::beginX, fragment::beginY, island::fragments, length, fragment::next, and island::score.

Referenced by AlignTwo().

static double secS ( int  i,
int  j,
char  X[],
int  secX[],
char  Y[],
int  secY[] 
)
static

Definition at line 564 of file align.cxx.

References expectedScore, GS, and Supp.

Referenced by AlignTwo().

static void AlignTwo ( int  nX,
char  X[],
int  secX[],
char  XX[],
int  nY,
char  Y[],
int  secY[],
char  YY[] 
)
static
void Align ( int  nX,
char  X[],
int  secX[],
char **  XX,
int  nY,
char  Y[],
int  secY[],
char **  YY,
int  freqs,
double  fT,
double  fC,
double  fA,
double  fG,
double  rTC,
double  rTA,
double  rTG,
double  rCA,
double  rCG,
double  rAG,
double  dist,
double  supp,
double  gapA,
double  gapB,
double  gapC,
double  thres 
)

Variable Documentation

double** GP
static

Definition at line 54 of file align.cxx.

Referenced by Align().

double ** GS
static

Definition at line 54 of file align.cxx.

Referenced by Align(), AlignTwo(), newIsland(), and secS().

Score** U
static

Definition at line 67 of file align.cxx.

Referenced by get_load_count(), and level2index().

double Thres
static

Definition at line 69 of file align.cxx.

Referenced by Align().

double LogThres
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and isSignificant().

double Supp
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and secS().

double GapA
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and AlignTwo().

double GapB
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and AlignTwo().

double GapC
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and newIsland().

double expectedScore
static

Definition at line 69 of file align.cxx.

Referenced by Align(), AlignTwo(), newIsland(), and secS().

double ** GE
static

Definition at line 69 of file align.cxx.

Referenced by Align(), and isSignificant().

Island* Z
static

Definition at line 71 of file align.cxx.

Referenced by AlignTwo(), getTrnsprob(), Structure3D::ReadCoOrdinateFile(), and registerIsland().

Island ** ZB
static

Definition at line 71 of file align.cxx.

Island ** ZE
static

Definition at line 71 of file align.cxx.

int I
static
int J
static

Definition at line 489 of file align.cxx.

Referenced by getTrnsprob().

int K
static