Home | Trees | Indices | Help |
---|
|
This class is the main object of the FIA algorithm. Its main purposes are:
|
|||
|
|||
|
|||
|
|||
string |
|
||
list |
|
||
list |
|
||
|
|||
|
|||
number |
|
||
|
|||
|
|||
CSR matrix |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
filename =
|
|
|
This function saves the entire FtblFile class to a file using python's pickle packge. This enables the user to use the data analyzed later without the need of recalculating the transition or LU matrices (which can take a bit of a time). |
MATLAB debugging function. This function saves the mathematical objects used for the optimizaiton process in files in order to be analyzed by MATLAB. |
returns the name of fluxer whose index is flux_num.
|
This function loads the input file into the FtblClass object by:
Eventually we are left with a file containing only TABs. This object is then transformed into an array of lists - every array element is a line of the parsed file, and splitted by TABs into a list object.
|
This function finds the block "seg_name" block segment in the parsed input file self.ftbl_file object. New segments begin with every non-idented line in the input file. Their names are the first string in these lines.
|
This function creates the initial metabolic pools dictionary object by analyzing the NETWORK section of the input file. The function creates the self.pools dictrionary object - Metabolic pools dictionary for which the keys are pools names, and the values are the number of carbon atoms for each pool. |
This function creates and updates the main building blocks objects used for the metabolic pathway analysis. Classification of fluxesClassifiction of fluxes into: uni-directional fluxes, bi-directional fluxes (FTBL files only) and input/output fluxes. The uni and bi direictional analysis is only needed for FTBL files (FIA assumes all the fluxes are uni-directional). The decision is made by looking for 0 constrained exchange fluxes in the FLUXES section of the FTBL file. Re-generation of the NETWORK section - adding necessary virtual fluxesWhen we are given with a chemical reaction that transforms two elements of the same metabolic pool into others, we translate it into a regular multi-input chmecial reaction by adding a virtual pool and flux to our system: As an example: f: A + A -> B + C (flux "f" transforms A+A into B+C) is transformed into: f: A + A_s -> B + C (flux "f" transofmrs A+A_s ito B+C) f_A: A -> A_s (flux "f_A" transforms A into A_s) This transformation is being done on the input file object itself (hence by changing the parsed NETWORK segment of the input file). The same applies for reversed fluxes of bi-diredctional FTBL files fluxes. Analysis of extra-cellular poolsFinding pools which are global input or output to the system, and save them in the self.excell_pools object. These pools are recognized as pools with no input / output fluxes going into / exiting them. Re-generation of the NETWORK section - adding necessary reversed fluxesThe mathematical analysis of the problem consists of flux vector representing uni-directional fluxes. Due to this reason, we need to transform the NETWORK section to contain only uni-directional fluxes by adding to it necessary reversed fluxes. This only applies when FTBL input files are supplied (since again, FIA files are assumed to contain only uni-diretional fluxes in anyway). Generation of the global fluxes vectorGeneration of the global fluxes (as opposed to fluxomers) vector
dictionary object. The dictrionary Generation of the equality matrixThe equality matrix
Generation of the equality measurementsEqualities arised from the constraints section of the FLUXES section
(only applies to FTBL files) are added to the system as measurements
and not as constraints (as opposed to equalities from the EQUALITIES
section). Note that this only relevant for FTBL files. The python
relevant objects are Generation of the global equation listThe entire metabolic network is defined by a set of fluxomeric
equations defined in [ [ poolname : ([input fluxes], [output fluxes])], ... ] where the input and output fluxes are list of the names of the incoming and outgoing fluxes. |
This function returns the index of the global metabolic flux "flux_name".
|
This function parses the FLUX_MEASUREMENTS segment of the ftbl file. It creates the following matrices:
Eventually we will search for: M{min [ (self.flux_meas_mat * x - self.flux_meas_values_).T * diag(self.flux_meas_variance) * (self.flux_meas_mat * x - self.flux_meas_values_)] } |
This function creates the objective function for the MFA optmization problem (the global "G" measurement matrix). The objective of the MFA problem is to minimize: M{|| tG * x - tB ||^2} The matrix
The vector |
This function transforms string equation of fluxes into a fluxomers stoichiometric matrix. For example: "*+flux1/0*-flux2/1" -> [1 0 0 0; 0 0 0 -1])
|
This function parses the LABEL_MEASUREMENTS segment of the ftbl file. The output of the function is the matrices and vectors:
The objective function will be to minimize: M{ ||diag(self.labelmeas_var) * [self.labelmeas_num - diag(self.labelmeas_value) * self.labelmeas_denom]*x ||^2 } |
This function parses the MASS_SPECTROMETRY segment of the ftbl file. The output of the function is the matrices and vectors:
We always treat these measurement as a ratio measurement between the MS values, relative to the 0 MS measurement (hence we add to the objective the ratios: mass1/mass0, mass2/mass0 etc'). The objective function will be to minimize: M{ ||diag(self.ms_meas_var) * [self.ms_meas_num - diag(self.ms_meas_value) * self.ms_meas_denom]*x ||^2 } |
This function constructs the U matrix, which transforms the fluxomers vector into the metaoblic fluxes vector. hence: M{u = U*x} where: u - the metabolic flux vector x - the fluxomers vector |
This function parses the LABEL_INPUT segment. The output of the function is the matrices and vectors:
The objective function will be to minimize: M{ ||diag(self.labelinp_var) * [self.labelinp_num - diag(self.labelinp_value) * self.labelinp_denom]*x ||^2 } Note: since not supplied by the FTBL files, the value of self.labelinp_value is a global assigned constant. |
This function creates the propogation transition matrix: \M{x(t) = P x(t-1)} . P is provided using the following sub matrices:
In addition, this function creates the beta (ratios) vector:
eventually, we have: M{beta_vec = (self.beta_vec_M * u) / (self.beta_vec_N * u)} |
This function computes the LU decomposition of the propogation transition matrices. We find a factorization for: L{self.trans_mat_a} and L{self.trans_mat_b} by finding the LU factorizaiton of the matix constructed out of concatanation of the two above. The result are the matrices:
|
This function runs the main optimization process. It uses the |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Apr 30 15:15:11 2010 | http://epydoc.sourceforge.net |