BioInt  1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
BioRestrictionMap.h
Go to the documentation of this file.
00001 #ifndef BIORESTRICTIONMAP_H
00002 #define BIORESTRICTIONMAP_H
00003 
00004 
00005 #include <iostream>
00006 #include <string>
00007 #include <vector>
00008 #include <map>
00009 
00010 #include "BioUtilities.h"
00011 #include "BioDnaSequence.h"
00012 #include "BioRaw.h"
00013 #include "BioFasta.h"
00014 #include "BioRestrictionEnzymeLibrary.h"
00015 
00016 using namespace std;
00017 
00018 class BioRestrictionMap
00019 {
00020        friend bool operator >(const BioRestrictionMap& , const BioRestrictionMap&);
00021        friend bool operator <(const BioRestrictionMap& , const BioRestrictionMap&);
00022        friend bool operator ==(const BioRestrictionMap& , const BioRestrictionMap&);
00023 
00024   string sequence;
00025   string sequenceName;
00026   vector <string> restrictionEnzymeNames, RENAll;
00027   vector <int> reIndex, reIndexAll; //RESTRICTION ENZYME INDEX
00028   vector <vector <int> > rePos, resPosAll; // RESTRICTIONS ENZYME POSITIONs
00029   bool status, all;
00030   map <string,string> dnaAmb;
00031 
00032   void formRestrictionMap();
00033   void formRestrictionMapAll();
00034   void init();
00035   vector < int > processREs(string REs);
00036   
00037   public:
00038 
00039      BioRestrictionMap(); // A default constructor
00040      BioRestrictionMap(BioDnaSequence dnaSeq, string restrictionEnzymeName);
00041      BioRestrictionMap(BioFasta obj,string restrictionEnzymeName);
00042      BioRestrictionMap(BioRaw obj,string restrictionEnzymeName);
00043     ~BioRestrictionMap(); // destructor
00044     void setSequence(BioDnaSequence dnaSeq);
00045     void setSequence(BioFasta obj);
00046     void setSequence(BioRaw obj);
00047 
00048     void setRestrictionEnzyme(string restrictionEnzymeName);
00049 
00050     void addRestrictionEnzyme(string restrictionEnzymeName);
00051 
00052     int getNumberOfRestrictionEnzymes();
00053     string getRestrictionEnzyme( int   indexRE );     
00054     int getRestrictionEnzymeIndex(string REName);
00055 
00056     vector < int > getRestrictedPositions( int indexRE );
00057     vector < int > getRestrictedPositions( string REs);
00058 
00059 // this gives the REMap with all the SET REs for this Object.
00060 // Map showing all the REs available in the DB of BOS.
00061 //Indeces of the REs which should be used for getting the Fragments, if it is ALL then
00062 // it'll displays all the Restricted Fragments for all the REs in the Database
00063 
00064      void showRestrictionMap(ostream & fout = cout);     
00065      void showRestrictionMap(string REs, ostream & fout = cout);
00066 //     void showRestrictionMap(string REs, BioPostScript ps );
00067 //     void showRestrictionMap(string REs,BioHtml bh);
00068 
00069      void showRestrictionMap(int indexRE, ostream & fout = cout); // the Map of ONLY the Indexed RE set.
00070 //     void showRestrictionMap(int indexRE, BioPostScript ps);
00071 //     void showRestrictionMap(int indexRE, BioHtml bh);
00072 
00073 
00074 
00075 //Indeces of the REs which should be used for getting the Fragments, if it is ALL then
00076 // it'll displays all the Restricted Fragments for all the REs in the Database
00077 
00078      vector <string> getRestrictionEnzymeList(int occurrences);
00079      vector <string> getRestrictionEnzymeList(string occurrences);
00080 
00081      vector <string> getRestrictedFragments(int indexRE = 0 );
00082      vector <string> getRestrictedFragments(string REs);
00083      int getNumberOfRestrictedFragments(int indexRE);
00084      int getNumberOfRestrictedFragments(string REs);
00085 };
00086 
00087 #endif
00088 
00089 
00090 
00091 
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines