mlocalS_str.h

Go to the documentation of this file.
00001 #ifndef MLOCALS_STR_H
00002 #define MLOCALS_STR_H
00003 
00004 #include "../../../cadbc/cadbc.h"
00005 #include "dynamicaln.h"
00006 #include <iostream>
00007 #include <utility>
00008 
00009 class dyaln {
00010         private:
00011                 //int s1namelen, s2namelen;
00012                 //char *seq1name, *seq2name;
00013                 //int seq1len, seq2len;      // the max allocated space
00014                 //char *seq1str, *seq2str;  //calloc allcated
00015                 struct SEQALN_SEQUENCE *seq1,*seq2; /* 1st & 2nd sequences */
00016                 struct SEQALN_CONSTANTS *scoring; /*Parameters of scoring operation*/
00017                 struct SEQALN_RESULTS *results;  /* Computation results. */
00018                 struct SEQALN_IO *io;
00019 
00020                 /* helper function */
00021                 void allocateMem();
00022                 void initParameter();  // initialize default behavior
00023 
00024                 /* parameters the caller should set these values */
00025                 char distrib_file1[51]; //="distr1.aa";  for profile comparison
00026                 char distrib_file2[51]; // = "distr2.aa";  // we don't need them
00027                 /* sorted residue frequence from big to small */
00028                 pair<float, char> sortedFreq1[20], sortedFreq2[20];
00029 
00030         public:
00031                 //dyaln(cadbc &db1, cadbc &db2);
00032                 //dyaln(const char s1n[], const char s1str[], const char s2n[], const char s2str[]);
00033                 dyaln();
00034                 ~dyaln(); // { free(seq1str); free(seq2str); }
00035                 void freeTrace() { freeTraceList(results); }
00036 
00037                 /* return 0 for success */
00038                 //int align(char* seq1name, char *seq2name);
00039                 // if did not get enough memory, returns 1
00040                 int align(const char s1n[], const char s1str[], const char s2n[], const char s2str[]);
00041                 void setup();
00042 
00048                 void outputTab(ostream &os);
00049 
00060                 void outputTabPos(ostream &os);
00061 
00062                 /* performs trace back inside */
00063                 void outputAln(FILE* ou=stdout);
00064 
00066                 void setMatrix(char m[]) { load_mat(m, scoring, io); }
00067                 /* alpha -> gap open, beta -> gap extension */
00068                 void setGapCost(int alpha, int beta);
00069                 void setcsub(int cs) { scoring->csub=cs; }
00070                 void setNaligns(int n) { scoring->naligns = n; }
00071                 // returns the maxmum of the simpleness value
00072                 bool isSimple(float &ms) const;
00073 };
00074 
00075 #endif

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