|
0
|
1 <?xml version="1.0"?>
|
|
|
2 <tool id="cwpair2" name="CWPair2" version="@WRAPPER_VERSION@.0">
|
|
|
3 <description>find matched pairs and unmatched orphans</description>
|
|
|
4 <macros>
|
|
|
5 <import>cwpair2_macros.xml</import>
|
|
|
6 </macros>
|
|
|
7 <expand macro="requirements" />
|
|
|
8 <command>
|
|
|
9 <![CDATA[
|
|
|
10 python $__tool_directory__/cwpair2.py
|
|
|
11 #for $i in $input:
|
|
|
12 --input "${i}" "${i.hid}"
|
|
|
13 #end for
|
|
|
14 --method $method
|
|
|
15 --up_distance $up_distance
|
|
|
16 --down_distance $down_distance
|
|
|
17 --binsize $binsize
|
|
|
18 --threshold_format $threshold_format_cond.threshold_format
|
|
|
19 #if str($threshold_format_cond.threshold_format) == "absolute_threshold":
|
|
|
20 --absolute_threshold $threshold_format_cond.absolute_threshold
|
|
|
21 #elif str($threshold_format_cond.threshold_format) == "relative_threshold":
|
|
|
22 --relative_threshold $threshold_format_cond.relative_threshold
|
|
|
23 #end if
|
|
4
|
24 --output_files $output_files
|
|
0
|
25 --sort_score $sort_score
|
|
|
26 --statistics_output "$statistics_output"
|
|
|
27 ]]>
|
|
|
28 </command>
|
|
|
29 <inputs>
|
|
|
30 <param name="input" type="data" format="gff" multiple="True" label="Find matched pairs on" />
|
|
|
31 <param name="method" type="select" label="Method of finding a match">
|
|
|
32 <option value="mode" selected="True">Mode</option>
|
|
|
33 <option value="closest">Closest</option>
|
|
|
34 <option value="largest">Largest</option>
|
|
|
35 <option value="all">All</option>
|
|
|
36 </param>
|
|
|
37 <param name="up_distance" type="integer" value="50" min="0" label="Distance upstream from a peak to allow a pair" />
|
|
|
38 <param name="down_distance" type="integer" value="100" min="0" label="Distance downstream from a peak to allow a pair" />
|
|
|
39 <param name="binsize" type="integer" value="1" min="0" label="Width of bins for frequency plots and mode calculation" help="Value 1 implies no bins" />
|
|
|
40 <conditional name="threshold_format_cond">
|
|
|
41 <param name="threshold_format" type="select" label="Filter using">
|
|
|
42 <option value="relative_threshold" selected="True">Relative threshold</option>
|
|
|
43 <option value="absolute_threshold">Absolute threshold</option>
|
|
|
44 </param>
|
|
|
45 <when value="relative_threshold">
|
|
|
46 <param name="relative_threshold" type="float" value="0.0" min="0.0" label="Percentage of the 95 percentile value to filter below" help="Value 0 results in no filtering" />
|
|
|
47 </when>
|
|
|
48 <when value="absolute_threshold">
|
|
|
49 <param name="absolute_threshold" type="float" value="0.0" min="0.0" label="Absolute value to filter below" />
|
|
|
50 </when>
|
|
|
51 </conditional>
|
|
4
|
52 <param name="output_files" type="select" label="Restrict output to" help="Statistics will always be generated." >
|
|
|
53 <option value="simple" selected="True">matched pairs only (S)</option>
|
|
|
54 <option value="simple_orphan">matched pairs and orphans only (O,S)</option>
|
|
|
55 <option value="simple_orphan_detail">matched pairs, orphans and details only (D,O,S)</option>
|
|
|
56 <option value="all">no restrictions (output everything: C,D,F,O,P,S)</option>
|
|
|
57 </param>
|
|
0
|
58 <param name="sort_score" type="select" label="Sort output by score?">
|
|
|
59 <option value="no" selected="True">No</option>
|
|
|
60 <option value="asc">Yes, in ascending order</option>
|
|
|
61 <option value="desc">Yes, in descending order</option>
|
|
|
62 </param>
|
|
|
63 </inputs>
|
|
|
64 <outputs>
|
|
|
65 <collection name="closest_C_pdf" type="list" label="closest C: ${tool.name} on ${on_string}">
|
|
4
|
66 <filter>output_files == "all" and method in ["all", "closest"]</filter>
|
|
0
|
67 <discover_datasets pattern="(?P<designation>.*)" directory="closest_C" ext="pdf" visible="false" />
|
|
|
68 </collection>
|
|
|
69 <collection name="largest_C_pdf" type="list" label="largest C: ${tool.name} on ${on_string}">
|
|
4
|
70 <filter>output_files == "all" and method in ["all", "largest"]</filter>
|
|
0
|
71 <discover_datasets pattern="(?P<designation>.*)" directory="largest_C" ext="pdf" visible="false" />
|
|
|
72 </collection>
|
|
|
73 <collection name="mode_C_pdf" type="list" label="mode C: ${tool.name} on ${on_string}">
|
|
4
|
74 <filter>output_files == "all" and method in ["all", "mode"]</filter>
|
|
0
|
75 <discover_datasets pattern="(?P<designation>.*)" directory="mode_C" ext="pdf" visible="false" />
|
|
|
76 </collection>
|
|
|
77 <collection name="closest_D" type="list" label="closest D: ${tool.name} on ${on_string}">
|
|
4
|
78 <filter>output_files in ["all", "simple_orphan_detail"] and method in ["all", "closest"]</filter>
|
|
0
|
79 <discover_datasets pattern="(?P<designation>.*)" directory="closest_D" ext="tabular" visible="false" />
|
|
|
80 </collection>
|
|
|
81 <collection name="largest_D" type="list" label="largest D: ${tool.name} on ${on_string}">
|
|
4
|
82 <filter>output_files in ["all", "simple_orphan_detail"] and method in ["all", "largest"]</filter>
|
|
0
|
83 <discover_datasets pattern="(?P<designation>.*)" directory="largest_D" ext="tabular" visible="false" />
|
|
|
84 </collection>
|
|
|
85 <collection name="mode_D" type="list" label="mode D: ${tool.name} on ${on_string}">
|
|
4
|
86 <filter>output_files in ["all", "simple_orphan_detail"] and method in ["all", "mode"]</filter>
|
|
0
|
87 <discover_datasets pattern="(?P<designation>.*)" directory="mode_D" ext="tabular" visible="false" />
|
|
|
88 </collection>
|
|
|
89 <collection name="closest_F_pdf" type="list" label="closest F: ${tool.name} on ${on_string}">
|
|
4
|
90 <filter>output_files == "all" and method in ["all", "closest"]</filter>
|
|
0
|
91 <discover_datasets pattern="(?P<designation>.*)" directory="closest_F" ext="pdf" visible="false" />
|
|
|
92 </collection>
|
|
|
93 <collection name="largest_F_pdf" type="list" label="largest F: ${tool.name} on ${on_string}">
|
|
4
|
94 <filter>output_files == "all" and method in ["all", "largest"]</filter>
|
|
0
|
95 <discover_datasets pattern="(?P<designation>.*)" directory="largest_F" ext="pdf" visible="false" />
|
|
|
96 </collection>
|
|
|
97 <collection name="mode_F_pdf" type="list" label="mode F: ${tool.name} on ${on_string}">
|
|
4
|
98 <filter>output_files == "all" and method in ["all", "mode"]</filter>
|
|
0
|
99 <discover_datasets pattern="(?P<designation>.*)" directory="mode_F" ext="pdf" visible="false" />
|
|
|
100 </collection>
|
|
|
101 <collection name="closest_O" type="list" label="closest O: ${tool.name} on ${on_string}">
|
|
4
|
102 <filter>output_files in ["all", "simple_orphan", "simple_orphan_detail"] and method in ["all", "closest"]</filter>
|
|
0
|
103 <discover_datasets pattern="(?P<designation>.*)" directory="closest_O" ext="tabular" visible="false" />
|
|
|
104 </collection>
|
|
|
105 <collection name="largest_O" type="list" label="largest O: ${tool.name} on ${on_string}">
|
|
4
|
106 <filter>output_files in ["all", "simple_orphan", "simple_orphan_detail"] and method in ["all", "largest"]</filter>
|
|
0
|
107 <discover_datasets pattern="(?P<designation>.*)" directory="largest_O" ext="tabular" visible="false" />
|
|
|
108 </collection>
|
|
|
109 <collection name="mode_O" type="list" label="mode O: ${tool.name} on ${on_string}">
|
|
4
|
110 <filter>output_files in ["all", "simple_orphan", "simple_orphan_detail"] and method in ["all", "mode"]</filter>
|
|
0
|
111 <discover_datasets pattern="(?P<designation>.*)" directory="mode_O" ext="tabular" visible="false" />
|
|
|
112 </collection>
|
|
|
113 <collection name="closest_P_pdf" type="list" label="closest P: ${tool.name} on ${on_string}">
|
|
4
|
114 <filter>output_files == "all" and method in ["all", "closest"]</filter>
|
|
0
|
115 <discover_datasets pattern="(?P<designation>.*)" directory="closest_P" ext="pdf" visible="false" />
|
|
|
116 </collection>
|
|
|
117 <collection name="largest_P_pdf" type="list" label="largest P: ${tool.name} on ${on_string}">
|
|
4
|
118 <filter>output_files == "all" and method in ["all", "largest"]</filter>
|
|
0
|
119 <discover_datasets pattern="(?P<designation>.*)" directory="largest_P" ext="pdf" visible="false" />
|
|
|
120 </collection>
|
|
|
121 <collection name="mode_P_pdf" type="list" label="mode P: ${tool.name} on ${on_string}">
|
|
4
|
122 <filter>output_files == "all" and method in ["all", "mode"]</filter>
|
|
0
|
123 <discover_datasets pattern="(?P<designation>.*)" directory="mode_P" ext="pdf" visible="false" />
|
|
|
124 </collection>
|
|
|
125 <collection name="closest_S" type="list" label="closest S: ${tool.name} on ${on_string}">
|
|
|
126 <filter>method in ["all", "closest"]</filter>
|
|
|
127 <discover_datasets pattern="(?P<designation>.*)" directory="closest_S" ext="gff" visible="false" />
|
|
|
128 </collection>
|
|
|
129 <collection name="largest_S" type="list" label="largest S: ${tool.name} on ${on_string}">
|
|
|
130 <filter>method in ["all", "largest"]</filter>
|
|
|
131 <discover_datasets pattern="(?P<designation>.*)" directory="largest_S" ext="gff" visible="false" />
|
|
|
132 </collection>
|
|
|
133 <collection name="mode_S" type="list" label="mode S: ${tool.name} on ${on_string}">
|
|
|
134 <filter>method in ["all", "mode"]</filter>
|
|
|
135 <discover_datasets pattern="(?P<designation>.*)" directory="mode_S" ext="gff" visible="false" />
|
|
|
136 </collection>
|
|
|
137 <data name="statistics_output" format="tabular" label="Statistics: ${tool.name} on ${on_string}" />
|
|
|
138 </outputs>
|
|
|
139 <tests>
|
|
|
140 <test>
|
|
|
141 <param name="input" value="cwpair2_input1.gff" />
|
|
|
142 <param name="method" value="all" />
|
|
|
143 <param name="up_distance" value="25" />
|
|
|
144 <param name="down_distance" value="100" />
|
|
|
145 <param name="binsize" value="1" />
|
|
|
146 <param name="threshold_format" value="relative_threshold" />
|
|
|
147 <param name="relative_threshold" value="0.0" />
|
|
|
148 <param name="output_files" value="simple" />
|
|
|
149 <param name="sort_score" value="asc" />
|
|
|
150 <output_collection name="closest_S" type="list">
|
|
|
151 <element name="closest_S_data_1_f0u25d100b1" file="closest_s_output1.gff" ftype="gff" />
|
|
|
152 </output_collection>
|
|
|
153 <output_collection name="largest_S" type="list">
|
|
|
154 <element name="largest_S_data_1_f0u25d100b1" file="largest_s_output1.gff" ftype="gff" />
|
|
|
155 </output_collection>
|
|
|
156 <output_collection name="mode_S" type="list">
|
|
|
157 <element name="mode_S_data_1_f0u25d100b1" file="mode_s_output1.gff" ftype="gff" />
|
|
|
158 </output_collection>
|
|
|
159 <output name="statistics_output" file="statistics1.tabular" ftype="tabular" />
|
|
|
160 </test>
|
|
|
161 <test>
|
|
|
162 <param name="input" value="cwpair2_input1.gff" />
|
|
|
163 <param name="method" value="all" />
|
|
|
164 <param name="up_distance" value="50" />
|
|
|
165 <param name="down_distance" value="100" />
|
|
|
166 <param name="binsize" value="1" />
|
|
|
167 <param name="threshold_format" value="relative_threshold" />
|
|
|
168 <param name="relative_threshold" value="0.0" />
|
|
|
169 <param name="output_files" value="all" />
|
|
|
170 <param name="sort_score" value="no" />
|
|
|
171 <output_collection name="closest_D" type="list">
|
|
|
172 <element name="closest_D_data_1_f0u50d100b1" file="closest_d_output2.tabular" ftype="tabular" />
|
|
|
173 </output_collection>
|
|
|
174 <output_collection name="closest_F" type="list">
|
|
|
175 <element name="closest_F_data_1_f0u50d100b1" file="closest_f_output2.pdf" ftype="pdf" compare="sim_size" />
|
|
|
176 </output_collection>
|
|
|
177 <output_collection name="closest_O" type="list">
|
|
|
178 <element name="closest_O_data_1_f0u50d100b1" file="closest_o_output2.tabular" ftype="tabular" />
|
|
|
179 </output_collection>
|
|
|
180 <output_collection name="closest_S" type="list">
|
|
|
181 <element name="closest_S_data_1_f0u50d100b1" file="closest_s_output2.gff" ftype="gff" />
|
|
|
182 </output_collection>
|
|
|
183 <output_collection name="largest_D" type="list">
|
|
|
184 <element name="largest_D_data_1_f0u50d100b1" file="largest_d_output2.tabular" ftype="tabular" />
|
|
|
185 </output_collection>
|
|
|
186 <output_collection name="largest_F" type="list">
|
|
|
187 <element name="largest_F_data_1_f0u50d100b1" file="largest_f_output2.pdf" ftype="pdf" compare="sim_size" />
|
|
|
188 </output_collection>
|
|
|
189 <output_collection name="largest_O" type="list">
|
|
|
190 <element name="largest_O_data_1_f0u50d100b1" file="largest_o_output2.tabular" ftype="tabular" />
|
|
|
191 </output_collection>
|
|
|
192 <output_collection name="largest_S" type="list">
|
|
|
193 <element name="largest_S_data_1_f0u50d100b1" file="largest_s_output2.gff" ftype="gff" />
|
|
|
194 </output_collection>
|
|
|
195 <output_collection name="mode_C" type="list">
|
|
|
196 <element name="mode_C_data_1_f0u50d100b1" file="mode_c_output2.pdf" ftype="pdf" compare="sim_size" />
|
|
|
197 </output_collection>
|
|
|
198 <output_collection name="mode_D" type="list">
|
|
|
199 <element name="mode_D_data_1_f0u50d100b1" file="mode_d_output2.tabular" ftype="tabular" />
|
|
|
200 </output_collection>
|
|
|
201 <output_collection name="mode_F" type="list">
|
|
|
202 <element name="mode_F_data_1_f0u50d100b1" file="mode_f_output2.pdf" ftype="pdf" compare="sim_size" />
|
|
|
203 </output_collection>
|
|
|
204 <output_collection name="mode_O" type="list">
|
|
|
205 <element name="mode_O_data_1_f0u50d100b1" file="mode_o_output2.tabular" ftype="tabular" />
|
|
|
206 </output_collection>
|
|
|
207 <output_collection name="mode_P" type="list">
|
|
|
208 <element name="mode_P_data_1_f0u50d100b1" file="mode_p_output2.pdf" ftype="pdf" compare="sim_size" />
|
|
|
209 </output_collection>
|
|
|
210 <output_collection name="mode_S" type="list">
|
|
|
211 <element name="mode_S_data_1_f0u50d100b1" file="mode_s_output2.gff" ftype="gff" />
|
|
|
212 </output_collection>
|
|
|
213 <output name="statistics_output" file="statistics2.tabular" ftype="tabular" />
|
|
|
214 </test>
|
|
|
215 </tests>
|
|
|
216 <help>
|
|
|
217 **What it does**
|
|
|
218
|
|
|
219 Takes a list of called peaks on both strands and produces a list of matched pairs and a list of unmatched orphans
|
|
|
220 using a specified method for finding matched pairs. Methods for finding matched pairs are mode, closest, largest
|
|
|
221 or all (where the analysis is run for each method). A statistics dataset is generated and a collection of datasets
|
|
|
222 is produced for each method as follows.
|
|
|
223
|
|
4
|
224 * **closest/largest/mode C** - the stastics graph in pdf format
|
|
0
|
225 * **closest/largest/mode D** - the details in tabular format
|
|
4
|
226 * **closest/largest/mode F** - the final plots graph in pdf format
|
|
0
|
227 * **closest/largest/mode O** - the orphans in tabular format
|
|
4
|
228 * **closest/largest/mode P** - the preview plots graph in pdf format
|
|
0
|
229 * **closest/largest/mode S** - the matched pairs in gff format
|
|
|
230
|
|
4
|
231 -----
|
|
0
|
232
|
|
|
233 **Options**
|
|
|
234
|
|
|
235 * **Output files** - Restrict output dataset collections to matched pairs only or one of several combinations of collection types.
|
|
|
236 * **Method of finding match** - Method of finding matched pair, mode, closest, largest, or all (run with each method).
|
|
|
237 * **Distance upstream from a peak to allow a pair** - Distance upstream from a Watson peak to allow a Crick pair.
|
|
|
238 * **Distance downstream from a peak to allow a pair** - Distance downstream from a Watson peak to allow a Crick pair.
|
|
|
239 * **Percentage of the 95 percentile value to filter below** - Percentage of the 95 percentile value below which to filter when using a relative threshold.
|
|
|
240 * **Absolute value to filter below** - Absolute value below which to filter when using an absolute threshold.
|
|
|
241 * **Sort output by chromosomes in** - Output will be sorted by chromsome in the specified order.
|
|
|
242 * **Sort output by score?** - If yes, output will be sorted by score in the specified order.
|
|
|
243 * **Summary output format** - Format for summary output.
|
|
|
244
|
|
|
245 </help>
|
|
|
246 <expand macro="citations" />
|
|
|
247 </tool>
|