'ElMo-Knock'

BitEfm Class Reference

#include <bitefm.h>

Public Member Functions

 BitEfm ()
int load_efm_bit (string efm_bit_fname, t_UnsignedInt num_ems, vector< vector< double > > &stoich)
 Load bit-represented elementary flux mode matrix from the given file using the given number of elementary flux modes.
char * get_buffer ()
int get_bytes_per_efm ()
int get_num_reacs ()
t_UnsignedInt get_num_modes ()
int fast_is_fes (vector< long > &ineff_efm_indices, set< int > &reacs)
 This method checks if the subset of efficient elementary flux modes which uniquely determines the set of reactions 'reacs' is feasible.
int is_efm_elem_zero (unsigned long index, int reac, int &is_zero)
 Check if elementary flux mode has zero value for given reaction.
int read_single_efm (unsigned long index, vector< double > &efm)
 Read indexed elementary mode from the bit-matrix into expanded floating-point column.
int print_efm (unsigned long index, vector< string > &reacs_names)
int retain_efm (vector< long > efm_indices2retain, vector< vector< double > > &yields)
 Removes elementary modes not indexed by the given indices array.
int remove_efm (vector< long > efm_indices2remove, vector< vector< double > > &yields)
 Removes elementary modes indexed by the given indices array.
int knock_efms (map< string, int > knock_reacs, vector< vector< double > > &yields)
 Given a subset of reactions, removes those elementary modes having non-zero flux for at least one of those reactions.

Private Attributes

char * buffer
 variable to store bit-represented elementar mode matrix
string efm_bit_fname
 name of file containing bit-represented elementary mode matrix
vector< vector< double > > stoich
 stoichiometry matrix
t_UnsignedInt num_ems
 number of elementary flux modes
t_UnsignedInt file_length
 length of file containing bit-represented elementary flux modes
int bytes_per_efm
 number of bytes used to represent single elementary flux modes
int num_reacs
 number of reactions in the network

Detailed Description

Abstraction of bit-represented elementary flux mode matrix. Methods allow scanning of elementary flux modes and removal of desired modes.

Definition at line 24 of file bitefm.h.


Constructor & Destructor Documentation

BitEfm::BitEfm ( )

Definition at line 15 of file bitefm.cpp.


Member Function Documentation

int BitEfm::fast_is_fes ( vector< long > &  ineff_efm_indices,
set< int > &  reacs 
)

This method checks if the subset of efficient elementary flux modes which uniquely determines the set of reactions 'reacs' is feasible.

If the subset of reactions from 'reacs' can be used to collapse all the modes indexed by 'ineff_efm_indices' then the corresponding subset of efficient modes is feasible. Scan the given set of inefficient modes to check if there is a mode not having non-zero flux in the given reaction subset reacs

Parameters:
[in]ineff_efm_indicesIndex of inefficient elementary flux modes
[in]reacssubset of reactions available to knockout inefficient modes
Returns:
return 1 if subset is FES, otherwise 0

Definition at line 112 of file bitefm.cpp.

char* BitEfm::get_buffer ( ) [inline]

Definition at line 40 of file bitefm.h.

int BitEfm::get_bytes_per_efm ( ) [inline]

Definition at line 41 of file bitefm.h.

t_UnsignedInt BitEfm::get_num_modes ( )

Definition at line 232 of file bitefm.cpp.

int BitEfm::get_num_reacs ( )

Definition at line 229 of file bitefm.cpp.

int BitEfm::is_efm_elem_zero ( unsigned long  efm_index,
int  reac,
int &  is_zero 
)

Check if elementary flux mode has zero value for given reaction.

Parameters:
[in]efm_indexIndex of elementary flux mode in the EFM matrix
[in]reacindex of reaction in the elementary mode
[out]is_zeroIndicator if the mode has non-zero or zero value for given reaction. 0:non-zero value , 1:zero value
Returns:
Indicator of success of method execution

Definition at line 147 of file bitefm.cpp.

int BitEfm::knock_efms ( map< string, int >  knock_reacs,
vector< vector< double > > &  yields 
)

Given a subset of reactions, removes those elementary modes having non-zero flux for at least one of those reactions.

Parameters:
[in]knock_reacsReactions which are deleted from network
[out]yieldsupdated yields array for target metabolites
Returns:
Indicator of success of method execution
See also:
retain_efm()

Definition at line 336 of file bitefm.cpp.

int BitEfm::load_efm_bit ( string  efm_bit_fname,
t_UnsignedInt  num_ems,
vector< vector< double > > &  stoich 
)

Load bit-represented elementary flux mode matrix from the given file using the given number of elementary flux modes.

Parameters:
[in]efm_bit_fnamename of file which contains bit-represented elementary mode matrix
[in]num_emsnumber of elementary modes
[in]stoichstoichiometry matrix
Returns:
return 1 if subset is FES, otherwise 0

Definition at line 28 of file bitefm.cpp.

int BitEfm::print_efm ( unsigned long  index,
vector< string > &  reacs_names 
)

Definition at line 221 of file bitefm.cpp.

int BitEfm::read_single_efm ( unsigned long  efm_index,
vector< double > &  efm 
)

Read indexed elementary mode from the bit-matrix into expanded floating-point column.

Parameters:
[in]efm_indexIndex of elementary flux mode in the EFM matrix
[out]efmElementary mode floating-point column
Returns:
Indicator of success of method execution

Definition at line 170 of file bitefm.cpp.

int BitEfm::remove_efm ( vector< long >  efm_indices2remove,
vector< vector< double > > &  yields 
)

Removes elementary modes indexed by the given indices array.

Parameters:
[in]efm_indices2removeArray of indices of modes which should be removed
[in,out]yieldsArray of yields for target metabolites for the remaining modes
Returns:
Indicator of success of method execution
See also:
retain_efm()

Definition at line 290 of file bitefm.cpp.

int BitEfm::retain_efm ( vector< long >  efm_indices2retain,
vector< vector< double > > &  yields 
)

Removes elementary modes not indexed by the given indices array.

Parameters:
[in]efm_indices2retainArray of indices of modes which should be retained
[in,out]yieldsArray of yields for target metabolites for the remaining modes
Returns:
Indicator of success of method execution
See also:
remove_efm()

Definition at line 247 of file bitefm.cpp.


Field Documentation

char* BitEfm::buffer [private]

variable to store bit-represented elementar mode matrix

Definition at line 27 of file bitefm.h.

int BitEfm::bytes_per_efm [private]

number of bytes used to represent single elementary flux modes

Definition at line 32 of file bitefm.h.

string BitEfm::efm_bit_fname [private]

name of file containing bit-represented elementary mode matrix

Definition at line 28 of file bitefm.h.

t_UnsignedInt BitEfm::file_length [private]

length of file containing bit-represented elementary flux modes

Definition at line 31 of file bitefm.h.

t_UnsignedInt BitEfm::num_ems [private]

number of elementary flux modes

Definition at line 30 of file bitefm.h.

int BitEfm::num_reacs [private]

number of reactions in the network

Definition at line 33 of file bitefm.h.

vector< vector<double> > BitEfm::stoich [private]

stoichiometry matrix

Definition at line 29 of file bitefm.h.


The documentation for this class was generated from the following files:
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines