Mercurial > repos > melpetera > generic_filter
comparison GalFilter/generic_filter.xml @ 0:2c9afaf849ad draft
Uploaded
author | melpetera |
---|---|
date | Thu, 23 Feb 2017 04:39:36 -0500 |
parents | |
children | b1fa45bd2b44 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:2c9afaf849ad |
---|---|
1 <tool id="generic_filter" name="Generic_Filter" version="2016.03.03"> | |
2 <description>Removes elements according to numerical or qualitative values</description> | |
3 <command interpreter="Rscript"> | |
4 filter_wrap.R | |
5 dataMatrix_in "$dataMatrix_in" | |
6 sampleMetadata_in "$sampleMetadata_in" | |
7 variableMetadata_in "$variableMetadata_in" | |
8 | |
9 Numeric "${numeric_condition.Factors}" | |
10 #if str($numeric_condition.Factors) == 'TRUE': | |
11 #for $i in $numeric_condition.numeric_repeat: | |
12 num_file "${i.num_file}" | |
13 parm_col "${i.parm_col_num}" | |
14 Interval "${i.interval_condition.interval}" | |
15 #if str($i.interval_condition.interval) == 'lower': | |
16 low_value "${i.interval_condition.low_value}" | |
17 #elif str($i.interval_condition.interval) == 'upper': | |
18 up_value "${i.interval_condition.up_value}" | |
19 #elif str($i.interval_condition.interval) == 'between': | |
20 low_value "${i.interval_condition.low_value}" | |
21 up_value "${i.interval_condition.up_value}" | |
22 #elif str($i.interval_condition.interval) == 'extremity': | |
23 low_value "${i.interval_condition.low_value}" | |
24 up_value "${i.interval_condition.up_value}" | |
25 #end if | |
26 #end for | |
27 #end if | |
28 | |
29 Factors "${qualitative_condition.Factors}" | |
30 #if str($qualitative_condition.Factors) == 'TRUE': | |
31 #for $i in $qualitative_condition.qualitative_repeat: | |
32 qual_file "${i.qual_file}" | |
33 factor_col "${i.factor_col}" | |
34 factors_value "${i.factors_value}" | |
35 #end for | |
36 #end if | |
37 | |
38 dataMatrix_out "$dataMatrix_out" | |
39 sampleMetadata_out "$sampleMetadata_out" | |
40 variableMetadata_out "$variableMetadata_out" | |
41 </command> | |
42 | |
43 <inputs> | |
44 <param name="dataMatrix_in" type="data" label="Data Matrix file" help="" format="tabular" /> | |
45 <param name="sampleMetadata_in" type="data" label="Sample metadata file" help="" format="tabular" /> | |
46 <param name="variableMetadata_in" type="data" label="Variable metadata file" help="" format="tabular" /> | |
47 | |
48 <conditional name="numeric_condition"> | |
49 <param name="Factors" type="select" label="Deleting samples and/or variables according to Numerical values" help=""> | |
50 <option value="FALSE">no</option> | |
51 <option value="TRUE">yes</option> | |
52 </param> | |
53 <when value="TRUE"> | |
54 <repeat name="numeric_repeat" title="Identify the parameter to filter " min="1"> | |
55 <param name="num_file" label="On file" type="select" display="radio" help=""> | |
56 <option value="sample">Sample metadata</option> | |
57 <option value="variable">Variable metadata</option> | |
58 </param> | |
59 <param name="parm_col_num" label="Name of the column to filter" type="text" value="" help="" /> | |
60 <conditional name="interval_condition"> | |
61 <param name="interval" type="select" label="Interval of values to remove" help=""> | |
62 <option value="lower">lower</option> | |
63 <option value="upper">upper</option> | |
64 <option value="between">between</option> | |
65 <option value="extremity">extremity</option> | |
66 </param> | |
67 <when value="lower"> | |
68 <param name="low_value" type="float" label="Remove all values lower than" optional="true" value="0" help=""/> | |
69 </when> | |
70 <when value="upper"> | |
71 <param name="up_value" type="float" label="Remove all values upper than" optional="true" value="0" help=""/> | |
72 </when> | |
73 <when value="between"> | |
74 <param name="low_value" type="float" label="Remove all values between" optional="true" value="0" help=""/> | |
75 <param name="up_value" type="float" label="And" optional="true" value="1" help=""/> | |
76 </when> | |
77 <when value="extremity"> | |
78 <param name="low_value" type="float" label="Remove all values lower than" optional="true" value="0" help=""/> | |
79 <param name="up_value" type="float" label="And upper than" optional="true" value="1" help=""/> | |
80 </when> | |
81 </conditional> | |
82 </repeat> | |
83 </when> | |
84 <when value="FALSE"> | |
85 </when> | |
86 </conditional> | |
87 | |
88 <conditional name="qualitative_condition"> | |
89 <param name="Factors" type="select" label="Deleting samples and/or variables according to Qualitative values" help=""> | |
90 <option value="FALSE">no</option> | |
91 <option value="TRUE">yes</option> | |
92 </param> | |
93 <when value="TRUE"> | |
94 <repeat name="qualitative_repeat" title="Removing a level in factor" min="1"> | |
95 <param name="qual_file" label="On file" type="select" display="radio" help=""> | |
96 <option value="sample">Sample metadata</option> | |
97 <option value="variable">Variable metadata</option> | |
98 </param> | |
99 <param name="factor_col" label="Name of the column to filter" type="text" value="" help="" /> | |
100 <param name="factors_value" type="text" label="Remove factor when" help="" value="" /> | |
101 </repeat> | |
102 </when> | |
103 <when value="FALSE"> | |
104 </when> | |
105 </conditional> | |
106 </inputs> | |
107 | |
108 <outputs> | |
109 <data name="dataMatrix_out" label="${tool.name}_${dataMatrix_in.name}" format="tabular" ></data> | |
110 <data name="sampleMetadata_out" label="${tool.name}_${sampleMetadata_in.name}" format="tabular" ></data> | |
111 <data name="variableMetadata_out" label="${tool.name}_${variableMetadata_in.name}" format="tabular" ></data> | |
112 </outputs> | |
113 | |
114 <help> | |
115 | |
116 .. class:: infomark | |
117 | |
118 **Authors** Marion Landi and Melanie Petera | |
119 | |
120 --------------------------------------------------- | |
121 | |
122 ============== | |
123 Generic_Filter | |
124 ============== | |
125 | |
126 ----------- | |
127 Description | |
128 ----------- | |
129 | |
130 | Allows to remove all samples and/or variables corresponding to specific values regarding designated factors or numerical variables. | |
131 | | |
132 | |
133 | |
134 ----------------- | |
135 Workflow position | |
136 ----------------- | |
137 | |
138 | |
139 .. image:: filter.png | |
140 :width: 800 | |
141 | |
142 | |
143 | |
144 ----------- | |
145 Input files | |
146 ----------- | |
147 | |
148 +----------------------------+------------+ | |
149 | Parameter : num + label | Format | | |
150 +============================+============+ | |
151 | 1 : Data Matrix file | tabular | | |
152 +----------------------------+------------+ | |
153 | 2 : Sample metadata file | tabular | | |
154 +----------------------------+------------+ | |
155 | 3 : Variable metadata file | tabular | | |
156 +----------------------------+------------+ | |
157 | |
158 | | |
159 | Missing values in numerical columns of data must be coded NA if you want to use the Numerical filter on them. | |
160 | |
161 | |
162 ---------- | |
163 Parameters | |
164 ---------- | |
165 | |
166 Deleting samples and/or variables according to Numerical values: | |
167 | If 'yes' (not default): execution deletes all samples or variables (according to selection) for which the designated | |
168 | numerical parameter ("Name of the column to remove" field) equals the selected range of values (depending on the "Interval of values to remove" chosen). | |
169 | To delete multiple independent intervals of value from the same parameter, it is necessary to add as many times as necessary | |
170 | the corresponding column via the button "Add new Identify the parameter to filter". | |
171 | |
172 | *On file (only if 'yes')* | |
173 | Choice between sample and variable filtering (referring to the input file containing the factor). | |
174 | | |
175 | |
176 | *Name of the column to filter (only if 'yes')* | |
177 | Column name of the numerical parameter from which we want to remove a range of values. | |
178 | | |
179 | |
180 | *Interval of values to remove (only if 'yes')* | |
181 | Allows to choose which type of interval should be removed: | |
182 | - lower: removes all values below a specified value | |
183 | - upper: removes all values above a specified value | |
184 | - between: removes all values both greater than a specified value and lower than another (upper) one | |
185 | - extremity: removes all values that are either lower than a specified value or greater than another (upper) one | |
186 | | |
187 | |
188 | *'Remove all values' + interval chosen (only if 'yes')* | |
189 | Numerical value(s) used as threshold, depending on the type of interval chosen above. | |
190 | Only one value for 'lower' and 'upper'; two values for 'between' and 'extremity'. | |
191 | | |
192 | |
193 | *Notes:* | |
194 | - these parameters can be used several times using the "Add new Identify the parameter to filter" button | |
195 | - Numerical filter does not remove NA values; if you want to suppress them, use the Qualitative filter below | |
196 | | |
197 | |
198 | |
199 Deleting samples and/or variables according to Qualitative values | |
200 | If 'yes' (not default): execution deletes all data samples or variables (according to selection) for which the designated | |
201 | factor ("Name of the column to remove" field) equals the selected level ("Remove factor when" field). | |
202 | To delete multiple values of the same factor, it is necessary to add as many times as necessary the corresponding factor | |
203 | via the button "Add new Removing a level in factor". | |
204 | |
205 | *On file (only if 'yes')* | |
206 | Choice between sample and variable filtering (referring to the input file containing the factor). | |
207 | | |
208 | |
209 | *Name of the column to filter (only if 'yes')* | |
210 | Column name of the factor from which we want to remove a level. | |
211 | | |
212 | |
213 | *Remove factor when (only if 'yes')* | |
214 | Value that you want to delete from the selected column. | |
215 | Each line with that value of designated factor will be deleted. | |
216 | | |
217 | |
218 | *Notes:* | |
219 | - these parameters can be used several times using the "Add new Removing a level in factor" button | |
220 | - this filter can be used to filter NA in numerical parameters, or to remove a specific numerical value | |
221 | | |
222 | |
223 | |
224 ------------ | |
225 Output files | |
226 ------------ | |
227 | |
228 | |
229 dataMatrix | |
230 | tabular output | |
231 | Identical to the input Data Matrix file with the sample columns and variable lines deleted according to specified filters | |
232 | | |
233 | |
234 sampleMetadata | |
235 | tabular output | |
236 | Identical to the input Sample metadata file with the sample lines deleted according to specified filters | |
237 | | |
238 | |
239 variableMetadata | |
240 | tabular output | |
241 | Identical to the input Variable metadata file with the variable lines deleted according to specified filters | |
242 | | |
243 | |
244 | |
245 --------------------------------------------------- | |
246 | |
247 --------------- | |
248 Working example | |
249 --------------- | |
250 | |
251 | |
252 .. class:: warningmark | |
253 | |
254 Soon see the corresponding "Page" | |
255 | |
256 </help> | |
257 </tool> |