dexom_python.cluster_utils modules

Submodules

write_cluster_scripts module

dexom_python.cluster_utils.write_cluster_scripts.main()[source]

This function is called when you run this script from the commandline. It writes batch scripts for launching DEXOM on a slurm cluster. Note that default values are used for most parameters. This also assumes that you have a virtual environment called env in your project directory Use –help to see commandline parameters

There are 3 approaches for using parallel batches in DEXOM: Approach 1: Within each batch, reaction-enumeration and diversity-enumeration are performed. Approach 2: Indiviual diversity-enumeration iterations are launched in each batch - this requires the existance of reaction-enumeration solutions beforehand. Approach 3: First, launch parallel reaction-enumeration batches. Then compile the solutions. Then diversity-enumeration batches can be launched using the compiled rxn-enum solutions as starting points.

dexom_python.cluster_utils.write_cluster_scripts.write_batch_script1(directory, modelfile, weightfile, cplexpath, reactionlist=None, imatsol=None, objtol=0.001, timelim=600, filenums=100, iters=100, rxniters=5)[source]

Writes bash scripts for dexom-python parallelization approach 1 on a slurm cluster. Within each batch, reaction-enumeration and diversity-enumeration are performed. These scripts assume that you have setup a virtual environment called env.

Parameters
  • directory (str) – directory in which the files will be generated. If it does not exist, it will be created

  • modelfile (str) – path to the model

  • weightfile – path to the reaction weights

  • cplexpath (str) – path to a cplex installation on the cluster

  • reactionlist (str) – list of reactions for reaction-enumeration

  • imatsol (str) – path to imat solution

  • objtol (float) – objective tolerance

  • timelim (int) – solver timelimit

  • filenums (int) – number of parallel batches

  • iters (int) – number of diversity-enumeration iterations per batch

  • rxniters (int) – number of reaction-enumeration iterations per batch

dexom_python.cluster_utils.write_cluster_scripts.write_batch_script2(directory, modelfile, weightfile, cplexpath, objtol=0.001, timelim=600, rxnsols=100, filenums=100)[source]

Writes bash scripts for dexom-python parallelization approach 2 on a slurm cluster. In this approach, indiviual diversity-enumeration iterations are laucnhed in each batch - this requires the existance of reaction-enumeration solutions beforehand. These scripts assume that you have setup a virtual environment called env.

Parameters
  • directory (str) – directory in which the files will be generated

  • modelfile (str) – path to the model

  • weightfile – path to the reaction weights

  • cplexpath (str) – path to a cplex installation on the cluster

  • objtol (float) – objective tolerance

  • timelim (int) – solver timelimit

  • rxnsols (int) – number of reaction-enumeration solutions provided

  • filenums (int) – number of parallel batches

dexom_python.cluster_utils.write_cluster_scripts.write_batch_script_divenum(directory, modelfile, weightfile, cplexpath, rxnsols, objtol, filenums=100, iters=100, eps=0.0003, thr=0.0002, tol=1e-07, timelim=600)[source]
dexom_python.cluster_utils.write_cluster_scripts.write_rxn_enum_script(directory, modelfile, weightfile, cplexpath, imatsol=None, reactionlist=None, objtol=0.001, eps=0.0003, thr=0.0002, tol=1e-07, timelim=600, iters=100, maxiters=10000000000.0)[source]

dexom_cluster_results module

dexom_python.cluster_utils.dexom_cluster_results.analyze_dexom_cluster_results(in_folder, out_folder, approach=1, filenums=100)[source]
Parameters
  • in_folder (str) – folder containing dexom results

  • out_folder (str) – folder in which output files will be saved

  • approach (int) – which parallelization approach was used (1, 2, or 3, see enum_functions/enumeration for details)

  • filenums (int) – number of parallel dexom threads that were run

dexom_python.cluster_utils.dexom_cluster_results.main()[source]

This function is called when you run this script from the commandline. It compiles and analyzes results from the DEXOM cluster pipelines Use –help to see commandline parameters

solution_compilation module

dexom_python.cluster_utils.solution_compilation.main()[source]

This function is called when you run this script from the commandline. Compiles binary enumeration solutions from a given folder Use –help to see commandline parameters

Module contents