comparison preprocessing.xml @ 2:1b875f0b8024 draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit f127be2141cf22e269c85282d226eb16fe14a9c1
author galaxyp
date Fri, 15 Feb 2019 10:22:14 -0500
parents 1b22c1e7bfe7
children f172efe92629
comparison
equal deleted inserted replaced
1:1b22c1e7bfe7 2:1b875f0b8024
1 <tool id="cardinal_preprocessing" name="MSI preprocessing" version="@VERSION@.1"> 1 <tool id="cardinal_preprocessing" name="MSI preprocessing" version="@VERSION@.2">
2 <description> 2 <description>
3 mass spectrometry imaging preprocessing 3 mass spectrometry imaging preprocessing
4 </description> 4 </description>
5 <macros> 5 <macros>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
15 15
16 @INPUT_LINKING@ 16 @INPUT_LINKING@
17 cat '${cardinal_preprocessing}' && 17 cat '${cardinal_preprocessing}' &&
18 Rscript '${cardinal_preprocessing}' && 18 Rscript '${cardinal_preprocessing}' &&
19 19
20 #if $imzml_output: 20 #if str($imzml_output) == "imzml_format":
21 mkdir $outfile_imzml.files_path && 21 mkdir $outfile_imzml.files_path &&
22 ls -l &&
23 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true && 22 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true &&
24 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true && 23 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true &&
25 #end if 24 #end if
26 echo "imzML file:" > $outfile_imzml && 25 echo "imzML file:" > $outfile_imzml &&
27 ls -l "$outfile_imzml.files_path" >> $outfile_imzml 26 ls -l "$outfile_imzml.files_path" >> $outfile_imzml
28
29 27
30 ]]> 28 ]]>
31 </command> 29 </command>
32 <configfiles> 30 <configfiles>
33 <configfile name="cardinal_preprocessing"><![CDATA[ 31 <configfile name="cardinal_preprocessing"><![CDATA[
39 library(lattice) 37 library(lattice)
40 library(ggplot2) 38 library(ggplot2)
41 39
42 @READING_MSIDATA@ 40 @READING_MSIDATA@
43 41
44
45 ## remove duplicated coordinates, otherwise peak picking and log2 transformation will fail 42 ## remove duplicated coordinates, otherwise peak picking and log2 transformation will fail
46 print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed")) 43 print(paste0(sum(duplicated(coord(msidata)[,1:2])), " duplicated coordinates were removed"))
47 msidata <- msidata[,!duplicated(coord(msidata))] 44 msidata <- msidata[,!duplicated(coord(msidata)[,1:2])]
48 45
49 print(paste0("Number of NA in input file: ",sum(is.na(spectra(msidata)[])))) 46
50 47 if (ncol(msidata)>0 & nrow(msidata) >0){
51 48
52 if (sum(spectra(msidata)[]>0, na.rm=TRUE)> 0){ 49 ## start QC report
50
51 pdf("Preprocessing.pdf", fonts = "Times", pointsize = 12)
52 plot(0,type='n',axes=FALSE,ann=FALSE)
53 title(main=paste("Quality control during preprocessing \n", "Filename:", "$infile.display_name"))
54
53 ######################### preparations for QC report ################# 55 ######################### preparations for QC report #################
54 56
55 maxfeatures = length(features(msidata)) 57 maxfeatures =nrow(msidata)
56 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 58 pixelcount = ncol(msidata)
57 medint = round(median(spectra(msidata)[],na.rm=TRUE), digits=2) 59 minmz = round(min(mz(msidata)), digits=2)
58 minmz = round(min(mz(msidata)), digits=2) 60 maxmz = round(max(mz(msidata)), digits=2)
59 maxmz = round(max(mz(msidata)), digits=2) 61 QC_numbers= data.frame(inputdata = c(minmz, maxmz,maxfeatures, pixelcount))
60 QC_numbers= data.frame(inputdata = c(minmz, maxmz,maxfeatures, medianpeaks, medint)) 62 vectorofactions = "inputdata"
61 vectorofactions = "inputdata" 63 plot(msidata, pixel = 1:pixelcount, main="Average spectrum of input file")
62 64
63 ############################### Preprocessing steps ########################### 65 ############################### Preprocessing steps ###########################
64 ############################################################################### 66 ###############################################################################
65 67
66 #for $method in $methods: 68 #for $method in $methods:
73 75
74 msidata = normalize(msidata, method="tic") 76 msidata = normalize(msidata, method="tic")
75 77
76 ############################### QC ########################### 78 ############################### QC ###########################
77 79
78 maxfeatures = length(features(msidata)) 80 maxfeatures =nrow(msidata)
79 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE),) 81 pixelcount = ncol(msidata)
80 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 82 minmz = round(min(mz(msidata)), digits=2)
81 minmz = round(min(mz(msidata)), digits=2) 83 maxmz = round(max(mz(msidata)), digits=2)
82 maxmz = round(max(mz(msidata)), digits=2) 84 normalized = c(minmz, maxmz,maxfeatures, pixelcount)
83 normalized = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 85 QC_numbers= cbind(QC_numbers, normalized)
84 QC_numbers= cbind(QC_numbers, normalized) 86 vectorofactions = append(vectorofactions, "normalized")
85 vectorofactions = append(vectorofactions, "normalized") 87 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after normalization")
86 88
87 ############################### Baseline reduction ########################### 89 ############################### Baseline reduction ###########################
88 90
89 #elif str( $method.methods_conditional.preprocessing_method ) == 'Baseline_reduction': 91 #elif str( $method.methods_conditional.preprocessing_method ) == 'Baseline_reduction':
90 print('Baseline_reduction') 92 print('Baseline_reduction')
92 94
93 msidata = reduceBaseline(msidata, method="median", blocks=$method.methods_conditional.blocks_baseline, spar=$method.methods_conditional.spar_baseline) 95 msidata = reduceBaseline(msidata, method="median", blocks=$method.methods_conditional.blocks_baseline, spar=$method.methods_conditional.spar_baseline)
94 96
95 ############################### QC ########################### 97 ############################### QC ###########################
96 98
97 maxfeatures = length(features(msidata)) 99 maxfeatures =nrow(msidata)
98 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 100 pixelcount = ncol(msidata)
99 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 101 minmz = round(min(mz(msidata)), digits=2)
100 minmz = round(min(mz(msidata)), digits=2) 102 maxmz = round(max(mz(msidata)), digits=2)
101 maxmz = round(max(mz(msidata)), digits=2) 103 baseline = c(minmz, maxmz,maxfeatures, pixelcount)
102 baseline = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 104 QC_numbers= cbind(QC_numbers, baseline)
103 QC_numbers= cbind(QC_numbers, baseline) 105 vectorofactions = append(vectorofactions, "baseline red.")
104 vectorofactions = append(vectorofactions, "baseline red.") 106 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after baseline reduction")
105 107
106 ############################### Smoothing ########################### 108 ############################### Smoothing ###########################
107 109
108 #elif str( $method.methods_conditional.preprocessing_method ) == 'Smoothing': 110 #elif str( $method.methods_conditional.preprocessing_method ) == 'Smoothing':
109 print('Smoothing') 111 print('Smoothing')
125 127
126 #end if 128 #end if
127 129
128 ############################### QC ########################### 130 ############################### QC ###########################
129 131
130 maxfeatures = length(features(msidata)) 132 maxfeatures =nrow(msidata)
131 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 133 pixelcount = ncol(msidata)
132 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 134 minmz = round(min(mz(msidata)), digits=2)
133 minmz = round(min(mz(msidata)), digits=2) 135 maxmz = round(max(mz(msidata)), digits=2)
134 maxmz = round(max(mz(msidata)), digits=2) 136 smoothed = c(minmz, maxmz,maxfeatures, pixelcount)
135 smoothed = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 137 QC_numbers= cbind(QC_numbers, smoothed)
136 QC_numbers= cbind(QC_numbers, smoothed) 138 vectorofactions = append(vectorofactions, "smoothed")
137 vectorofactions = append(vectorofactions, "smoothed") 139 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after smoothing")
138 140
139 ############################### Peak picking ########################### 141 ############################### Peak picking ###########################
140 142
141 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking': 143 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_picking':
142 print('Peak_picking') 144 print('Peak_picking')
159 161
160 #end if 162 #end if
161 163
162 ############################### QC ########################### 164 ############################### QC ###########################
163 165
164 maxfeatures = length(features(msidata)) 166 maxfeatures =nrow(msidata)
165 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 167 pixelcount = ncol(msidata)
166 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 168 minmz = round(min(mz(msidata)), digits=2)
167 minmz = round(min(mz(msidata)), digits=2) 169 maxmz = round(max(mz(msidata)), digits=2)
168 maxmz = round(max(mz(msidata)), digits=2) 170 picked = c(minmz, maxmz,maxfeatures, pixelcount)
169 picked = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 171 QC_numbers= cbind(QC_numbers, picked)
170 QC_numbers= cbind(QC_numbers, picked) 172 vectorofactions = append(vectorofactions, "picked")
171 vectorofactions = append(vectorofactions, "picked") 173 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after peak picking")
172 174
173 ############################### Peak alignment ########################### 175 ############################### Peak alignment ###########################
174 176
175 #elif str( $method.methods_conditional.preprocessing_method ) == 'Peak_alignment': 177 #elif str( $method.methods_conditional.preprocessing_method ) == 'Peak_alignment':
176 print('Peak_alignment') 178 print('Peak_alignment')
206 208
207 #end if 209 #end if
208 210
209 ############################### QC ########################### 211 ############################### QC ###########################
210 212
211 maxfeatures = length(features(msidata)) 213 maxfeatures =nrow(msidata)
212 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 214 pixelcount = ncol(msidata)
213 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 215 minmz = round(min(mz(msidata)), digits=2)
214 minmz = round(min(mz(msidata)), digits=2) 216 maxmz = round(max(mz(msidata)), digits=2)
215 maxmz = round(max(mz(msidata)), digits=2) 217 aligned = c(minmz, maxmz,maxfeatures, pixelcount)
216 aligned = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 218 QC_numbers= cbind(QC_numbers, aligned)
217 QC_numbers= cbind(QC_numbers, aligned) 219 vectorofactions = append(vectorofactions, "aligned")
218 vectorofactions = append(vectorofactions, "aligned") 220 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after alignment")
219 221
220 ############################### Peak filtering ########################### 222 ############################### Peak filtering ###########################
221 223
222 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_filtering': 224 #elif str( $method.methods_conditional.preprocessing_method) == 'Peak_filtering':
223 print('Peak_filtering') 225 print('Peak_filtering')
224 226
225 msidata = peakFilter(msidata, method='freq', freq.min = $method.methods_conditional.frequ_filtering) 227 msidata = peakFilter(msidata, method='freq', freq.min = $method.methods_conditional.frequ_filtering)
226 228
227 ############################### QC ########################### 229 ############################### QC ###########################
228 230
229 maxfeatures = length(features(msidata)) 231 maxfeatures =nrow(msidata)
230 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 232 pixelcount = ncol(msidata)
231 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 233 minmz = round(min(mz(msidata)), digits=2)
232 minmz = round(min(mz(msidata)), digits=2) 234 maxmz = round(max(mz(msidata)), digits=2)
233 maxmz = round(max(mz(msidata)), digits=2) 235 filtered = c(minmz, maxmz,maxfeatures, pixelcount)
234 filtered = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 236 QC_numbers= cbind(QC_numbers, filtered)
235 QC_numbers= cbind(QC_numbers, filtered) 237 vectorofactions = append(vectorofactions, "filtered")
236 vectorofactions = append(vectorofactions, "filtered") 238 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after filtering")
237 239
238 ############################### Data reduction ########################### 240 ############################### Data reduction ###########################
239 241
240 #elif str( $method.methods_conditional.preprocessing_method) == 'Data_reduction': 242 #elif str( $method.methods_conditional.preprocessing_method) == 'Data_reduction':
241 print('Data_reduction') 243 print('Data_reduction')
245 247
246 msidata = reduceDimension(msidata, method="bin", width=$method.methods_conditional.methods_for_reduction.bin_width, units="$method.methods_conditional.methods_for_reduction.bin_units", fun=$method.methods_conditional.methods_for_reduction.bin_fun) 248 msidata = reduceDimension(msidata, method="bin", width=$method.methods_conditional.methods_for_reduction.bin_width, units="$method.methods_conditional.methods_for_reduction.bin_units", fun=$method.methods_conditional.methods_for_reduction.bin_fun)
247 249
248 ## optional: replace NA with 0 250 ## optional: replace NA with 0
249 #if $method.methods_conditional.methods_for_reduction.replace_NA_bin: 251 #if $method.methods_conditional.methods_for_reduction.replace_NA_bin:
252 ## binning seems to create normal R matrix but to be sure:
253 iData(msidata) <- iData(msidata)[]
254 ## count and replace NAs
250 print(paste0("Number of NA that were set to zero after binning:",sum(is.na(spectra(msidata)[])))) 255 print(paste0("Number of NA that were set to zero after binning:",sum(is.na(spectra(msidata)[]))))
251 spectra(msidata)[][is.na(spectra(msidata)[])] = 0 256 spectra(msidata)[is.na(spectra(msidata))] = 0
252 #end if 257 #end if
253 258
254 #elif str( $method.methods_conditional.methods_for_reduction.reduction_method) == 'resample': 259 #elif str( $method.methods_conditional.methods_for_reduction.reduction_method) == 'resample':
255 print('resample reduction') 260 print('resample reduction')
256 261
273 278
274 msidata = reduceDimension(msidata, method="peaks", ref=peak_reference, type="$method.methods_conditional.methods_for_reduction.peaks_type") 279 msidata = reduceDimension(msidata, method="peaks", ref=peak_reference, type="$method.methods_conditional.methods_for_reduction.peaks_type")
275 #end if 280 #end if
276 ############################### QC ########################### 281 ############################### QC ###########################
277 282
278 maxfeatures = length(features(msidata)) 283 maxfeatures =nrow(msidata)
279 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 284 pixelcount = ncol(msidata)
280 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 285 minmz = round(min(mz(msidata)), digits=2)
281 minmz = round(min(mz(msidata)), digits=2) 286 maxmz = round(max(mz(msidata)), digits=2)
282 maxmz = round(max(mz(msidata)), digits=2) 287 reduced = c(minmz, maxmz,maxfeatures, pixelcount)
283 reduced = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 288 QC_numbers= cbind(QC_numbers, reduced)
284 QC_numbers= cbind(QC_numbers, reduced) 289 vectorofactions = append(vectorofactions, "reduced")
285 vectorofactions = append(vectorofactions, "reduced") 290 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after data reduction")
286 291
287 ############################### Transformation ########################### 292 ############################### Transformation ###########################
288 293
289 #elif str( $method.methods_conditional.preprocessing_method) == 'Transformation': 294 #elif str( $method.methods_conditional.preprocessing_method) == 'Transformation':
290 print('Transformation') 295 print('Transformation')
291 296
297 ## convert data into R matrix what brings it automatically into memory and can take some take but next steps need R matrix
298 iData(msidata) <- iData(msidata)[]
299
292 #if str( $method.methods_conditional.transf_conditional.trans_type) == 'log2': 300 #if str( $method.methods_conditional.transf_conditional.trans_type) == 'log2':
293 print('log2 transformation') 301 print('log2 transformation')
294 302
295 ## replace 0 with NA 303 ## replace 0 with NA to prevent Inf
296 spectra_df = spectra(msidata)[] 304 spectra_df = spectra(msidata)[]
297 spectra_df[spectra_df ==0] = NA 305 spectra_df[spectra_df ==0] = NA
298 print(paste0("Number of 0 which were converted into NA:",sum(is.na(spectra_df)))) 306 print(paste0("Number of 0 which were converted into NA:",sum(is.na(spectra_df))))
299 spectra(msidata) = spectra_df 307 spectra(msidata) = spectra_df
300 ## log transformation 308 ## log transformation
311 319
312 #end if 320 #end if
313 321
314 ############################### QC ########################### 322 ############################### QC ###########################
315 323
316 maxfeatures = length(features(msidata)) 324 maxfeatures =nrow(msidata)
317 medianpeaks = median(colSums(spectra(msidata)[]>0, na.rm=TRUE)) 325 pixelcount = ncol(msidata)
318 medint = round(median(spectra(msidata)[], na.rm=TRUE), digits=2) 326 minmz = round(min(mz(msidata)), digits=2)
319 minmz = round(min(mz(msidata)), digits=2) 327 maxmz = round(max(mz(msidata)), digits=2)
320 maxmz = round(max(mz(msidata)), digits=2) 328 transformed = c(minmz, maxmz,maxfeatures, pixelcount)
321 transformed = c(minmz, maxmz,maxfeatures, medianpeaks, medint) 329 QC_numbers= cbind(QC_numbers, transformed)
322 QC_numbers= cbind(QC_numbers, transformed) 330 vectorofactions = append(vectorofactions, "transformed")
323 vectorofactions = append(vectorofactions, "transformed") 331 plot(msidata, pixel = 1:pixelcount, main="Average spectrum after transformation")
324 332
325 #end if 333 #end if
326 #end for 334 #end for
327 335
328 ############# Outputs: RData, imzml and QC report ############# 336 ############# Outputs: RData, imzml and QC report #############
329 ################################################################################ 337 ################################################################################
330 338
331 print(paste0("Number of NA in output file: ",sum(is.na(spectra(msidata)[]))))
332
333 ## save as (.RData)
334 save(msidata, file="$msidata_preprocessed")
335
336 ## save msidata as imzML file, will only work if there is at least 1 m/z left 339 ## save msidata as imzML file, will only work if there is at least 1 m/z left
337 #if $imzml_output: 340
341 #if str($imzml_output) == "imzml_format":
338 if (nrow(msidata) > 0){ 342 if (nrow(msidata) > 0){
339 print("write outputfile")
340 writeImzML(msidata, "out")} 343 writeImzML(msidata, "out")}
344 #elif str($imzml_output) == "rdata_format":
345 ## save as (.RData)
346 iData(msidata) = iData(msidata)[]
347 save(msidata, file="$outfile_rdata")
341 #end if 348 #end if
342 349
343 ## save QC report
344
345 pdf("Preprocessing.pdf", fonts = "Times", pointsize = 12)
346 plot(0,type='n',axes=FALSE,ann=FALSE) 350 plot(0,type='n',axes=FALSE,ann=FALSE)
347 title(main=paste("Quality control during preprocessing \n", "Filename:", "$infile.display_name")) 351 rownames(QC_numbers) = c("min m/z", "max mz", "# features", "# spectra")
348 rownames(QC_numbers) = c("min m/z", "max mz", "# features", "median\n# peaks", "median\nintensity")
349 grid.table(t(QC_numbers)) 352 grid.table(t(QC_numbers))
350 353
351 dev.off() 354 dev.off()
352 355
353 }else{ 356 }else{
359 <inputs> 362 <inputs>
360 <expand macro="reading_msidata"/> 363 <expand macro="reading_msidata"/>
361 <repeat name="methods" title="Preprocessing" min="1" max="50"> 364 <repeat name="methods" title="Preprocessing" min="1" max="50">
362 <conditional name="methods_conditional"> 365 <conditional name="methods_conditional">
363 <param name="preprocessing_method" type="select" label="Preprocessing methods"> 366 <param name="preprocessing_method" type="select" label="Preprocessing methods">
364 <option value="Normalization" selected="True">Normalization</option> 367 <option value="Normalization" selected="True">Intensity Normalization (TIC)</option>
365 <option value="Baseline_reduction">Baseline Reduction</option> 368 <option value="Baseline_reduction">Baseline Reduction</option>
366 <option value="Smoothing">Peak smoothing</option> 369 <option value="Smoothing">Peak smoothing</option>
367 <option value="Peak_picking">Peak picking</option> 370 <option value="Peak_picking">Peak picking</option>
368 <option value="Peak_alignment">Peak alignment</option> 371 <option value="Peak_alignment">Peak alignment</option>
369 <option value="Peak_filtering">Peak filtering</option> 372 <option value="Peak_filtering">Peak filtering</option>
526 <when value="sqrt"/> 529 <when value="sqrt"/>
527 </conditional> 530 </conditional>
528 </when> 531 </when>
529 </conditional> 532 </conditional>
530 </repeat> 533 </repeat>
531 <param name="imzml_output" type="boolean" label="Output of imzML file" truevalue="TRUE" falsevalue="FALSE"/> 534 <param name="imzml_output" type="select" display = "radio" optional = "False"
535 label="Output format" help= "Choose the output format">
536 <option value="imzml_format" selected="True">imzML</option>
537 <option value="rdata_format">RData</option>
538 </param>
532 </inputs> 539 </inputs>
533 <outputs> 540 <outputs>
534 <data format="rdata" name="msidata_preprocessed" label="${tool.name} on ${on_string}"/> 541 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML">
542 <filter>imzml_output=='imzml_format'</filter>
543 </data>
544 <data format="rdata" name="outfile_rdata" label="${tool.name} on ${on_string}: RData">
545 <filter>imzml_output == 'rdata_format'</filter>
546 </data>
535 <data format="pdf" name="QC_overview" from_work_dir="Preprocessing.pdf" label = "${tool.name} on ${on_string}: QC"/> 547 <data format="pdf" name="QC_overview" from_work_dir="Preprocessing.pdf" label = "${tool.name} on ${on_string}: QC"/>
536 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML">
537 <filter>imzml_output</filter>
538 </data>
539 </outputs> 548 </outputs>
540 <tests> 549 <tests>
541 <test> 550 <test>
542 <expand macro="infile_imzml"/> 551 <expand macro="infile_imzml"/>
543 <repeat name="methods"> 552 <repeat name="methods">
589 <conditional name="transf_conditional"> 598 <conditional name="transf_conditional">
590 <param name="trans_type" value="sqrt"/> 599 <param name="trans_type" value="sqrt"/>
591 </conditional> 600 </conditional>
592 </conditional> 601 </conditional>
593 </repeat> 602 </repeat>
594 <output name="msidata_preprocessed" file="preprocessing_results1.RData" compare="sim_size"/> 603 <param name="imzml_output" value="imzml_format"/>
595 <output name="QC_overview" file="preprocessing_results1.pdf" compare="sim_size"/> 604 <output name="QC_overview" file="preprocessing_results1.pdf" compare="sim_size"/>
605 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results1.imzml.txt" compare="sim_size">
606 <extra_files type="file" file="preprocessing_results1.imzml" name="imzml" lines_diff="4"/>
607 <extra_files type="file" file="preprocessing_results1.ibd" name="ibd" compare="sim_size"/>
608 </output>
596 </test> 609 </test>
597 <test> 610 <test>
598 <param name="infile" value="3_files_combined.RData" ftype="rdata"/> 611 <param name="infile" value="3_files_combined.RData" ftype="rdata"/>
599 <repeat name="methods"> 612 <repeat name="methods">
600 <conditional name="methods_conditional"> 613 <conditional name="methods_conditional">
613 <conditional name="methods_for_alignment"> 626 <conditional name="methods_for_alignment">
614 <param name="alignment_method" value="DP"/> 627 <param name="alignment_method" value="DP"/>
615 </conditional> 628 </conditional>
616 </conditional> 629 </conditional>
617 </repeat> 630 </repeat>
618 <output name="msidata_preprocessed" file="preprocessing_results2.RData" compare="sim_size"/> 631 <param name="imzml_output" value="imzml_format"/>
619 <output name="QC_overview" file="preprocessing_results2.pdf" compare="sim_size"/> 632 <output name="QC_overview" file="preprocessing_results2.pdf" compare="sim_size"/>
633 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results2.imzml.txt" compare="sim_size">
634 <extra_files type="file" file="preprocessing_results2.imzml" name="imzml" lines_diff="4"/>
635 <extra_files type="file" file="preprocessing_results2.ibd" name="ibd" compare="sim_size"/>
636 </output>
620 </test> 637 </test>
621 <test> 638 <test>
622 <expand macro="infile_analyze75"/> 639 <expand macro="infile_analyze75"/>
623 <repeat name="methods"> 640 <repeat name="methods">
624 <conditional name="methods_conditional"> 641 <conditional name="methods_conditional">
643 <conditional name="methods_for_alignment"> 660 <conditional name="methods_for_alignment">
644 <param name="alignment_method" value="diff"/> 661 <param name="alignment_method" value="diff"/>
645 </conditional> 662 </conditional>
646 </conditional> 663 </conditional>
647 </repeat> 664 </repeat>
648 <output name="msidata_preprocessed" file="preprocessing_results3.RData" compare="sim_size"/> 665 <param name="imzml_output" value="imzml_format"/>
649 <output name="QC_overview" file="preprocessing_results3.pdf" compare="sim_size"/> 666 <output name="QC_overview" file="preprocessing_results3.pdf" compare="sim_size"/>
667 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results3.imzml.txt" compare="sim_size">
668 <extra_files type="file" file="preprocessing_results3.imzml" name="imzml" lines_diff="4"/>
669 <extra_files type="file" file="preprocessing_results3.ibd" name="ibd" compare="sim_size"/>
670 </output>
650 </test> 671 </test>
651 <test> 672 <test>
652 <expand macro="infile_analyze75"/> 673 <expand macro="infile_analyze75"/>
653 <repeat name="methods"> 674 <repeat name="methods">
654 <conditional name="methods_conditional"> 675 <conditional name="methods_conditional">
659 <conditional name="methods_conditional"> 680 <conditional name="methods_conditional">
660 <param name="preprocessing_method" value="Data_reduction"/> 681 <param name="preprocessing_method" value="Data_reduction"/>
661 <param name="bin_width" value="0.1"/> 682 <param name="bin_width" value="0.1"/>
662 </conditional> 683 </conditional>
663 </repeat> 684 </repeat>
664 <output name="msidata_preprocessed" file="preprocessing_results4.RData" compare="sim_size"/> 685 <param name="imzml_output" value="imzml_format"/>
665 <output name="QC_overview" file="preprocessing_results4.pdf" compare="sim_size"/> 686 <output name="QC_overview" file="preprocessing_results4.pdf" compare="sim_size"/>
687 <output name="outfile_imzml" ftype="imzml" file="preprocessing_results4.imzml.txt" compare="sim_size">
688 <extra_files type="file" file="preprocessing_results4.imzml" name="imzml" lines_diff="4"/>
689 <extra_files type="file" file="preprocessing_results4.ibd" name="ibd" compare="sim_size"/>
690 </output>
666 </test> 691 </test>
667 <test> 692 <test>
668 <expand macro="infile_imzml"/> 693 <expand macro="infile_imzml"/>
669 <repeat name="methods"> 694 <repeat name="methods">
670 <conditional name="methods_conditional"> 695 <conditional name="methods_conditional">
673 <param name="reduction_method" value="resample"/> 698 <param name="reduction_method" value="resample"/>
674 <param name="step_width" value="0.1"/> 699 <param name="step_width" value="0.1"/>
675 </conditional> 700 </conditional>
676 </conditional> 701 </conditional>
677 </repeat> 702 </repeat>
678 <output name="msidata_preprocessed" file="preprocessing_results5.RData" compare="sim_size"/> 703 <param name="imzml_output" value="rdata_format"/>
704 <output name="outfile_rdata" file="preprocessing_results5.RData" compare="sim_size"/>
679 <output name="QC_overview" file="preprocessing_results5.pdf" compare="sim_size"/> 705 <output name="QC_overview" file="preprocessing_results5.pdf" compare="sim_size"/>
680 </test> 706 </test>
681 </tests> 707 </tests>
682 <help> 708 <help>
683 <![CDATA[ 709 <![CDATA[
708 - Peak alignment works only after peak picking 734 - Peak alignment works only after peak picking
709 - Peak filtering works only on centroided data (peak picking and alignment or Data reduction peaks 735 - Peak filtering works only on centroided data (peak picking and alignment or Data reduction peaks
710 736
711 **Output** 737 **Output**
712 738
713 - MSI data as .RData output (can be read with the Cardinal package in R) 739 - MSI data as imzML file or .RData (can be read with the Cardinal package in R)
714 - optional: MSI data as imzML file 740 - pdf with key values and average mass spectra after each processing step
715 - pdf with key values after each processing step
716 741
717 ]]> 742 ]]>
718 </help> 743 </help>
719 <expand macro="citations"/> 744 <expand macro="citations"/>
720 </tool> 745 </tool>
746