# HG changeset patch # User francesco_lapi # Date 1731430728 0 # Node ID 898f2641d3f73fca33d70a40b37b8efc2bcf6f28 # Parent 30acaa01df6177c0442ff1898a9177d1b6af0fa3 Uploaded diff -r 30acaa01df61 -r 898f2641d3f7 COBRAxy/flux_simulation.py --- a/COBRAxy/flux_simulation.py Tue Nov 12 14:19:01 2024 +0000 +++ b/COBRAxy/flux_simulation.py Tue Nov 12 16:58:48 2024 +0000 @@ -88,11 +88,10 @@ required = False, help = 'output type analysis') - parser.add_argument( - '-idop', '--output_path', - type = str, - default='flux_simulation', - help = 'output path for maps') + parser.add_argument('-idop', '--output_path', + type = str, + default='flux_simulation', + help = 'output path for maps') ARGS = parser.parse_args(args) return ARGS @@ -239,7 +238,7 @@ model_input.reactions.get_by_id(rxn_index).lower_bound = row.lower_bound model_input.reactions.get_by_id(rxn_index).upper_bound = row.upper_bound - name = cell_name + name = cell_name.split('.')[0] if ARGS.algorithm == 'OPTGP': OPTGP_sampler(model_input, name, ARGS.n_samples, ARGS.thinning, ARGS.n_batches, ARGS.seed) @@ -382,9 +381,8 @@ global ARGS ARGS = process_args(args) - if not os.path.exists('flux_simulation/'): - os.makedirs('flux_simulation/') - + if not os.path.exists(ARGS.output_path): + os.makedirs(ARGS.output_path) model_type :utils.Model = ARGS.model_selector if model_type is utils.Model.Custom: