comparison ReactionDistanceMatrix.xml @ 0:886e0872fa6c draft

planemo upload for repository https://forgemia.inra.fr/metexplore/met4j-galaxy commit e28ca123295d50b85ba872e5a4720fd72697ecc3
author metexplore
date Thu, 13 Mar 2025 15:49:02 +0000
parents
children d05c0c639108
comparison
equal deleted inserted replaced
-1:000000000000 0:886e0872fa6c
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <tool id="met4j_ReactionDistanceMatrix" name="ReactionDistanceMatrix" version="@TOOL_VERSION@">
3 <description>Create a reaction to reaction distance matrix.</description>
4 <macros>
5 <import>macros.xml</import>
6 </macros>
7 <expand macro="bio_tools"/>
8 <expand macro="requirements"/>
9 <command detect_errors="exit_code"><![CDATA[met4j fr.inrae.toulouse.metexplore.met4j_toolbox.networkAnalysis.ReactionDistanceMatrix -i "$inputPath"
10 #if str($sideCompoundFile) != 'None':
11 -sc "$sideCompoundFile"
12 #end if
13 $degree
14 #if str($rExclude) != 'None':
15 -re "$rExclude"
16 #end if
17 #if str($rxnFile) != 'None':
18 -s "$rxnFile"
19 #end if
20 #if str($weightFile) != 'None':
21 -w "$weightFile"
22 #end if
23 $undirected
24 -o "$outputPath"
25 ]]></command>
26 <inputs>
27 <param argument="-i" format="sbml" label="input SBML file" name="inputPath" optional="false" type="data" value=""/>
28 <param argument="-sc" format="txt" label="an optional file containing list of side compounds to ignore" name="sideCompoundFile" optional="true" type="data" value=""/>
29 <param argument="-dw" checked="false" falsevalue="" label="penalize traversal of hubs by using degree square weighting (-w must not be set)" name="degree" truevalue="-dw" type="boolean" value="false"/>
30 <param argument="-re" format="txt" label="an optional file containing list of reactions to ignore" name="rExclude" optional="true" type="data" value=""/>
31 <param argument="-s" format="txt" label="an optional file containing list of reactions of interest." name="rxnFile" optional="true" type="data" value=""/>
32 <param argument="-w" format="tsv" label="an optional file containing weights for compound pairs" name="weightFile" optional="true" type="data" value=""/>
33 <param argument="-u" checked="false" falsevalue="" label="Ignore reaction direction" name="undirected" truevalue="-u" type="boolean" value="false"/>
34 </inputs>
35 <outputs>
36 <data format="csv" name="outputPath"/>
37 </outputs>
38 <tests>
39 <test>
40 <param name="inputPath" value="toy_model.xml"/>
41 <output ftype="csv" name="outputPath">
42 <assert_contents>
43 <has_n_lines n="8"/>
44 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5,reac6,reac7" n="1"/>
45 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0,Infinity,Infinity" n="1"/>
46 <has_line_matching expression="reac2,Infinity,0.0,1.0,1.0,2.0,Infinity,Infinity" n="1"/>
47 </assert_contents>
48 </output>
49 </test>
50 <test>
51 <param name="inputPath" value="toy_model.xml"/>
52 <param name="undirected" value="true"/>
53 <output ftype="csv" name="outputPath">
54 <assert_contents>
55 <has_n_lines n="8"/>
56 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5,reac6,reac7" n="1"/>
57 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0,5.0,4.0" n="1"/>
58 <has_line_matching expression="reac2,1.0,0.0,1.0,1.0,2.0,4.0,3.0" n="1"/>
59 </assert_contents>
60 </output>
61 </test>
62 <test>
63 <param name="inputPath" value="toy_model.xml"/>
64 <param name="undirected" value="true"/>
65 <param name="sideCompoundFile" value="sides.txt"/>
66 <output ftype="csv" name="outputPath">
67 <assert_contents>
68 <has_n_lines n="8"/>
69 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5,reac6,reac7" n="1"/>
70 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0,5.0,4.0" n="1"/>
71 <has_line_matching expression="reac2,1.0,0.0,1.0,2.0,3.0,5.0,4.0" n="1"/>
72 <has_line_matching expression="reac3,1.0,1.0,0.0,1.0,2.0,4.0,3.0" n="1"/>
73 <has_line_matching expression="reac4,2.0,2.0,1.0,0.0,1.0,3.0,2.0" n="1"/>
74 </assert_contents>
75 </output>
76 </test>
77 <test>
78 <param name="inputPath" value="toy_model.xml"/>
79 <param name="undirected" value="true"/>
80 <param name="rExclude" value="rexclude.txt"/>
81 <output ftype="csv" name="outputPath">
82 <assert_contents>
83 <has_n_lines n="6"/>
84 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5" n="1"/>
85 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0" n="1"/>
86 <has_line_matching expression="reac2,1.0,0.0,1.0,1.0,2.0" n="1"/>
87 <has_line_matching expression="reac3,1.0,1.0,0.0,1.0,2.0" n="1"/>
88 <has_line_matching expression="reac4,2.0,1.0,1.0,0.0,1.0" n="1"/>
89 <has_line_matching expression="reac5,3.0,2.0,2.0,1.0,0.0" n="1"/>
90 </assert_contents>
91 </output>
92 </test>
93 <test>
94 <param name="inputPath" value="toy_model.xml"/>
95 <param name="undirected" value="true"/>
96 <param name="sideCompoundFile" value="sides.txt"/>
97 <param name="rExclude" value="rexclude.txt"/>
98 <output ftype="csv" name="outputPath">
99 <assert_contents>
100 <has_n_lines n="6"/>
101 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5" n="1"/>
102 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0" n="1"/>
103 <has_line_matching expression="reac2,1.0,0.0,1.0,2.0,3.0" n="1"/>
104 <has_line_matching expression="reac3,1.0,1.0,0.0,1.0,2.0" n="1"/>
105 <has_line_matching expression="reac4,2.0,2.0,1.0,0.0,1.0" n="1"/>
106 <has_line_matching expression="reac5,3.0,3.0,2.0,1.0,0.0" n="1"/>
107 </assert_contents>
108 </output>
109 </test>
110 <test>
111 <param name="inputPath" value="toy_model.xml"/>
112 <param name="sideCompoundFile" value="sides.txt"/>
113 <param name="rExclude" value="rexclude.txt"/>
114 <output ftype="csv" name="outputPath">
115 <assert_contents>
116 <has_n_lines n="6"/>
117 <has_line_matching expression="id,reac1,reac2,reac3,reac4,reac5" n="1"/>
118 <has_line_matching expression="reac1,0.0,1.0,1.0,2.0,3.0" n="1"/>
119 <has_line_matching expression="reac2,Infinity,0.0,1.0,2.0,3.0" n="1"/>
120 <has_line_matching expression="reac3,Infinity,Infinity,0.0,1.0,2.0" n="1"/>
121 <has_line_matching expression="reac4,Infinity,Infinity,Infinity,0.0,1.0" n="1"/>
122 <has_line_matching expression="reac5,Infinity,Infinity,Infinity,Infinity,0.0" n="1"/>
123 </assert_contents>
124 </output>
125 </test>
126 </tests>
127 <help><![CDATA[Create a reaction to reaction distance matrix.
128 The distance between two reactions is computed as the length of the shortest path connecting the two in the reaction graph, where two reactions are linked if they produce a metabolite consumed by the other or the other way around.
129 An optional edge weighting can be used, turning the distances into the sum of edge weights in the lightest path, rather than the length of the shortest path.The default weighting use target's degree squared. Alternatively, custom weighting can be provided in a file. In that case, edges without weight are ignored during path search.
130 If no edge weighting is set, it is recommended to provide a list of side compounds to ignore during network traversal.
131 @ATTRIBUTION@]]></help>
132 <citations/>
133 </tool>