changeset 356:be93df100d60 draft

Uploaded
author francesco_lapi
date Thu, 04 Sep 2025 23:14:36 +0000
parents 62de44378930
children 72adbf13a462
files COBRAxy/custom_data_generator.py
diffstat 1 files changed, 1 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.py	Thu Sep 04 23:10:02 2025 +0000
+++ b/COBRAxy/custom_data_generator.py	Thu Sep 04 23:14:36 2025 +0000
@@ -259,17 +259,12 @@
     ####
     out_data_path = ARGS.out_data
 
-    # If Galaxy provided a .dat name, ensure a correct extension according to output_format
     if ARGS.output_format == "xlsx":
-        if not out_data_path.lower().endswith(".xlsx"):
-            out_data_path = out_data_path + ".xlsx"
         merged.to_excel(out_data_path, index=False)
     else:
-        # 'tabular' -> tab-separated, extension .csv is fine and common for Galaxy tabular
-        if not (out_data_path.lower().endswith(".csv") or out_data_path.lower().endswith(".tsv")):
-            out_data_path = out_data_path + ".csv"
         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__':