changeset 181:af2079c6b749 draft

Uploaded
author luca_milaz
date Thu, 04 Jul 2024 13:44:00 +0000
parents e9d885907c33
children 7be7ea5283cb
files marea_2_0/statistics.xml
diffstat 1 files changed, 75 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/marea_2_0/statistics.xml	Thu Jul 04 13:44:00 2024 +0000
@@ -0,0 +1,75 @@
+<tool id="statistics" name="Statistics" version="2.0.0">
+    
+    <macros>
+        <import>marea_macros.xml</import>
+    </macros>
+
+	<requirements>
+        <requirement type="package" version="0.29.0">cobra</requirement>
+        <requirement type="package" version="4.9.3">lxml</requirement>
+        <requirement type="package" version="1.4.2">joblib</requirement>
+        
+	</requirements>
+
+    <command detect_errors="exit_code">
+        <![CDATA[
+        python $__tool_directory__/statistics.py
+        --tool_dir $__tool_directory__
+        --input "${",".join(map(str, $inputs))}"
+        #set $names = ""
+        #for $input_temp in $inputs:
+            #set $names = $names + $input_temp.element_identifier + ","
+        #end for
+        --name $names
+        --statistics "${",".join(map(str, $statistics))}"
+        --toMerge toMerge
+        --out_log $log
+        ]]>
+    </command>
+    <inputs>
+
+        <param name="inputs" argument="--inputs" multiple="true" type="data" format="tabular, csv, tsv, p" label="Dataset(s):" />
+
+        <param type="select" argument="--statistics" multiple="true" name="statistics" label="Statistics">
+            <option value="mean" selected="true">Mean</option>
+            <option value="median">Median</option>
+            <option value="quantiles">Quantiles</option>
+            <option value="correlation">Biomass correlation</option>
+        </param>
+        <param name="toMerge" argument="--toMerge" type="boolean" checked="true" truevalue="Yes" falsevalue="No"
+         label="Merge datasets" help="If true, generate for each statiscs a single dataset having as index all the input datasets."/>
+    </inputs>
+
+        		
+    <outputs>
+        <data format="txt" name="log" label="statistics - Log" />
+        <collection name="results" type="list" label="${tool.name} - Statistics">
+            <discover_datasets pattern="__name_and_ext__" directory="statistics"/>
+        </collection>
+    </outputs>
+       
+        
+    <help>
+    <![CDATA[
+What it does
+-------------
+
+This tool generates flux samples starting from a model in JSON or XML format by using CBS (Corner-based sampling) and OPTGP (mproved Artificial Centering Hit-and-Run sampler) sampling algorithms.
+
+Accepted files:
+    - A model: JSON or XML file reporting reactions and rules contained in the model. It can be a single model, multiple models or a collection of models. 
+
+Output:
+-------------
+
+The tool generates:
+    - Samples: reporting the sampled fluxes for each reaction. Format: csv or pickle.
+    - a log file (.txt).
+
+**TIP**: The Batches parameter is useful to mantain in memory just a batch of samples at time. For example, if you wish to sample 10.000 points, than it is suggested to select n_samples = 1.000 and n_batches=10.
+
+
+]]>
+    </help>
+    <expand macro="citations" />
+</tool>
\ No newline at end of file