00001 #ifndef TRANSLATIONMODELMINIMIZABLE_H_INCLUDED
00002 #define TRANSLATIONMODELMINIMIZABLE_H_INCLUDED
00003
00004 #include "GeneticCode.h"
00005 #include "NLLSMinimizable.h"
00006 #include <fstream>
00007 #include <iostream>
00008 #include <sstream>
00009 #include <iomanip>
00010 #include <cctype>
00011 #include "LocateInputFileDirectory.h"
00012 using namespace std;
00013
00014 class TranslationModelMinimizable : public NLLSMinimizable
00015 {
00016 public:
00017 TranslationModelMinimizable(LocateInputFileDirectory *locate, const char* infilename, int ribosome_length);
00018 ~TranslationModelMinimizable();
00019 double ComputeResiduals(double *parameters);
00020 double EntropyShift(double T);
00021 double F(double *parameters, double T);
00022 double F0(double *parameters, double T);
00023 int GetNParameters();
00024 private:
00025 ifstream& eatwhite(ifstream& is);
00026 double compute_current(double*k ,int length,int rib_size);
00027 void update_dens(double* n, double* k, double J, int N, int L);
00028 int rib_size;
00029 int num_params;
00030 int num_genes;
00031 int num_data_sets;
00032
00033 double** fm;
00034 double** fp;
00035 double** fmerr;
00036 double** fperr;
00037 Codon** RNAseq;
00038 int* length;
00039 GeneticCode* geneticcode;
00040 double* efficiency;
00041
00042 static const int MAX_STRING_LENGTH;
00043 static const double TINY;
00044 static const int MAX_RNA_MOLS;
00045 static const int MAX_RNA_LENGTH;
00046
00047 };
00048
00049 #endif