diff COBRAxy/custom_data_generator.py @ 353:d13b39f183a5 draft

Uploaded
author francesco_lapi
date Thu, 04 Sep 2025 23:03:26 +0000
parents 14be2a1071c7
children 62de44378930
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.py	Thu Sep 04 22:54:57 2025 +0000
+++ b/COBRAxy/custom_data_generator.py	Thu Sep 04 23:03:26 2025 +0000
@@ -43,6 +43,10 @@
     parser.add_argument('-idop', '--output_path', type = str, default='result', 
                         help = 'output path for the result files (default: result)')
     
+    parser.add_argument("--tool_dir", type=str, default=os.path.dirname(__file__),
+                    help="Tool directory (passed from Galaxy as $__tool_directory__)")
+
+    
 
     return parser.parse_args(args)
 
@@ -217,7 +221,7 @@
 
         # Load built-in model (Model.getCOBRAmodel uses tool_dir to locate local models)
         try:
-            model = model_enum.getCOBRAmodel()
+            model = model_enum.getCOBRAmodel(toolDir=ARGS.tool_dir)
         except Exception as e:
             # Wrap/normalize load errors as DataErr for consistency
             raise utils.DataErr(ARGS.model, f"failed loading built-in model: {e}")