Mercurial > repos > bimib > cobraxy
comparison COBRAxy/flux_simulation_beta.py @ 470:46901af8df7c draft
Uploaded
| author | luca_milaz |
|---|---|
| date | Mon, 22 Sep 2025 15:23:09 +0000 |
| parents | 5f02f7e4ea9f |
| children | 05a80f8e0574 |
comparison
equal
deleted
inserted
replaced
| 469:5f02f7e4ea9f | 470:46901af8df7c |
|---|---|
| 45 choices=['True', 'False'], | 45 choices=['True', 'False'], |
| 46 required=True, | 46 required=True, |
| 47 help="upload mode: True for model+bounds, False for complete models") | 47 help="upload mode: True for model+bounds, False for complete models") |
| 48 | 48 |
| 49 parser.add_argument("-ens", "--sampling_enabled", type=str, | 49 parser.add_argument("-ens", "--sampling_enabled", type=str, |
| 50 choices=['True', 'False'], | 50 choices=['true', 'false'], |
| 51 required=True, | 51 required=True, |
| 52 help="enable sampling: True for sampling, False for no sampling") | 52 help="enable sampling: 'true' for sampling, 'false' for no sampling") |
| 53 | 53 |
| 54 parser.add_argument('-ol', '--out_log', | 54 parser.add_argument('-ol', '--out_log', |
| 55 help="Output log") | 55 help="Output log") |
| 56 | 56 |
| 57 parser.add_argument('-td', '--tool_dir', | 57 parser.add_argument('-td', '--tool_dir', |
| 346 | 346 |
| 347 Returns: | 347 Returns: |
| 348 List[pd.DataFrame]: A list of DataFrames containing statistics and analysis results. | 348 List[pd.DataFrame]: A list of DataFrames containing statistics and analysis results. |
| 349 """ | 349 """ |
| 350 | 350 |
| 351 if ARGS.sampling_enabled == "True" and ARGS.n_samples > 0: | 351 if ARGS.sampling_enabled == "true" and ARGS.n_samples > 0: |
| 352 | 352 |
| 353 if ARGS.algorithm == 'OPTGP': | 353 if ARGS.algorithm == 'OPTGP': |
| 354 OPTGP_sampler(model_input, cell_name, ARGS.n_samples, ARGS.thinning, ARGS.n_batches, ARGS.seed) | 354 OPTGP_sampler(model_input, cell_name, ARGS.n_samples, ARGS.thinning, ARGS.n_batches, ARGS.seed) |
| 355 elif ARGS.algorithm == 'CBS': | 355 elif ARGS.algorithm == 'CBS': |
| 356 CBS_sampler(model_input, cell_name, ARGS.n_samples, ARGS.n_batches, ARGS.seed) | 356 CBS_sampler(model_input, cell_name, ARGS.n_samples, ARGS.n_batches, ARGS.seed) |
| 497 ARGS.output_types = ARGS.output_type.split(",") if ARGS.output_type else [] | 497 ARGS.output_types = ARGS.output_type.split(",") if ARGS.output_type else [] |
| 498 # optional analysis output types -> list or empty | 498 # optional analysis output types -> list or empty |
| 499 ARGS.output_type_analysis = ARGS.output_type_analysis.split(",") if ARGS.output_type_analysis else [] | 499 ARGS.output_type_analysis = ARGS.output_type_analysis.split(",") if ARGS.output_type_analysis else [] |
| 500 | 500 |
| 501 # Determine if sampling should be performed | 501 # Determine if sampling should be performed |
| 502 if ARGS.sampling_enabled == "True" and ARGS.n_samples > 0: | 502 if ARGS.sampling_enabled == "true" and ARGS.n_samples > 0: |
| 503 perform_sampling = True | 503 perform_sampling = True |
| 504 | 504 |
| 505 print("=== INPUT FILES ===") | 505 print("=== INPUT FILES ===") |
| 506 print(f"{ARGS.input_files}") | 506 print(f"{ARGS.input_files}") |
| 507 print(f"{ARGS.file_names}") | 507 print(f"{ARGS.file_names}") |
