Mercurial > repos > bimib > marea_2_0
changeset 183:cbe1cb0a55be draft
Uploaded
author | luca_milaz |
---|---|
date | Thu, 04 Jul 2024 14:11:55 +0000 |
parents | 7be7ea5283cb |
children | 88cf0882e175 |
files | marea_2_0/flux_sampling.xml marea_2_0/statistics.xml |
diffstat | 2 files changed, 0 insertions(+), 172 deletions(-) [+] |
line wrap: on
line diff
--- a/marea_2_0/flux_sampling.xml Thu Jul 04 14:09:24 2024 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -<tool id="fluxSampling" name="COBRAxy Model sampling" 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__/flux_sampling.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 - --thinning 0 - #if $algorithm_param.algorithm == 'OPTGP': - --thinning $algorithm_param.thinning - #end if - --algorithm $algorithm_param.algorithm - --n_batches $n_batches - --n_samples $n_samples - --seed $seed - --output_format $output_format - --out_log $log - ]]> - </command> - <inputs> - - <param name="inputs" argument="--inputs" multiple="true" type="data" format="xml, json" label="Model(s):" /> - - <conditional name="algorithm_param"> - <param name="algorithm" argument="--algorithm" type="select" label="Choose sampling algorithm:"> - <option value="CBS" selected="true">CBS</option> - <option value="OPTGP">OPTGP</option> - </param> - <when value="OPTGP"> - <param name="thinning" argument="--thinning" type="integer" label="Thinning:" value="100" help="Number of iterations to wait before taking a sample."/> - </when> - - </conditional> - - - <param name="n_samples" argument="--n_samples" type="integer" label="Samples:" value="1000"/> - - <param name="n_batches" argument="--n_batches" type="integer" label="Batches:" value="1" help="The output file will contain n_batches*n_samples samples. - This is useful for computational perfomances."/> - - <param name="seed" argument="--seed" type="integer" label="Seed:" value="0" helph="Random seed."/> - - <param name="output_format" argument="--output_format" type="select" label="Output files format:"> - <option value="pickle" selected="true">pickle extension (binary, non-editable, pre-parsed)</option> - <option value="csv">Comma Separated Values (csv text file, editable, raw)</option> - </param> - </inputs> - - - <outputs> - <data format="txt" name="log" label="fluxSampling - Log" /> - <collection name="results" type="list" label="${tool.name} - Samples"> - <discover_datasets pattern="__name_and_ext__" directory="flux_sampling"/> - </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
--- a/marea_2_0/statistics.xml Thu Jul 04 14:09:24 2024 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -<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