BioInt  1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
Overlap/BioDnaSequenceAlignment.h
Go to the documentation of this file.
00001 #ifndef BIODNASEQUENCEALIGNMENT_H
00002 #define BIODNASEQUENCEALIGNMENT_H
00003 
00004 #include <iostream>
00005 #include <fstream>
00006 #include <string>
00007 #include <sstream>
00008 #include <vector>
00009 #include "BioUtilities.h"
00010 #include "BioDnaSequence.h"
00011 #include "BioGenBank.h"
00012 #include "BioFasta.h"
00013 #include "BioEmbl.h"
00014 #include "BioDnaSubstitutionMatrix.h"
00015 
00016 
00017 class BioDnaSequenceAlignment
00018 {
00019   protected:
00020   /* CHANGED BY HARI ON 13 MAR 2005 TO GIVE ACCESS TO seq1_ and seq2_ variables to be used in BioDnaSequenceRepeat's showAlignment(ps);*/
00021   
00022   /*VARIABLES*/
00023   
00024     string seq1_,seq2_; /* These variables hold the sequences to be aligned*/
00025     
00026     string outSeq1_,outSeq2_;
00027     
00028     string seqName1_,seqName2_; /* These variables hold the Sequence Names */
00029     
00030     static string nucleicAcidSeq; /* This String Holds the nucleic acid single letter codes */
00031     
00032     int gapPenalty; /* This varible is used to Set the Gap Penalty in sequence alignment process (in substitution matrix) */
00033     
00034     int gapExtn; /* This variable is used to set the Gap Extention Penalty in sequence alignment process*/
00035     
00036     BioMatrix substitutionMatrix; /* This 2D array holds the Substitutionmatrix elements used for the currrent alignment*/
00037     
00038     /* This is a temporary 2D variable used for creating scoring  matrix and accumulation matrix.*/
00039         vector< vector <int> > tempMatrix; 
00040     int status;
00041     
00042   /*FUNCTIONS*/
00043   
00044     void formScoringMatrix();
00045     int getAccValMov(long,long,int);
00046 
00047     BioDnaSequenceAlignment();
00048     BioDnaSequenceAlignment(BioDnaSequence,BioDnaSequence,string,string MatName,int GP=-11,int extn=-9999);
00049     BioDnaSequenceAlignment(BioDnaSequence,string,string,string MatName,int GP=-11,int extn=-9999);    
00050     BioDnaSequenceAlignment(BioDnaSequence,BioDnaSequence,string mat="IDENTITY",int GP=-11,int extn=-9999);
00051     BioDnaSequenceAlignment(BioDnaSequence,string,string mat="IDENTITY",int GP=-11,int extn=-9999);    
00052     BioDnaSequenceAlignment(BioDnaSequence,BioDnaSequence,int MS,int MMS,int GP=-11,int extn=-9999);
00053     BioDnaSequenceAlignment(BioDnaSequence,string,int MS,int MMS,int GP=-11,int extn=-9999);
00054                     
00055     BioDnaSequenceAlignment(BioGenBank,BioGenBank,string,string MatName,int GP=-11,int extn=-9999);
00056     BioDnaSequenceAlignment(BioGenBank,string,string,string MatName,int GP=-11,int extn=-9999);    
00057     BioDnaSequenceAlignment(BioGenBank,BioGenBank,string mat="IDENTITY",int GP=-11,int extn=-9999);
00058     BioDnaSequenceAlignment(BioGenBank,string,string mat="IDENTITY",int GP=-11,int extn=-9999);    
00059     BioDnaSequenceAlignment(BioGenBank,BioGenBank,int MS,int MMS,int GP=-11,int extn=-9999);
00060     BioDnaSequenceAlignment(BioGenBank,string,int MS,int MMS,int GP=-11,int extn=-9999);    
00061 
00062     BioDnaSequenceAlignment(BioFasta,BioFasta,string,string MatName,int GP=-11,int extn=-9999);
00063     BioDnaSequenceAlignment(BioFasta,string,string,string MatName,int GP=-11,int extn=-9999);    
00064     BioDnaSequenceAlignment(BioFasta,BioFasta,string mat="IDENTITY",int GP=-11,int extn=-9999);
00065     BioDnaSequenceAlignment(BioFasta,string,string mat="IDENTITY",int GP=-11,int extn=-9999);    
00066     BioDnaSequenceAlignment(BioFasta,BioFasta,int MS,int MMS,int GP=-11,int extn=-9999);
00067     BioDnaSequenceAlignment(BioFasta,string,int MS,int MMS,int GP=-11,int extn=-9999);
00068     
00069     BioDnaSequenceAlignment(BioEmbl,BioEmbl,string,string MatName,int GP=-11,int extn=-9999);
00070     BioDnaSequenceAlignment(BioEmbl,string,string,string MatName,int GP=-11,int extn=-9999);    
00071     BioDnaSequenceAlignment(BioEmbl,BioEmbl,string mat="IDENTITY",int GP=-11,int extn=-9999);
00072     BioDnaSequenceAlignment(BioEmbl,string,string mat="IDENTITY",int GP=-11,int extn=-9999);    
00073     BioDnaSequenceAlignment(BioEmbl,BioEmbl,int MS,int MMS,int GP=-11,int extn=-9999);
00074     BioDnaSequenceAlignment(BioEmbl,string,int MS,int MMS,int GP=-11,int extn=-9999);    
00075 
00076     BioDnaSequenceAlignment(string,string,string,string,int GP=-11,int extn=-9999);
00077     BioDnaSequenceAlignment(string,string,string mat="IDENTITY",int GP=-11,int extn=-9999);
00078     BioDnaSequenceAlignment(string,string,int MS,int MMS,int GP=-11,int extn=-9999);
00079         
00080 public:                
00081     void setSequence1(BioDnaSequence);
00082     void setSequence2(BioDnaSequence);
00083     void setSequence1(BioGenBank);
00084     void setSequence2(BioGenBank);
00085     void setSequence1(BioFasta);
00086     void setSequence2(BioFasta);
00087     void setSequence1(BioEmbl);
00088     void setSequence2(BioEmbl);
00089     void setSequence1(string);
00090     void setSequence2(string);
00091 
00092     void setSubstitutionMatrix(string);
00093     void setSubstitutionMatrix(string,string);
00094     void setGapPenalty(int GP=-11,int extn=-9999);
00095     void setMatchMisMatchScore(int MS=1,int MMS=0);
00096 
00097     void showScoringMatrix(ostream & = cout);
00098 };
00099 
00100 #endif
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines