Mercurial > repos > bimib > cobraxy
diff COBRAxy/custom_data_generator.py @ 363:941ff9b896e4 draft
Uploaded
author | francesco_lapi |
---|---|
date | Thu, 04 Sep 2025 23:39:51 +0000 |
parents | ca5d82f9075f |
children | 8a6da55f4e0e |
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.py Thu Sep 04 23:34:37 2025 +0000 +++ b/COBRAxy/custom_data_generator.py Thu Sep 04 23:39:51 2025 +0000 @@ -38,13 +38,13 @@ parser.add_argument("--output_format", type=str, choices=["tabular", "xlsx"], required=True, help="Output format: CSV (tabular) or Excel (xlsx)") - parser.add_argument('-idop', '--output_path', type = str, default='result', - help = 'output path for the result files (default: result)') + parser.add_argument("--out_data", type=str, required=True, + help="Output file for the merged dataset (CSV or XLSX)") + parser.add_argument("--tool_dir", type=str, default=os.path.dirname(__file__), - help="Tool directory (passed from Galaxy as $__tool_directory__)") + help="Tool directory (passed from Galaxy as $__tool_directory__)") - return parser.parse_args(args) @@ -255,14 +255,13 @@ #### - out_data_path = ARGS.output_path # Galaxy provides a filepath + out_data_path = ARGS.out_data # Galaxy provides a filepath if ARGS.output_format == "xlsx": merged.to_excel(out_data_path, index=False) else: merged.to_csv(out_data_path, sep="\t", index=False) - print(f"Custom data generated for model '{model_name}' and saved to '{out_data_path}'") if __name__ == '__main__':