diff COBRAxy/custom_data_generator.py @ 365:8a6da55f4e0e draft

Uploaded
author francesco_lapi
date Thu, 04 Sep 2025 23:44:03 +0000
parents 941ff9b896e4
children 0961c8a27939
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.py	Thu Sep 04 23:40:09 2025 +0000
+++ b/COBRAxy/custom_data_generator.py	Thu Sep 04 23:44:03 2025 +0000
@@ -38,9 +38,11 @@
     parser.add_argument("--output_format", type=str, choices=["tabular", "xlsx"], required=True,
                         help="Output format: CSV (tabular) or Excel (xlsx)")
     
-    parser.add_argument("--out_data", type=str, required=True,
+    parser.add_argument("--out_tabular", type=str,
                         help="Output file for the merged dataset (CSV or XLSX)")
-
+    
+    parser.add_argument("--out_xlsx", type=str,
+                        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__)")
@@ -255,12 +257,11 @@
 
 
     ####
-    out_data_path = ARGS.out_data  # Galaxy provides a filepath
 
     if ARGS.output_format == "xlsx":
-        merged.to_excel(out_data_path, index=False)
+        merged.to_excel(ARGS.out_xlsx, index=False)
     else:
-        merged.to_csv(out_data_path, sep="\t", index=False)
+        merged.to_csv(ARGS.out_tabular, sep="\t", index=False)