Mercurial > repos > galaxyp > msi_filtering
comparison msi_filtering.xml @ 1:98c101b19f3c draft
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 06c2b45d8644b1d7fc01622a5c59dcbf8886d0f1
author | galaxyp |
---|---|
date | Mon, 23 Apr 2018 17:18:35 -0400 |
parents | f17d3f1a065f |
children | 22db5eb94e50 |
comparison
equal
deleted
inserted
replaced
0:f17d3f1a065f | 1:98c101b19f3c |
---|---|
1 <tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.7.0"> | 1 <tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.7.0.1"> |
2 <description>tool for filtering mass spectrometry imaging data</description> | 2 <description>tool for filtering mass spectrometry imaging data</description> |
3 <requirements> | 3 <requirements> |
4 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement> | 4 <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement> |
5 <requirement type="package" version="2.2.1">r-gridextra</requirement> | 5 <requirement type="package" version="2.2.1">r-gridextra</requirement> |
6 </requirements> | 6 </requirements> |
43 load('infile.RData') | 43 load('infile.RData') |
44 #end if | 44 #end if |
45 | 45 |
46 ###################################### inputfile properties in numbers ###################### | 46 ###################################### inputfile properties in numbers ###################### |
47 | 47 |
48 #if $outputs.outputs_select == "quality_control" | 48 #if $outputs.outputs_select == "quality_control": |
49 ## Number of features (mz) | 49 ## Number of features (mz) |
50 maxfeatures = length(features(msidata)) | 50 maxfeatures = length(features(msidata)) |
51 ## Range mz | 51 ## Range mz |
52 minmz = round(min(mz(msidata)), digits=2) | 52 minmz = round(min(mz(msidata)), digits=2) |
53 maxmz = round(max(mz(msidata)), digits=2) | 53 maxmz = round(max(mz(msidata)), digits=2) |
74 featuresinfile = mz(msidata) | 74 featuresinfile = mz(msidata) |
75 #end if | 75 #end if |
76 | 76 |
77 | 77 |
78 ###################################### filtering of pixels ###################### | 78 ###################################### filtering of pixels ###################### |
79 #if $inputpixels: | 79 |
80 input_list = read.delim("$inputpixels", header = FALSE, | 80 #if str($pixels_cond.pixel_filtering) == "single_column": |
81 na.strings=c("","NA", "#NUM!", "#ZAHL!"), stringsAsFactors = FALSE) | 81 print("single column") |
82 validpixels = input_list[,$pixel_column] %in% names(pixels(msidata)) | 82 |
83 | 83 #if $pixels_cond.single_pixels: |
84 if (validpixels != 0) | 84 input_list = read.delim("$pixels_cond.single_pixels", header = FALSE, stringsAsFactors = FALSE) |
85 numberpixels = length(input_list[,$pixels_cond.pixel_column]) | |
86 valid_entries = input_list[,$pixels_cond.pixel_column] %in% names(pixels(msidata)) | |
87 validpixels = sum(valid_entries) | |
88 | |
89 if (validpixels != 0) | |
90 { | |
91 pixelsofinterest = pixels(msidata)[names(pixels(msidata)) %in% input_list[valid_entries,$pixels_cond.pixel_column]] | |
92 msidata = msidata[,pixelsofinterest] | |
93 }else{ | |
94 validpixels=0 | |
95 } | |
96 | |
97 #else | |
98 validpixels=0 | |
99 numberpixels = 0 | |
100 #end if | |
101 | |
102 #elif str($pixels_cond.pixel_filtering) == "two_columns": | |
103 print("two columns") | |
104 | |
105 #if $pixels_cond.two_columns_pixel: | |
106 | |
107 input_list = read.delim("$pixels_cond.two_columns_pixel", header = FALSE, | |
108 stringsAsFactors = FALSE) | |
109 numberpixels = length(input_list[,$pixels_cond.pixel_column_x]) | |
110 | |
111 inputpixel_x = input_list[,$pixels_cond.pixel_column_x] | |
112 inputpixel_y = input_list[,$pixels_cond.pixel_column_y] | |
113 | |
114 inputpixels = cbind(inputpixel_x, inputpixel_y) | |
115 colnames(inputpixels) = c("x", "y") | |
116 valid_rows = merge(inputpixels, coord(msidata)[,1:2]) | |
117 validpixels = nrow(valid_rows) | |
118 | |
119 if (validpixels != 0) | |
85 { | 120 { |
86 pixelsofinterest = pixels(msidata)[names(pixels(msidata)) %in% input_list[validpixels,$pixel_column]] | 121 |
122 pixelvector = character() | |
123 | |
124 for (pixel in 1:nrow(valid_rows)) | |
125 { | |
126 pixelvector[pixel] = paste0("x = ", valid_rows[pixel,1],", ", "y = ", valid_rows[pixel,2]) | |
127 } | |
128 | |
129 pixelsofinterest= pixels(msidata)[names(pixels(msidata)) %in% pixelvector] | |
87 msidata = msidata[,pixelsofinterest] | 130 msidata = msidata[,pixelsofinterest] |
88 numberpixels = length(input_list[,$pixel_column]) | 131 }else{ |
89 }else { | 132 validpixels=0 |
90 numberpixels = 0 | |
91 } | 133 } |
92 | 134 |
93 | 135 |
94 #else | 136 #else |
95 input_list = data.frame(0, 0) | 137 validpixels=0 |
96 validpixels=0 | 138 numberpixels = 0 |
139 #end if | |
140 | |
141 #elif str($pixels_cond.pixel_filtering) == "pixel_range": | |
142 print("pixel range") | |
143 | |
144 numberpixels = "range" | |
145 validpixels = "range" | |
146 | |
147 if (sum(coord(msidata)\$x <= $pixels_cond.max_x_range & coord(msidata)\$x >= $pixels_cond.min_x_range) > 0) | |
148 { | |
149 msidata = msidata[, coord(msidata)\$x <= $pixels_cond.max_x_range & coord(msidata)\$x >= $pixels_cond.min_x_range] | |
150 } | |
151 | |
152 if (sum(coord(msidata)\$y <= $pixels_cond.max_y_range & coord(msidata)\$y >= $pixels_cond.min_y_range) > 0) | |
153 { | |
154 msidata = msidata[, coord(msidata)\$y <= $pixels_cond.max_y_range & coord(msidata)\$y >= $pixels_cond.min_y_range] | |
155 } | |
156 | |
157 | |
158 | |
159 #elif str($pixels_cond.pixel_filtering) == "none": | |
160 print("no pixel filtering") | |
97 numberpixels = 0 | 161 numberpixels = 0 |
162 validpixels = 0 | |
163 | |
98 #end if | 164 #end if |
99 | 165 |
100 | 166 |
101 | 167 |
102 ###################################### filtering of features ###################### | 168 ###################################### filtering of features ###################### |
103 | 169 |
104 #if $inputfeatures: | 170 #if str($features_cond.features_filtering) == "features_list": |
105 input_features = read.delim("$inputfeatures", header = FALSE, | 171 |
106 na.strings=c("","NA", "#NUM!", "#ZAHL!"), stringsAsFactors = FALSE) | 172 print("feature list") |
107 validfeatures = input_features[,$feature_column] %in% names(features(msidata)) | 173 |
108 | 174 input_features = read.delim("$inputfeatures", header = FALSE, stringsAsFactors = FALSE) |
109 if (validfeatures != 0) | 175 |
176 startingrow = $features_cond.feature_header+1 | |
177 extracted_features = input_features[startingrow:nrow(input_features),$features_cond.feature_column] | |
178 numberfeatures = length(extracted_features) | |
179 | |
180 | |
181 if (grepl("m/z = ", input_features[startingrow,$features_cond.feature_column])==FALSE) | |
182 | |
183 { print("no m/z = in data") | |
184 | |
185 if (class(extracted_features) == "numeric") | |
110 { | 186 { |
111 featuresofinterest = features(msidata)[names(features(msidata)) %in% input_features[validfeatures,$feature_column]] | 187 charactervector = rep("m/z = ", numberfeatures) |
112 msidata = msidata[featuresofinterest,] | 188 mz_added = paste0(charactervector, round(extracted_features,digits=2)) |
113 numberfeatures = length(input_features[,$feature_column]) | 189 validfeatures = mz_added %in% names(features(msidata)) |
114 } else { | 190 featuresofinterest = features(msidata)[names(features(msidata)) %in% mz_added[validfeatures]] |
115 numberfeatures = 0 | 191 }else{ |
192 validfeatures = 0 | |
193 featuresofinterest = features(msidata) | |
116 } | 194 } |
117 | 195 }else{ |
118 | 196 validfeatures = extracted_features %in% names(features(msidata)) |
119 #else | 197 featuresofinterest = features(msidata)[names(features(msidata)) %in% extracted_features[validfeatures]] |
120 input_features = data.frame(0, 0) | 198 } |
199 | |
200 msidata = msidata[featuresofinterest,] | |
201 | |
202 | |
203 | |
204 #elif str($features_cond.features_filtering) == "features_range": | |
205 | |
206 print("feature range") | |
207 | |
208 numberfeatures = "range" | |
209 validfeatures = NA | |
210 | |
211 if (sum(mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz)> 0) | |
212 { | |
213 msidata = msidata[mz(msidata) >= $features_cond.min_mz & mz(msidata) <= $features_cond.max_mz,] | |
214 } | |
215 | |
216 | |
217 #elif str($features_cond.features_filtering) == "none": | |
218 | |
219 print("no feature filtering") | |
121 validfeatures = 0 | 220 validfeatures = 0 |
122 numberfeatures = 0 | 221 numberfeatures = 0 |
123 #end if | 222 #end if |
124 | 223 |
125 | 224 |
126 | 225 |
127 | |
128 | |
129 | |
130 # save msidata as Rfile | 226 # save msidata as Rfile |
131 save(msidata, file="$msidata_filtered") | 227 save(msidata, file="$msidata_filtered") |
132 | 228 |
133 ###################################### outputfile properties in numbers ###################### | 229 ###################################### outputfile properties in numbers ###################### |
134 | 230 |
135 #if $outputs.outputs_select == "quality_control" | 231 #if $outputs.outputs_select == "quality_control": |
136 | 232 |
137 ## Number of features (mz) | 233 ## Number of features (mz) |
138 maxfeatures2 = length(features(msidata)) | 234 maxfeatures2 = length(features(msidata)) |
139 ## Range mz | 235 ## Range mz |
140 minmz2 = round(min(mz(msidata)), digits=2) | 236 minmz2 = round(min(mz(msidata)), digits=2) |
166 "Range of x coordinates", | 262 "Range of x coordinates", |
167 "Range of y coordinates", | 263 "Range of y coordinates", |
168 "Intensities > 0", | 264 "Intensities > 0", |
169 "Median TIC per pixel", | 265 "Median TIC per pixel", |
170 "Number of zero TICs", | 266 "Number of zero TICs", |
171 paste0("# pixels in ", "$inputpixels.display_name"), | 267 "pixel overview", |
172 paste0("# mz in ", "$inputfeatures.display_name")) | 268 "feature overview") |
173 | 269 |
174 before = c(paste0(maxfeatures), | 270 before = c(paste0(maxfeatures), |
175 paste0(minmz, " - ", maxmz), | 271 paste0(minmz, " - ", maxmz), |
176 paste0(pixelcount), | 272 paste0(pixelcount), |
177 paste0(minimumx, " - ", maximumx), | 273 paste0(minimumx, " - ", maximumx), |
188 paste0(minimumx2, " - ", maximumx2), | 284 paste0(minimumx2, " - ", maximumx2), |
189 paste0(minimumy2, " - ", maximumy2), | 285 paste0(minimumy2, " - ", maximumy2), |
190 paste0(percpeaks2, " %"), | 286 paste0(percpeaks2, " %"), |
191 paste0(medint2), | 287 paste0(medint2), |
192 paste0(NumemptyTIC2), | 288 paste0(NumemptyTIC2), |
193 paste0("valid pixels: ", sum(validpixels)), | 289 paste0("valid pixels: ", validpixels), |
194 paste0("valid mz: ", sum(validfeatures))) | 290 paste0("valid mz: ", sum(validfeatures))) |
195 | 291 |
196 | 292 |
197 property_df = data.frame(properties, before, filtered) | 293 property_df = data.frame(properties, before, filtered) |
198 | 294 |
199 | 295 |
200 | 296 |
201 ######################################## PDF QC ############################################# | 297 ######################################## PDF QC ############################################# |
202 | |
203 | 298 |
204 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) | 299 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) |
205 plot(0,type='n',axes=FALSE,ann=FALSE) | 300 plot(0,type='n',axes=FALSE,ann=FALSE) |
206 | 301 |
207 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.display_name")) | 302 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.display_name")) |
208 | 303 |
209 | 304 |
305 | |
210 grid.table(property_df, rows= NULL) | 306 grid.table(property_df, rows= NULL) |
211 | 307 |
212 | |
213 ### heatmap image as visual pixel control | 308 ### heatmap image as visual pixel control |
309 | |
310 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0) | |
311 { | |
214 | 312 |
215 | 313 |
216 image(msidata, mz=$outputs.inputmz, plusminus = $outputs.plusminus_dalton, contrast.enhance = "none", | 314 image(msidata, mz=$outputs.inputmz, plusminus = $outputs.plusminus_dalton, contrast.enhance = "none", |
217 main= paste0($outputs.inputmz," ± ", $outputs.plusminus_dalton, " Da"), ylim = c(maximumy2+0.2*maximumy2,minimumy2-0.2*minimumy2)) | 315 main= paste0($outputs.inputmz," ± ", $outputs.plusminus_dalton, " Da"), ylim = c(maximumy2+0.2*maximumy2,minimumy2-0.2*minimumy2)) |
218 | 316 |
219 ### control features which are left | 317 ### control features which are left |
220 | 318 |
221 par(mfrow = c(2,1)) | 319 plot(featuresinfile, rep(1,length(featuresinfile)), yaxt="n", ylab=NA, xlab="m/z values", col="red", ylim=c(0.8, 1.1), main="Distribution of m/z values") |
222 plot(featuresinfile, ylab = "m/z in Dalton", xlab = "feature index") | 320 lines(mz(msidata),rep(0.9, length(mz(msidata))), col="green", type="p") |
223 plot(mz(msidata), ylab = "m/z in Dalton", xlab = "feature index") | 321 legend("top", horiz=TRUE, |
224 | 322 legend = c("before", "filtered"), |
323 fill = c("red", "green")) | |
324 | |
325 | |
326 | |
327 | |
328 }else{ | |
329 print("file has no features or pixels left") | |
330 } | |
225 | 331 |
226 dev.off() | 332 dev.off() |
227 | 333 |
228 #end if | 334 #end if |
229 | 335 |
249 ]]></configfile> | 355 ]]></configfile> |
250 </configfiles> | 356 </configfiles> |
251 <inputs> | 357 <inputs> |
252 <param name="infile" type="data" format="imzml, rdata, analyze75" | 358 <param name="infile" type="data" format="imzml, rdata, analyze75" |
253 label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" | 359 label="Inputfile as imzML, Analyze7.5 or Cardinal MSImageSet saved as RData" |
254 help="Upload composite datatype imzml (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> | 360 help="Upload composite datatype imzML (ibd+imzML) or analyze75 (hdr+img+t2m) or regular upload .RData (Cardinal MSImageSet)"/> |
255 <param name="inputpixels" type="data" optional="true" format="tabular" label="pixels for filtering of MSI data" | 361 |
256 help="tabular file with pixels of interest in the form x = 1, y = 1"/> | 362 <conditional name="pixels_cond"> |
257 <param name="pixel_column" data_ref="inputpixels" optional="true" label="Column with pixels" type="data_column" /> | 363 <param name="pixel_filtering" type="select" label="Select pixel filtering option"> |
258 <param name="inputfeatures" type="data" optional="true" format="tabular" label="features for filtering of MSI data" | 364 <option value="none" selected="True">none</option> |
259 help="tabular file with masses of interest in the form mz = 800.05"/> | 365 <option value="single_column">tabular file with single column (x = 1, y = 1)</option> |
260 <param name="feature_column" data_ref="inputfeatures" optional="true" label="Column with features" type="data_column" /> | 366 <option value="two_columns">tabular file with separate columns for x and y values</option> |
367 <option value="pixel_range">ranges for x and y</option> | |
368 </param> | |
369 <when value="none"/> | |
370 <when value="single_column"> | |
371 <param name="single_pixels" type="data" format="tabular" label="Pixels in single column for filtering of MSI data" | |
372 help="tabular file with pixels of interest in the form x = 1, y = 1"/> | |
373 <param name="pixel_column" data_ref="single_pixels" label="Column with pixels" type="data_column"/> | |
374 </when> | |
375 <when value="two_columns"> | |
376 <param name="two_columns_pixel" type="data" format="tabular" label="Pixels in two columns for filtering of MSI data" | |
377 help="tabular file with pixels of interest in two separate columns"/> | |
378 <param name="pixel_column_x" data_ref="two_columns_pixel" label="Column with x values" type="data_column"/> | |
379 <param name="pixel_column_y" data_ref="two_columns_pixel" label="Column with y values" type="data_column"/> | |
380 </when> | |
381 <when value="pixel_range"> | |
382 <param name="min_x_range" type="integer" value="0" label="Minimum value for x"/> | |
383 <param name="max_x_range" type="integer" value="100" label="Maximum value for x"/> | |
384 <param name="min_y_range" type="integer" value="0" label="Minimum value for y"/> | |
385 <param name="max_y_range" type="integer" value="100" label="Maximum value for y"/> | |
386 </when> | |
387 </conditional> | |
388 | |
389 <conditional name="features_cond"> | |
390 <param name="features_filtering" type="select" label="Select feature filtering option"> | |
391 <option value="none" selected="True">none</option> | |
392 <option value="features_list">tabular file with features (data type: 800.12 or m/z = 800.12)</option> | |
393 <option value="features_range">range of features</option> | |
394 </param> | |
395 | |
396 <when value="none"/> | |
397 <when value="features_list"> | |
398 <param name="inputfeatures" type="data" format="tabular" label="Features for filtering of MSI data" help="tabular file with masses of interest either as numbers (800.05) or in the form m/z = 800.05"/> | |
399 <param name="feature_column" data_ref="inputfeatures" label="Column with features" type="data_column"/> | |
400 <param name="feature_header" label="Number of header lines to skip" value="0" type="integer"/> | |
401 </when> | |
402 <when value="features_range"> | |
403 <param name="min_mz" type="integer" value="1" label="Minimum value for mz (in Dalton)"/> | |
404 <param name="max_mz" type="integer" value="100" label="Maximum value for mz (in Dalton)"/> | |
405 </when> | |
406 </conditional> | |
261 | 407 |
262 <conditional name="outputs"> | 408 <conditional name="outputs"> |
263 <param name="outputs_select" type="select" label="Quality control output"> | 409 <param name="outputs_select" type="select" label="Quality control output"> |
264 <option value="quality_control" selected="True">yes</option> | 410 <option value="quality_control" selected="True">yes</option> |
265 <option value="no_quality_control" >no</option> | 411 <option value="no_quality_control">no</option> |
266 </param> | 412 </param> |
267 <when value="quality_control"> | 413 <when value="quality_control"> |
268 <param name="inputmz" type="float" value="1296.7" label="Mass for which a heatmap image will be drawn" help="Use a mass which is still present in all pixels to control if the pixel filtering went well"/> | 414 <param name="inputmz" type="float" value="1296.7" label="Mass for which a heatmap image will be drawn" help="Use a mass which is still present in all pixels to control if the pixel filtering went well"/> |
269 <param name="plusminus_dalton" value="0.25" type="float" label="mass range for mz value" help="plusminus mass window in Dalton"/> | 415 <param name="plusminus_dalton" value="0.25" type="float" label="mass range for mz value" help="plusminus mass window in Dalton"/> |
270 </when> | 416 </when> |
417 <when value="no_quality_control"/> | |
271 </conditional> | 418 </conditional> |
272 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/> | 419 <param name="output_matrix" type="boolean" display="radio" label="Intensity matrix output"/> |
273 </inputs> | 420 </inputs> |
274 <outputs> | 421 <outputs> |
275 <data format="rdata" name="msidata_filtered" label="${tool.name} on $infile.display_name"/> | 422 <data format="rdata" name="msidata_filtered" label="${tool.name} ${on_string}"/> |
276 <data format="pdf" name="filtering_qc" from_work_dir="filtertool_QC.pdf" label = "QC ${tool.name} on $infile.display_name"> | 423 <data format="pdf" name="filtering_qc" from_work_dir="filtertool_QC.pdf" label = "QC ${tool.name} ${on_string}"> |
277 <filter>outputs["outputs_select"] == "quality_control"</filter> | 424 <filter>outputs["outputs_select"] == "quality_control"</filter> |
278 </data> | 425 </data> |
279 <data format="tabular" name="matrixasoutput" label="matrix ${tool.name} on $infile.display_name"> | 426 <data format="tabular" name="matrixasoutput" label="Matrix ${tool.name} on ${on_string}"> |
280 <filter>output_matrix</filter> | 427 <filter>output_matrix</filter> |
281 </data> | 428 </data> |
282 </outputs> | 429 </outputs> |
283 | 430 |
284 <tests> | 431 <tests> |
285 <test expect_num_outputs="2"> | 432 <test expect_num_outputs="2"> |
286 <param name="infile" value="" ftype="imzml"> | 433 <param name="infile" value="" ftype="imzml"> |
287 <composite_data value="Example_Continuous.imzML"/> | 434 <composite_data value="Example_Continuous.imzML"/> |
288 <composite_data value="Example_Continuous.ibd"/> | 435 <composite_data value="Example_Continuous.ibd"/> |
289 </param> | 436 </param> |
290 <param name="inputpixels" ftype="tabular" value = "inputpixels.tabular"/> | 437 <param name="pixel_filtering" value="single_column"/> |
438 <param name="single_pixels" ftype="tabular" value = "inputpixels.tabular"/> | |
291 <param name="pixel_column" value="1"/> | 439 <param name="pixel_column" value="1"/> |
440 <param name="features_filtering" value="features_list"/> | |
292 <param name="inputfeatures" ftype="tabular" value = "inputfeatures.tabular"/> | 441 <param name="inputfeatures" ftype="tabular" value = "inputfeatures.tabular"/> |
293 <param name="feature_column" value="2"/> | 442 <param name="feature_column" value="2"/> |
294 | 443 <param name="feature_header" value="1"/> |
295 <conditional name="outputs"> | 444 <param name="outputs_select" value="quality_control"/> |
296 <param name="outputs_select" value="quality_control"/> | 445 <param name="inputmz" value="328.9"/> |
297 <param name="inputmz" value="328.9"/> | 446 <param name="plusminus_dalton" value="0.25"/> |
298 <param name="plusminus_dalton" value="0.25"/> | |
299 </conditional> | |
300 <output name="filtering_qc" file="imzml_filtered.pdf" compare="sim_size" delta="20000"/> | 447 <output name="filtering_qc" file="imzml_filtered.pdf" compare="sim_size" delta="20000"/> |
301 <output name="msidata_filtered" file="imzml_filtered.RData" compare="sim_size" /> | 448 <output name="msidata_filtered" file="imzml_filtered.RData" compare="sim_size" /> |
449 </test> | |
450 <test expect_num_outputs="2"> | |
451 <param name="infile" value="" ftype="imzml"> | |
452 <composite_data value="Example_Continuous.imzML"/> | |
453 <composite_data value="Example_Continuous.ibd"/> | |
454 </param> | |
455 <param name="pixel_filtering" value="pixel_range"/> | |
456 <param name="min_x_range" value="0"/> | |
457 <param name="max_x_range" value="10"/> | |
458 <param name="min_y_range" value="2"/> | |
459 <param name="max_y_range" value="2"/> | |
460 <param name="outputs_select" value="quality_control"/> | |
461 <param name="inputmz" value="328.9"/> | |
462 <param name="plusminus_dalton" value="0.25"/> | |
463 <output name="filtering_qc" file="imzml_filtered2.pdf" compare="sim_size" delta="20000"/> | |
464 <output name="msidata_filtered" file="imzml_filtered2.RData" compare="sim_size" /> | |
465 </test> | |
466 <test expect_num_outputs="3"> | |
467 <param name="infile" value="" ftype="imzml"> | |
468 <composite_data value="Example_Continuous.imzML"/> | |
469 <composite_data value="Example_Continuous.ibd"/> | |
470 </param> | |
471 <param name="pixel_filtering" value="pixel_range"/> | |
472 <param name="min_x_range" value="0"/> | |
473 <param name="max_x_range" value="10"/> | |
474 <param name="min_y_range" value="2"/> | |
475 <param name="max_y_range" value="2"/> | |
476 <param name="features_filtering" value="features_range"/> | |
477 <param name="min_mz" value="200" /> | |
478 <param name="max_mz" value="500"/> | |
479 <param name="outputs_select" value="quality_control"/> | |
480 <param name="inputmz" value="328.9"/> | |
481 <param name="plusminus_dalton" value="0.25"/> | |
482 <param name="output_matrix" value="True"/> | |
483 <output name="filtering_qc" file="imzml_filtered3.pdf" compare="sim_size" delta="20000"/> | |
484 <output name="msidata_filtered" file="imzml_filtered3.RData" compare="sim_size" /> | |
485 <output name="matrixasoutput" file="imzml_matrix3.tabular"/> | |
486 </test> | |
487 <test expect_num_outputs="2"> | |
488 <param name="infile" value="" ftype="imzml"> | |
489 <composite_data value="Example_Continuous.imzML"/> | |
490 <composite_data value="Example_Continuous.ibd"/> | |
491 </param> | |
492 <param name="pixel_filtering" value="two_columns"/> | |
493 <param name="two_columns_pixel" ftype="tabular" value = "inputpixels_2column.tabular"/> | |
494 <param name="pixel_column_x" value="1"/> | |
495 <param name="pixel_column_y" value="3"/> | |
496 <param name="features_filtering" value="features_list"/> | |
497 <param name="inputfeatures" ftype="tabular" value = "inputcalibrantfile2.txt"/> | |
498 <param name="feature_column" value="1"/> | |
499 <param name="feature_header" value="0"/> | |
500 <param name="outputs_select" value="quality_control"/> | |
501 <param name="inputmz" value="328.9"/> | |
502 <param name="plusminus_dalton" value="0.25"/> | |
503 <output name="filtering_qc" file="imzml_filtered4.pdf" compare="sim_size" delta="20000"/> | |
504 <output name="msidata_filtered" file="imzml_filtered4.RData" compare="sim_size" /> | |
505 </test> | |
506 <test expect_num_outputs="2"> | |
507 <param name="infile" value="" ftype="imzml"> | |
508 <composite_data value="Example_Continuous.imzML"/> | |
509 <composite_data value="Example_Continuous.ibd"/> | |
510 </param> | |
511 <param name="pixel_filtering" value="pixel_range"/> | |
512 <param name="min_x_range" value="0"/> | |
513 <param name="max_x_range" value="10"/> | |
514 <param name="min_y_range" value="2"/> | |
515 <param name="max_y_range" value="20"/> | |
516 <param name="features_filtering" value="features_range"/> | |
517 <param name="min_mz" value="1" /> | |
518 <param name="max_mz" value="150"/> | |
519 <param name="outputs_select" value="quality_control"/> | |
520 <param name="inputmz" value="328.9"/> | |
521 <param name="plusminus_dalton" value="0.25"/> | |
522 <output name="filtering_qc" file="imzml_filtered5.pdf" compare="sim_size" delta="20000"/> | |
523 <output name="msidata_filtered" file="imzml_filtered5.RData" compare="sim_size" /> | |
302 </test> | 524 </test> |
303 <test expect_num_outputs="3"> | 525 <test expect_num_outputs="3"> |
304 <param name="infile" value="" ftype="analyze75"> | 526 <param name="infile" value="" ftype="analyze75"> |
305 <composite_data value="Analyze75.hdr"/> | 527 <composite_data value="Analyze75.hdr"/> |
306 <composite_data value="Analyze75.img"/> | 528 <composite_data value="Analyze75.img"/> |
307 <composite_data value="Analyze75.t2m"/> | 529 <composite_data value="Analyze75.t2m"/> |
308 </param> | 530 </param> |
309 <param name="inputpixels" ftype="tabular" value = "inputpixels2.tabular"/> | 531 <param name="pixel_filtering" value="single_column"/> |
532 <param name="single_pixels" ftype="tabular" value = "inputpixels2.tabular"/> | |
310 <param name="pixel_column" value="1"/> | 533 <param name="pixel_column" value="1"/> |
534 <param name="features_filtering" value="features_list"/> | |
311 <param name="inputfeatures" ftype="tabular" value = "featuresofinterest2.tabular"/> | 535 <param name="inputfeatures" ftype="tabular" value = "featuresofinterest2.tabular"/> |
312 <param name="feature_column" value="1"/> | 536 <param name="feature_column" value="1"/> |
313 <conditional name="outputs"> | 537 <conditional name="outputs"> |
314 <param name="outputs_select" value="quality_control"/> | 538 <param name="outputs_select" value="quality_control"/> |
315 <param name="inputmz" value="702"/> | 539 <param name="inputmz" value="702"/> |
318 <param name="output_matrix" value="True"/> | 542 <param name="output_matrix" value="True"/> |
319 <output name="filtering_qc" file="analyze_filtered.pdf" compare="sim_size" delta="20000"/> | 543 <output name="filtering_qc" file="analyze_filtered.pdf" compare="sim_size" delta="20000"/> |
320 <output name="msidata_filtered" file="analyze_filtered.RData" compare="sim_size" /> | 544 <output name="msidata_filtered" file="analyze_filtered.RData" compare="sim_size" /> |
321 <output name="matrixasoutput" file="analyze_matrix.tabular"/> | 545 <output name="matrixasoutput" file="analyze_matrix.tabular"/> |
322 </test> | 546 </test> |
323 <test expect_num_outputs="1"> | 547 <test expect_num_outputs="2"> |
324 <param name="infile" value="" ftype="analyze75"> | 548 <param name="infile" value="" ftype="analyze75"> |
325 <composite_data value="Analyze75.hdr"/> | 549 <composite_data value="Analyze75.hdr"/> |
326 <composite_data value="Analyze75.img"/> | 550 <composite_data value="Analyze75.img"/> |
327 <composite_data value="Analyze75.t2m"/> | 551 <composite_data value="Analyze75.t2m"/> |
328 </param> | 552 </param> |
329 <conditional name="outputs"> | 553 <conditional name="outputs"> |
330 <param name="outputs_select" value="no_quality_control"/> | 554 <param name="outputs_select" value="quality_control"/> |
555 <param name="inputmz" value="702"/> | |
556 <param name="plusminus_dalton" value="0.25"/> | |
331 </conditional> | 557 </conditional> |
332 <output name="msidata_filtered" file="analyze_originaloutput.RData" compare="sim_size" /> | 558 <output name="filtering_qc" file="analyze75_filtered2.pdf" compare="sim_size" delta="20000"/> |
559 <output name="msidata_filtered" file="analyze_originaloutput2.RData" compare="sim_size" /> | |
333 </test> | 560 </test> |
334 <test expect_num_outputs="2"> | 561 <test expect_num_outputs="2"> |
335 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/> | 562 <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/> |
336 <conditional name="outputs"> | 563 <conditional name="outputs"> |
337 <param name="outputs_select" value="no_quality_control"/> | 564 <param name="outputs_select" value="no_quality_control"/> |
338 </conditional> | 565 </conditional> |
339 <param name="output_matrix" value="True"/> | 566 <param name="output_matrix" value="True"/> |
340 <output name="matrixasoutput" file="rdata_matrix.tabular"/> | 567 <output name="matrixasoutput" file="rdata_matrix.tabular"/> |
568 <output name="msidata_filtered" file="rdata_notfiltered.RData" compare="sim_size" /> | |
341 </test> | 569 </test> |
342 </tests> | 570 </tests> |
343 <help> | 571 <help> |
344 <![CDATA[ | 572 <![CDATA[ |
345 | 573 |
346 This tool can filter three types of mass-spectrometry imaging files (see below) for pixels and features of interest. This can be used to keep only pixels in a regions of interest. | 574 This tool can filter three types of mass-spectrometry imaging files (see below) for pixels and features of interest. This can be used to keep only pixels in a regions of interest. |
347 For filtering at least one valid pixel/feature is needed otherwise no filtering will be performed. | 575 For filtering at least one valid pixel/feature is needed otherwise no filtering will be performed. It is recommended to use the filtering tool only for feature masses which have been extracted from the same dataset. If you have feature masses from dataset A and you want to use them to filter dataset B, first find the corresponding (closest) features in dataset B by using the tool "Join two files on column allowing a small difference". Afterwards use the corresponding feature masses from dataset B to filter dataset B. |
348 | 576 |
349 Input data: 3 types of input data can be used: | 577 Input data: 3 types of input data can be used: |
350 | 578 |
351 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_ | 579 - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <http://ms-imaging.org/wp/introduction/>`_ |
352 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) | 580 - Analyze7.5 (upload hdr, img and t2m file via the "composite" function) |