annotate COBRAxy/utils/ras_to_bounds.xml @ 81:a30013ece710 draft

Uploaded
author luca_milaz
date Sun, 13 Oct 2024 10:57:49 +0000
parents d628088db361
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
77
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
1 <tool id="MaREA RAS to bounds" name="RAStoBounds" version="2.0.0">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
2
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
3 <macros>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
4 <import>marea_macros.xml</import>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
5 </macros>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
6
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
7 <requirements>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
8 <requirement type="package" version="1.24.4">numpy</requirement>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
9 <requirement type="package" version="2.0.3">pandas</requirement>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
10 <requirement type="package" version="0.29.0">cobra</requirement>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
11 <requirement type="package" version="5.2.2">lxml</requirement>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
12 <requirement type="package" version="1.4.2">joblib</requirement>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
13 </requirements>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
14
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
15 <command detect_errors="exit_code">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
16 <![CDATA[
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
17 python $__tool_directory__/ras_to_bounds.py
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
18 --tool_dir $__tool_directory__
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
19 --model_selector $cond_model.model_selector
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
20 --cell_class $cell_class
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
21 #if $cond_model.model_selector == 'Custom'
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
22 --model $model
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
23 --model_name $model.element_identifier
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
24 #end if
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
25 --medium_selector $cond_medium.medium_selector
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
26 #if $cond_medium.medium_selector == 'Custom'
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
27 --medium $medium
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
28 #end if
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
29 --ras_selector $cond_ras.ras_choice
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
30 #if $cond_ras.ras_choice == "True"
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
31 --input_ras $cond_ras.input_ras
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
32 #set $names = ""
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
33 #for $input_temp in $cond_ras.input_ras:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
34 #set $names = $names + $input_temp.element_identifier + ","
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
35 #end for
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
36 --names $names
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
37 #end if
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
38 --out_log $log
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
39 ]]>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
40 </command>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
41 <inputs>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
42 <conditional name="cond_model">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
43 <expand macro="options_ras_to_bounds_model"/>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
44 <when value="Custom">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
45 <param name="model" argument="--model" type="data" format="json, xml" label="Custom model" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
46 </when>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
47 </conditional>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
48
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
49 <conditional name="cond_ras">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
50 <param name="ras_choice" argument="--ras_choice" type="select" label="Do want to use RAS?">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
51 <option value="True" selected="true">Yes</option>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
52 <option value="False">No</option>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
53 </param>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
54 <when value="True">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
55 <param name="input_ras" argument="--input_ras" multiple="true" type="data" format="tabular, csv, tsv" label="RAS matrix:" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
56 </when>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
57 </conditional>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
58
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
59 <conditional name="cond_medium">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
60 <expand macro="options_ras_to_bounds_medium"/>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
61 <when value="Custom">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
62 <param name="medium" argument="--medium" type="data" format="tabular, csv, tsv" label="Custom medium" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
63 </when>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
64 </conditional>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
65
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
66 </inputs>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
67
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
68 <outputs>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
69 <data format="txt" name="log" label="RAStoBounds- Log" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
70 <data format="tabular" name="cell_class" label="RAStoBounds - Cells class" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
71 <collection name="ras_to_bounds" type="list" label="Ras to Bounds">
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
72 <discover_datasets name = "collection" pattern="__name_and_ext__" directory="ras_to_bounds"/>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
73 </collection>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
74
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
75 </outputs>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
76
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
77 <help>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
78
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
79 <![CDATA[
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
80
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
81 What it does
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
82 -------------
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
83
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
84 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.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
85 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.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
86 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.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
87
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
88 Accepted files:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
89 - A model: JSON or XML file reporting reactions and rules contained in the model.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
90 - 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.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
91 - Medium: tab-separated file containing lower and upper-bounds of medium reactions.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
92
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
93 Example of custum growth medium file:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
94
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
95
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
96 +------------+----------------+----------------+
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
97 | Reaction ID| lower_bound | upper_bound |
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
98 +============+================+================+
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
99 | r1 | 0.123167 | 0.371355 |
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
100 +------------+----------------+----------------+
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
101 | r2 | 0.268765 | 0.765567 |
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
102 +------------+----------------+----------------+
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
103
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
104 Example for multiple RAS matrices:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
105 - cancer.csv and normal.csv generated by RAS generator tool (the two class names are 'cancer' and 'normal').
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
106 - This tool returns one unique collection of bounds files for both cancer and normal cells (normalization is performed across all cells).
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
107 - The association cell-class is reported in the 'cell_class' file that is useful to perform flux enrichment analysis based on class partenrship.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
108
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
109 Output:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
110 -------------
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
111
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
112 The tool generates:
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
113 - bounds: reporting the bounds of the model, or cells if RAS is used. Format: tab-separated.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
114 - 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.
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
115 - a log file (.txt).
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
116 ]]>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
117 </help>
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
118 <expand macro="citations" />
d628088db361 Uploaded
luca_milaz
parents:
diff changeset
119 </tool>