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_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