|
'ElMo-Knock'
|
00001 #include <vector> 00002 #include <string> 00003 #include <map> 00004 #include <iostream> 00005 #include <fstream> // file I/O 00006 #include <sstream> 00007 #include <stdlib.h> 00008 #include <iomanip> 00009 #include <algorithm> 00010 #include <time.h> 00011 #include "options.h" 00012 #include "bitefm.h" 00013 00014 using namespace std; 00015 00016 #ifndef METABOLIC_NETWORK_H 00017 #define METABOLIC_NETWORK_H 00018 00019 00024 class MetabolicNetwork { 00025 00026 protected: 00027 vector< vector<double> > core_efms; 00028 vector< vector<double> > efm_yields; 00030 vector<string> reacs_names; 00031 map<string,int> target_names; 00032 map<string,int> substrate_names; 00033 map<string,int> init_knocks_names; 00034 map<string,int> transport_names; 00036 map<string,double> yields, max_yields; 00037 Options options; 00039 //string efm_fname; //, reac_fname,target_fname,yield_fname, substrate_fname, init_knocks_fname, core_yield_fname; 00040 long num_modes; 00041 00042 int num_reacs, num_metabs; 00043 int compressed_mode; 00044 //indices of efficient and inefficient modes (by yields, max_yields) in efms matrix 00045 vector<long> eff_efm_indices; 00046 vector<long> ineff_efm_indices; 00047 vector<long> knock_cand_reacs; 00048 00049 vector<double> core_min_yields; 00050 vector<long> core_efm_indices; 00051 BitEfm bit_efm; 00052 public: 00053 MetabolicNetwork(); 00054 MetabolicNetwork(MetabolicNetwork &metab_network); 00055 MetabolicNetwork(Options options); 00056 00057 BitEfm& get_bit_efm() { return this->bit_efm;} 00058 int get_num_reacs(); 00059 unsigned long get_num_modes(); 00060 vector<string>& get_reacs_names() { return this->reacs_names;} 00061 map<string,int>& get_substrate_names() {return this->substrate_names;} 00062 map<string,int>& get_target_names() {return this->target_names;} 00063 map<string,int>& get_transport_names() {return this->transport_names;} 00064 map<string,int>& get_init_knocks_names() {return this->init_knocks_names;} 00065 00066 map<string,double>& get_yields() {return this->yields;} 00067 map<string,double>& get_max_yields() {return this->max_yields;} 00068 00069 //vector< vector<double> >& get_efms() { return this->efms;} 00070 vector< vector<double> >& get_core_efms() { return this->core_efms;} 00071 vector< vector<double> >& get_efm_yields() { return this->efm_yields; } 00072 00073 vector<long>& get_eff_efm_indices() { return this->eff_efm_indices;} 00074 vector<long>& get_ineff_efm_indices() { return this->ineff_efm_indices;} 00075 vector<long>& get_core_efm_indices() {return this->core_efm_indices;} 00076 vector<long>& get_knock_cand_reacs() {return this->knock_cand_reacs;} 00077 Options& get_options() {return this->options; } 00078 00079 int init_efm_yields(); 00080 int init_max_yields(); 00081 int init_yields(); 00082 00083 int load_efm_full(string efm_bit_fname, t_UnsignedInt num_ems, vector< vector<double> > &stoich); 00084 double get_efm_elem(unsigned long index, int reac); 00085 int remove_zero_substrate_modes(); 00086 int extract_production_eff_efms(); 00087 int extract_growth_eff_and_ineff_modes(); 00088 int is_efm_elem_zero(unsigned long index, int reac, int &is_zero); 00089 int is_core_efms_collapsed(map<int,string> knock_reacs,int &cnt_not_collapsed); 00090 00091 }; 00092 00093 00094 #endif