aln.h

Go to the documentation of this file.
00001 #ifndef MLOCALS_STR_H
00002 #define MLOCALS_STR_H
00003 /* alignment base class to be used for global, local derived classes 
00004  * */
00005 
00006 #include "../../../cadbc/cadbc.h"
00007 #include "dynamicaln.h"
00008 #include <iostream.h>
00009 #include <utility>
00010 
00011 class aln {
00012         private:
00013                 struct SEQALN_SEQUENCE *seq1,*seq2; /* 1st & 2nd sequences */
00014                 struct SEQALN_CONSTANTS *scoring; /*Parameters of scoring operation*/
00015                 struct SEQALN_RESULTS *results;  /* Computation results. */
00016                 struct SEQALN_IO *io;
00017 
00018                 /* helper function */
00019                 void allocateMem();
00020                 void initParameter();  // initialize default behavior
00021 
00022                 /* parameters the caller should set these values */
00023                 char distrib_file1[51]; //="distr1.aa";  for profile comparison
00024                 char distrib_file2[51]; // = "distr2.aa";  // we don't need them
00025                 /* sorted residue frequence from big to small */
00026                 pair<float, char> sortedFreq1[20], sortedFreq2[20];
00027 
00028         public:
00029                 dyaln();
00030                 ~dyaln(); // { free(seq1str); free(seq2str); }
00031                 /* return 0 for success */
00032                 int align(const char s1n[], const char s1str[], const char s2n[], const char s2str[]);
00033                 void setup();
00034 
00035                 /* return true if matches region is just simple repeats */
00036                 void outputTab(ostream &os);
00037                 void freeTrace() { freeTraceList(results); }
00038                 /* performs trace back inside */
00039                 void outputAln(FILE* ou=stdout);
00040 
00041                 // set alignment parameters
00042                 void setMatrix(char m[]) { load_mat(m, scoring, io); }
00043                 /* alpha -> gap open, beta -> gap extension */
00044                 void setGapCost(int alpha, int beta);
00045                 void setcsub(int cs) { scoring->csub=cs; }
00046                 bool isSimple() const;
00047                 void setNaligns(int n) { scoring->naligns = n; }
00048 };
00049 
00050 #endif

Generated on Wed Aug 10 11:56:53 2011 for Softwares from Orpara by  doxygen 1.5.6