annotate COBRAxy/ras_to_bounds.xml @ 15:88a649e1b5f4 draft

Uploaded
author luca_milaz
date Wed, 18 Sep 2024 12:43:05 +0000
parents 41f35c2f0c7b
children 7e1d2b5df5cb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
1 <tool id="MaREA RAS to bounds" name="RAStoBounds" version="2.0.0">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
2
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
3 <macros>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
4 <import>marea_macros.xml</import>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
5 </macros>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
6
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
7 <requirements>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
8 <requirement type="package" version="1.24.4">numpy</requirement>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
9 <requirement type="package" version="2.0.3">pandas</requirement>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
10 <requirement type="package" version="0.29.0">cobra</requirement>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
11 <requirement type="package" version="5.2.2">lxml</requirement>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
12 <requirement type="package" version="1.4.2">joblib</requirement>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
13 </requirements>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
14
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
15 <command detect_errors="exit_code">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
16 <![CDATA[
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
17 python $__tool_directory__/ras_to_bounds.py
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
18 --tool_dir $__tool_directory__
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
19 --model_selector $cond_model.model_selector
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
20 #if $cond_model.model_selector == 'Custom'
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
21 --model $model
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
22 --model_name $model.element_identifier
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
23 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
24 --medium_selector $cond_medium.medium_selector
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
25 #if $cond_medium.medium_selector == 'Custom'
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
26 --medium $medium
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
27 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
28 --ras_selector $cond_ras.ras_choice
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
29 #if $cond_ras.ras_choice == "True"
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
30 --input_ras $cond_ras.input_ras
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
31 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
32 --out_log $log
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
33 ]]>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
34 </command>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
35 <inputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
36 <conditional name="cond_model">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
37 <expand macro="options_ras_to_bounds_model"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
38 <when value="Custom">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
39 <param name="model" argument="--model" type="data" format="json, xml" label="Custom model" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
40 </when>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
41 </conditional>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
42
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
43 <conditional name="cond_ras">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
44 <param name="ras_choice" argument="--ras_choice" type="select" label="Do want to use RAS?">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
45 <option value="True" selected="true">Yes</option>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
46 <option value="False">No</option>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
47 </param>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
48 <when value="True">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
49 <param name="input_ras" argument="--input_ras" multiple="false" type="data" format="tabular, csv, tsv" label="RAS matrix:" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
50 </when>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
51 </conditional>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
52
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
53 <conditional name="cond_medium">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
54 <expand macro="options_ras_to_bounds_medium"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
55 <when value="Custom">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
56 <param name="medium" argument="--medium" type="data" format="tabular, csv, tsv" label="Custom medium" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
57 </when>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
58 </conditional>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
59
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
60 </inputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
61
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
62 <outputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
63 <data format="txt" name="log" label="RAStoBounds- Log" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
64
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
65 <collection name="ras_to_bounds" type="list" label="Ras to Bounds">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
66 <discover_datasets name = "collection" pattern="__name_and_ext__" directory="ras_to_bounds"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
67 </collection>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
68
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
69 </outputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
70
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
71 <help>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
72
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
73 <![CDATA[
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
74
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
75 What it does
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
76 -------------
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
77
15
88a649e1b5f4 Uploaded
luca_milaz
parents: 4
diff changeset
78 This tool generates the reactions bounds for a given metabolic model (JSON or XML format) both with and without the use of the Reaction Activity Scores (RAS) matrix generated by RAS generator.
88a649e1b5f4 Uploaded
luca_milaz
parents: 4
diff changeset
79 Moreover, it enables to use custom/pre-defined growth mediums to constrain exchange reactions. For a custom medium, It is suggested to use the template file returned by the Custom Data Generator tool.
88a649e1b5f4 Uploaded
luca_milaz
parents: 4
diff changeset
80 If the RAS matrix, generated by the RAS generator tool, is used, then a bounds file is generated for each cell. Otherwise, a single bounds file is returned.
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
81
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
82 Accepted files:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
83 - A model: JSON or XML file reporting reactions and rules contained in the model.
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
84 - RAS matrix: tab-separated RAS file as returned by RAS generator.
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
85 - Medium: tab-separated file containing lower and upper-bounds of medium reactions.
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
86
15
88a649e1b5f4 Uploaded
luca_milaz
parents: 4
diff changeset
87 Example of custum growth medium file:
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
88
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
89 +------------+----------------+----------------+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
90 | Reaction ID| lower_bound | upper_bound |
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
91 +============+================+================+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
92 | r1 | 0.123167 | 0.371355 |
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
93 +------------+----------------+----------------+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
94 | r2 | 0.268765 | 0.765567 |
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
95 +------------+----------------+----------------+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
96
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
97
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
98 Output:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
99 -------------
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
100
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
101 The tool generates:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
102 - bounds: reporting the bounds of the model, or cells if RAS is used. Format: tab-separated.
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
103 - a log file (.txt).
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
104 ]]>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
105 </help>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
106 <expand macro="citations" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
107 </tool>