diff COBRAxy/custom_data_generator.py @ 361:ca5d82f9075f draft

Uploaded
author francesco_lapi
date Thu, 04 Sep 2025 23:34:15 +0000
parents 820befcfb42f
children 941ff9b896e4
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.py	Thu Sep 04 23:28:09 2025 +0000
+++ b/COBRAxy/custom_data_generator.py	Thu Sep 04 23:34:15 2025 +0000
@@ -202,8 +202,8 @@
     ARGS = process_args(args)
 
     # this is the worst thing I've seen so far, congrats to the former MaREA devs for suggesting this!
-    if os.path.isdir(ARGS.output_path) == False: 
-        os.makedirs(ARGS.output_path)
+    #if os.path.isdir(ARGS.output_path) == False: 
+    #    os.makedirs(ARGS.output_path)
 
     if ARGS.input:
         # load custom model
@@ -255,15 +255,15 @@
 
 
     ####
-    out_data_path = ARGS.output_path
+    out_data_path = ARGS.output_path  # 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}'")
 
-    print(f"Custom data generated for model '{model_name}' and saved to '{out_data_path}'")
 
 if __name__ == '__main__':
     main()
\ No newline at end of file