dexom_python.enum_functions subpackage

Submodules

enum_functions.diversity_enum module

diversity-based enumeration

param model

type model

cobrapy Model

param reaction_weights

keys = reactions and values = weights

type reaction_weights

dict

param prev_sol

a previous imat solution

type prev_sol

Solution instance

param threshold

detection threshold of activated reactions

type threshold

float

param obj_tol

variance allowed in the objective_values of the solutions

type obj_tol

float

param maxiter

maximum number of solutions to search for

type maxiter

foat

param dist_anneal

parameter which influences the probability of selecting reactions

type dist_anneal

float

param out_path

path to which the solutions are saved if save==True

type out_path

str

param icut

if True, icut constraints are applied

type icut

bool

param full

if True, the full-DEXOM implementation is used

type full

bool

param save

if True, every individual solution is saved in the iMAT solution format

type save

bool

returns

solution

rtype

an EnumSolution object

enum_functions.enumeration module

class dexom_python.enum_functions.enumeration.EnumSolution(solutions, binary, objective_value)[source]

Bases: object

class for solutions of enumeration methods

Parameters
  • solutions (list) – list of pandas dataframes containing flux values with reaction ids as index

  • binary (list) – list containing binary arrays of reaction activity (0 for inactive, 1 for active)

  • objective_value (float) – objective value returned by the solver at the end of the optimization

dexom_python.enum_functions.enumeration.analyze_div_enum_results(result_path, solution_path, out_path)[source]

This function calculates the average pairwise hamming distance and average next neighbour distance for each iteration - it’s very slow

Parameters
  • result_path (csv results file from diversity-enum) –

  • solution_path (csv solution file from diversity-enum) –

  • out_path (path for saving) –

dexom_python.enum_functions.enumeration.create_enum_variables(model, reaction_weights, eps=0.01, thr=1e-05, full=False)[source]
dexom_python.enum_functions.enumeration.get_recent_solution_and_iteration(dirpath, startsol_num)[source]
dexom_python.enum_functions.enumeration.write_batch_script1(directory, username, modelfile, weightfile, reactionlist, imatsol, objtol, filenums=100, iters=100)[source]
dexom_python.enum_functions.enumeration.write_batch_script2(filenums)[source]

Warning: this function has not been updated with recent changes to DEXOM

dexom_python.enum_functions.enumeration.write_batch_script_divenum(directory, username, modelfile, weightfile, rxnsols, objtol, eps=0.0001, thr=1e-05, tol=1e-08, filenums=100, iters=100, t=6000)[source]
dexom_python.enum_functions.enumeration.write_rxn_enum_script(directory, modelfile, weightfile, reactionlist, imatsol, username, eps=0.0001, thr=1e-05, tol=1e-08, iters=100, maxiters=10000000000.0)[source]

enum_functions.icut module

integer-cut method

param model

type model

cobrapy Model

param prev_sol

an imat solution used as a starting point

type prev_sol

imat Solution object

param reaction_weights

keys = reactions and values = weights

type reaction_weights

dict

param eps

activation threshold in imat

type eps

float

param thr

detection threshold of activated reactions

type thr

float

param tlim

time limit for imat

type tlim

int

param tol

tolerance for imat

type tol

float

param obj_tol

variance allowed in the objective_values of the solutions

type obj_tol

float

param maxiter

maximum number of solutions to check for

type maxiter

foat

param full

if True, carries out integer-cut on all reactions; if False, only on reactions with non-zero weights

type full

bool

returns

solution – In the case of integer-cut, all_solutions and unique_solutions are identical

rtype

EnumSolution object

enum_functions.maxdist module

param model

type model

cobrapy Model

param prev_sol

an imat solution used as a starting point

type prev_sol

imat Solution object

param reaction_weights

keys = reactions and values = weights

type reaction_weights

dict

param eps

activation threshold in imat

type eps

float

param thr

detection threshold of activated reactions

type thr

float

param tlim

time limit for imat

type tlim

int

param tol

tolerance for imat

type tol

float

param obj_tol

variance allowed in the objective_values of the solutions

type obj_tol

float

param maxiter

maximum number of solutions to check for

type maxiter

foat

param icut

if True, icut constraints are applied

type icut

bool

param full

if True, carries out integer-cut on all reactions; if False, only on reactions with non-zero weights

type full

bool

param only_ones

if True, only the ones in the binary solution are used for distance calculation (as in dexom matlab)

type only_ones

bool

enum_functions.rxn_enum module

Reaction enumeration method

param model

type model

cobrapy Model

param reaction_weights

keys = reactions and values = weights

type reaction_weights

dict

param eps

activation threshold in imat

type eps

float

param thr

detection threshold of activated reactions

type thr

float

param tlim

time limit for imat

type tlim

int

param tol

tolerance for imat

type tol

float

param obj_tol

variance allowed in the objective_values of the solutions

type obj_tol

float

param out_name

name of output files without format

type out_name

str

returns

solution

rtype

RxnEnumSolution object

Module contents