annotate COBRAxy/ras_to_bounds.xml @ 80:c38d1d50418b draft

Uploaded
author luca_milaz
date Sun, 13 Oct 2024 10:54:35 +0000
parents 9df36ff21790
children a30013ece710
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
49
1552a2ddea58 Uploaded
luca_milaz
parents: 18
diff changeset
20 --cell_class $cell_class
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
21 #if $cond_model.model_selector == 'Custom'
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
22 --model $model
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
23 --model_name $model.element_identifier
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
24 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
25 --medium_selector $cond_medium.medium_selector
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
26 #if $cond_medium.medium_selector == 'Custom'
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
27 --medium $medium
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
28 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
29 --ras_selector $cond_ras.ras_choice
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
30 #if $cond_ras.ras_choice == "True"
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
31 --input_ras $cond_ras.input_ras
66
c46df775b9fa Uploaded
luca_milaz
parents: 59
diff changeset
32 #set $names = ""
c46df775b9fa Uploaded
luca_milaz
parents: 59
diff changeset
33 #for $input_temp in $cond_ras.input_ras:
c46df775b9fa Uploaded
luca_milaz
parents: 59
diff changeset
34 #set $names = $names + $input_temp.element_identifier + ","
c46df775b9fa Uploaded
luca_milaz
parents: 59
diff changeset
35 #end for
78
3321ab15610c Uploaded
luca_milaz
parents: 75
diff changeset
36 --names $names
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
37 #end if
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
38 --out_log $log
80
c38d1d50418b Uploaded
luca_milaz
parents: 79
diff changeset
39 ssssss
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
40 ]]>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
41 </command>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
42 <inputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
43 <conditional name="cond_model">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
44 <expand macro="options_ras_to_bounds_model"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
45 <when value="Custom">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
46 <param name="model" argument="--model" type="data" format="json, xml" label="Custom model" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
47 </when>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
48 </conditional>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
49
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
50 <conditional name="cond_ras">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
51 <param name="ras_choice" argument="--ras_choice" type="select" label="Do want to use RAS?">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
52 <option value="True" selected="true">Yes</option>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
53 <option value="False">No</option>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
54 </param>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
55 <when value="True">
49
1552a2ddea58 Uploaded
luca_milaz
parents: 18
diff changeset
56 <param name="input_ras" argument="--input_ras" multiple="true" type="data" format="tabular, csv, tsv" label="RAS matrix:" />
4
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 <conditional name="cond_medium">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
61 <expand macro="options_ras_to_bounds_medium"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
62 <when value="Custom">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
63 <param name="medium" argument="--medium" type="data" format="tabular, csv, tsv" label="Custom medium" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
64 </when>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
65 </conditional>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
66
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
67 </inputs>
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 <data format="txt" name="log" label="RAStoBounds- Log" />
49
1552a2ddea58 Uploaded
luca_milaz
parents: 18
diff changeset
71 <data format="tabular" name="cell_class" label="RAStoBounds - Cells class" />
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
72 <collection name="ras_to_bounds" type="list" label="Ras to Bounds">
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
73 <discover_datasets name = "collection" pattern="__name_and_ext__" directory="ras_to_bounds"/>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
74 </collection>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
75
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
76 </outputs>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
77
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
78 <help>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
79
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
80 <![CDATA[
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
81
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
82 What it does
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
83 -------------
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
84
15
88a649e1b5f4 Uploaded
luca_milaz
parents: 4
diff changeset
85 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
86 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
87 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
88
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
89 Accepted files:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
90 - A model: JSON or XML file reporting reactions and rules contained in the model.
59
d4162562c8f5 Uploaded
luca_milaz
parents: 53
diff changeset
91 - RAS matrix: tab-separated RAS file as returned by RAS generator. Multiple RAS files can be uploaded too (e.g. one RAS matrix for normal cells and one for cancer cells). Note that if multiple RAs matrices are uploaded, the bounds are normalzed across all cells.
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
92 - Medium: tab-separated file containing lower and upper-bounds of medium reactions.
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
93
79
9df36ff21790 Uploaded
luca_milaz
parents: 78
diff changeset
94 Example of custum growth medium fileeeee:
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
95
17
7e1d2b5df5cb Uploaded
luca_milaz
parents: 15
diff changeset
96
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
97 +------------+----------------+----------------+
18
e962ba5fc27d Uploaded
luca_milaz
parents: 17
diff changeset
98 | Reaction ID| lower_bound | upper_bound |
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
99 +============+================+================+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
100 | r1 | 0.123167 | 0.371355 |
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
101 +------------+----------------+----------------+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
102 | r2 | 0.268765 | 0.765567 |
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
103 +------------+----------------+----------------+
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
104
59
d4162562c8f5 Uploaded
luca_milaz
parents: 53
diff changeset
105 Example for multiple RAS matrices:
d4162562c8f5 Uploaded
luca_milaz
parents: 53
diff changeset
106 - cancer.csv and normal.csv generated by RAS generator tool (the two class names are 'cancer' and 'normal').
d4162562c8f5 Uploaded
luca_milaz
parents: 53
diff changeset
107 - This tool returns one unique collection of bounds files for both cancer and normal cells (normalization is performed across all cells).
68
d5dd7e863488 Uploaded
luca_milaz
parents: 66
diff changeset
108 - The association cell-class is reported in the 'cell_class' file that is useful to perform flux enrichment analysis based on class partenrship.
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
109
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
110 Output:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
111 -------------
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
112
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
113 The tool generates:
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
114 - bounds: reporting the bounds of the model, or cells if RAS is used. Format: tab-separated.
59
d4162562c8f5 Uploaded
luca_milaz
parents: 53
diff changeset
115 - Classes: a file containing the class of each cell (only if multiple RAS matrices were uploaded). The class name of a RAS matrix corresponds to its file name. Format: tab-separated.
4
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
116 - a log file (.txt).
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
117 ]]>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
118 </help>
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
119 <expand macro="citations" />
41f35c2f0c7b Uploaded
luca_milaz
parents:
diff changeset
120 </tool>