changeset 345:5725e5bcccf9 draft

Uploaded
author francesco_lapi
date Thu, 04 Sep 2025 22:10:56 +0000
parents eff58e727e4b
children 0ac89744208f
files COBRAxy/custom_data_generator.xml
diffstat 1 files changed, 38 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/COBRAxy/custom_data_generator.xml	Thu Sep 04 22:10:03 2025 +0000
+++ b/COBRAxy/custom_data_generator.xml	Thu Sep 04 22:10:56 2025 +0000
@@ -14,26 +14,50 @@
     <command detect_errors="exit_code">
         <![CDATA[
       	python $__tool_directory__/custom_data_generator.py
-        --input $input
-        --name $input.element_identifier
+        --medium_selector $cond_medium.medium_selector
+        --output_format $output_format
+        #if $cond_model.model_selector == 'Custom_model'
+            --input $cond_model.input
+            --name $cond_model.name
+        #else
+            --model $cond_model.model_selector
+            --name $cond_model.model_selector
+        #end if
+        #if $cond_medium.medium_selector == 'Custom'
+            --medium $cond_medium.medium
+        #end if
         --out_log $log
-        --out_rules $rules
-        --out_reactions $reactions
-        --out_bounds $bounds
-        --out_medium $medium
+        --out_data $out_data
         ]]>
     </command>
     <inputs>
-        <param name="input" argument="--input" type="data" format="xml, json" label="Custom model:" />
-        <param name="name" argument="--name" type="text" label="Model's name:" value="Model" help="Default: Model" />
+        <!-- modello -->
+        <conditional name="cond_model">
+            <expand macro="options_model"/>
+            <when value="Custom_model">
+                <param name="input" argument="--input" type="data" format="json,xml" label="Custom model file:" />
+                <param name="name" argument="--name" type="text" label="Model's name:" value="CustomModel" help="Default: CustomModel. Do not use spaces or special symbols." />
+            </when>
+        </conditional>
+
+        <!-- formato output -->
+        <param name="output_format" argument="--output_format" type="select" label="Output format:">
+            <option value="tabular" selected="true">CSV (tabular)</option>
+            <option value="xlsx">Excel (.xlsx)</option>
+        </param>
+
+        <!-- medium -->
+        <conditional name="cond_medium">
+            <expand macro="options_ras_to_bounds_medium"/>
+            <when value="Custom">
+                <param name="medium" argument="--medium" type="data" format="tabular,csv,tsv" label="Custom medium file:" />
+            </when>
+        </conditional> 
     </inputs>
 
     <outputs>
-        <data format="txt" name="log" label="${tool.name} - Log" />
-        <data format="tabular" name="rules" label="${name}_Rules" />
-        <data format="tabular" name="reactions" label="${name}_Reactions" />
-        <data format="tabular" name="bounds" label="${name}_Bounds" />
-        <data format="tabular" name="medium" label="${name}_Medium" />
+        <data name="log" format="txt" label="CustomDataGenerator - Log" />
+        <data name="out_data" format="$output_format" label="${cond_model.model_selector}_data" />
     </outputs>
 
     <help>
@@ -45,7 +69,7 @@
 Reactions and rules can be used as inputs for the RAS and RPS generator tools.
 
 Accepted files:
-    - A model: JSON or XML file reporting reactions and rules contained in the model.   
+    - A model: JSON or XML file reporting reactions and rules contained in the model. Supported compressed formats: .zip, .gz and .bz2 - Filename must end with .json.zip (.xml.zip), .json.gz (.xml.gz) or .json.bz2 (.xml.bz2) for JSON (XML) files.   
 
 
 Output: