comparison combine.xml @ 2:129cddd02600 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:24:53 -0500
parents 65245dc812c3
children 48c07268f341
comparison
equal deleted inserted replaced
1:65245dc812c3 2:129cddd02600
1 <tool id="cardinal_combine" name="MSI combine" version="@VERSION@.1"> 1 <tool id="cardinal_combine" name="MSI combine" version="@VERSION@.2">
2 <description> 2 <description>
3 combine several mass spectrometry imaging datasets into one 3 combine several mass spectrometry imaging datasets into one
4 </description> 4 </description>
5 <macros> 5 <macros>
6 <import>macros.xml</import> 6 <import>macros.xml</import>
28 #end for 28 #end for
29 #end if 29 #end if
30 30
31 cat '${msi_combine}' && 31 cat '${msi_combine}' &&
32 Rscript '${msi_combine}' && 32 Rscript '${msi_combine}' &&
33 #if $imzml_output: 33 #if str($imzml_output) == "imzml_format":
34 mkdir $outfile_imzml.files_path && 34 mkdir $outfile_imzml.files_path &&
35 ls -l &&
36 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true && 35 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true &&
37 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true && 36 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true &&
38 #end if 37 #end if
39 echo "imzML file:" > $outfile_imzml && 38 echo "imzML file:" > $outfile_imzml &&
40 ls -l "$outfile_imzml.files_path" >> $outfile_imzml 39 ls -l "$outfile_imzml.files_path" >> $outfile_imzml
165 #elif str( $combine_conditional.combine_method ) == 'automatic_combine': 164 #elif str( $combine_conditional.combine_method ) == 'automatic_combine':
166 165
167 ## use name of Galaxy inputfile as combined sample annotation 166 ## use name of Galaxy inputfile as combined sample annotation
168 names_vector = character() 167 names_vector = character()
169 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier)) 168 #set escaped_element_identifier = re.sub('[^\w\-\s\[/]]', '_', str($infile.element_identifier))
170 if (sum(spectra(msidata_$i)[],na.rm=TRUE)>0) ## use only valid files 169
170 if (ncol(msidata_$i)>0 & nrow(msidata_$i) >0)
171 { 171 {
172 if (is.null(levels(msidata_$i\$combined_sample))) 172 if (is.null(levels(msidata_$i\$combined_sample)))
173 { 173 {
174 names_vector = append(names_vector, rep(paste($i+1, "$escaped_element_identifier", sep="_"),ncol(msidata_$i))) 174 names_vector = append(names_vector, rep(paste($i+1, "$escaped_element_identifier", sep="_"),ncol(msidata_$i)))
175 msidata_$i\$combined_sample = as.factor(names_vector) 175 msidata_$i\$combined_sample = as.factor(names_vector)
192 #end if 192 #end if
193 193
194 ## store files to combine them later and for each file check if it is valid 194 ## store files to combine them later and for each file check if it is valid
195 195
196 #silent $msidata.append('msidata_'+str($i)) 196 #silent $msidata.append('msidata_'+str($i))
197 valid_dataset = append(valid_dataset, 197 valid_dataset = append(valid_dataset, ncol(msidata_$i)>0 & nrow(msidata_$i)>0) ## file with no intensities is considered valid
198 (ncol(msidata_$i)>0 & nrow(msidata_$i)>0 & sum(spectra(msidata_$i)[], na.rm=TRUE)>0))
199 198
200 #end for 199 #end for
201 200
202 201
203 ###################### automatic combination ################################### 202 ###################### automatic combination ###################################
215 214
216 ## create dataframe with x,y,sample_name and show all pixels in PDF as QC 215 ## create dataframe with x,y,sample_name and show all pixels in PDF as QC
217 position_df = cbind(coord(msidata_combined)[,1:2], msidata_combined\$combined_sample) 216 position_df = cbind(coord(msidata_combined)[,1:2], msidata_combined\$combined_sample)
218 colnames(position_df)[3] = "sample_name" 217 colnames(position_df)[3] = "sample_name"
219 218
220 ## save as (.RData)
221 msidata = msidata_combined 219 msidata = msidata_combined
222 save(msidata, file="$msidata_combined")
223 220
224 ## save msidata as imzML file 221 ## save msidata as imzML file
225 #if $imzml_output: 222 #if str($imzml_output) == "imzml_format":
226 writeImzML(msidata, "out") 223 writeImzML(msidata, "out")
224 #elif str($imzml_output) == "rdata_format":
225 ## save as (.RData)
226 iData(msidata) = iData(msidata)[]
227 save(msidata, file="$outfile_rdata")
227 #end if 228 #end if
228 229
229 230
230 ################################## xy shifts ################################### 231 ################################## xy shifts ###################################
231 ################################################################################ 232 ################################################################################
249 datasetlist[[count]] = filtered_dataset} 250 datasetlist[[count]] = filtered_dataset}
250 count = count +1} 251 count = count +1}
251 252
252 msidata_combined = do.call(combine, datasetlist) 253 msidata_combined = do.call(combine, datasetlist)
253 254
254 ## save as (.RData)
255
256 msidata = msidata_combined 255 msidata = msidata_combined
257 save(msidata, file="$msidata_combined")
258
259 ## save msidata as imzML file 256 ## save msidata as imzML file
260 writeImzML(msidata, "out") 257 #if str($imzml_output) == "imzml_format":
258 writeImzML(msidata, "out")
259 #elif str($imzml_output) == "rdata_format":
260 ## save as (.RData)
261 iData(msidata) = iData(msidata)[]
262 save(msidata, file="$outfile_rdata")
263 #end if
261 264
262 ## create x,y,sample_name dataframe for QC pdf 265 ## create x,y,sample_name dataframe for QC pdf
263 266
264 position_df = cbind(coord(msidata), msidata\$combined_sample) 267 position_df = cbind(coord(msidata)[,1:2], msidata\$combined_sample)
265 colnames(position_df)[3] = "sample_name" 268 colnames(position_df)[3] = "sample_name"
266 269
267 #end if 270 #end if
268 271
269 272
270 ################################## outputs #################################### 273 ################################## outputs ####################################
271 ################################################################################ 274 ################################################################################
272 275
273 ########### QC with pixels and their annotations ################################ 276 ########### QC with pixels and their annotations ################################
274
275 print(paste0("Number of NA in input file: ",sum(is.na(spectra(msidata)[]))))
276 277
277 pdf("Combined_qc.pdf", width=15, height=15) 278 pdf("Combined_qc.pdf", width=15, height=15)
278 279
279 ## combined plot 280 ## combined plot
280 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+ 281 combine_plot = ggplot(position_df, aes(x=x, y=y, fill=sample_name))+
282 coord_fixed()+ 283 coord_fixed()+
283 ggtitle("Spatial orientation of combined data")+ 284 ggtitle("Spatial orientation of combined data")+
284 theme_bw()+ 285 theme_bw()+
285 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 286 theme(text=element_text(family="ArialMT", face="bold", size=15))+
286 theme(legend.position="bottom",legend.direction="vertical")+ 287 theme(legend.position="bottom",legend.direction="vertical")+
287 guides(fill=guide_legend(ncol=5,byrow=TRUE)) 288 guides(fill=guide_legend(ncol=4,byrow=TRUE))
288 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean) 289 coord_labels = aggregate(cbind(x,y)~sample_name, data=position_df, mean)
289 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name) 290 coord_labels\$file_number = gsub( "_.*$", "", coord_labels\$sample_name)
290 for(file_count in 1:nrow(coord_labels)) 291 for(file_count in 1:nrow(coord_labels))
291 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"], 292 {combine_plot = combine_plot + annotate("text",x=coord_labels[file_count,"x"],
292 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))} 293 y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
293 print(combine_plot) 294 print(combine_plot)
294 295
295 #if str($annotation_cond.annotation_tabular) == 'annotation' 296 #if str($annotation_cond.annotation_tabular) == 'annotation'
296
297 ## annotation plots 297 ## annotation plots
298 298
299 ## plot 1 299 ## plot 1
300 300 column1_df = cbind(coord(msidata)[,1:2], msidata\$column1)
301 column1_df = cbind(coord(msidata), msidata\$column1)
302 colnames(column1_df)[3] = "column1" 301 colnames(column1_df)[3] = "column1"
303 302
304 if (sum(is.na(column1_df[3])) < nrow(column1_df)){ 303 if (sum(is.na(column1_df[3])) < nrow(column1_df)){
305 column1_plot = ggplot(column1_df, aes(x=x, y=y, fill=column1))+ 304 column1_plot = ggplot(column1_df, aes(x=x, y=y, fill=column1))+
306 geom_tile() + 305 geom_tile() +
307 coord_fixed()+ 306 coord_fixed()+
308 ggtitle(paste0(annotation_colnames[1]))+ 307 ggtitle(paste0(annotation_colnames[1]))+
309 theme_bw()+ 308 theme_bw()+
310 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 309 theme(text=element_text(family="ArialMT", face="bold", size=15))+
311 theme(legend.position="bottom",legend.direction="vertical")+ 310 theme(legend.position="bottom",legend.direction="vertical")+
312 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[1])) 311 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[1]))
313 print(column1_plot)} 312 print(column1_plot)}
314 ##rename columnname for output tabular file 313 ##rename columnname for output tabular file
315 colnames(column1_df)[3] = annotation_colnames[1] 314 colnames(column1_df)[3] = annotation_colnames[1]
316 315
317 ## plot 2 316 ## plot 2
318 column2_df = cbind(coord(msidata), msidata\$column2) 317 column2_df = cbind(coord(msidata)[,1:2], msidata\$column2)
319 colnames(column2_df)[3] = "column2" 318 colnames(column2_df)[3] = "column2"
320 319
321 if (sum(is.na(column2_df[3])) < nrow(column2_df)){ 320 if (sum(is.na(column2_df[3])) < nrow(column2_df)){
322 column2_plot = ggplot(column2_df, aes(x=x, y=y, fill=column2))+ 321 column2_plot = ggplot(column2_df, aes(x=x, y=y, fill=column2))+
323 geom_tile() + 322 geom_tile() +
324 coord_fixed()+ 323 coord_fixed()+
325 ggtitle(paste0(annotation_colnames[2]))+ 324 ggtitle(paste0(annotation_colnames[2]))+
326 theme_bw()+ 325 theme_bw()+
327 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 326 theme(text=element_text(family="ArialMT", face="bold", size=15))+
328 theme(legend.position="bottom",legend.direction="vertical")+ 327 theme(legend.position="bottom",legend.direction="vertical")+
329 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[2])) 328 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[2]))
330 print(column2_plot)} 329 print(column2_plot)}
330
331 ##rename columnname for output tabular file 331 ##rename columnname for output tabular file
332 colnames(column2_df)[3] = annotation_colnames[2] 332 colnames(column2_df)[3] = annotation_colnames[2]
333 333
334 ## plot 3 334 ## plot 3
335 column3_df = cbind(coord(msidata), msidata\$column3) 335 column3_df = cbind(coord(msidata)[,1:2], msidata\$column3)
336 colnames(column3_df)[3] = "column3" 336 colnames(column3_df)[3] = "column3"
337 if (sum(is.na(column3_df[3])) < nrow(column3_df)){ 337 if (sum(is.na(column3_df[3])) < nrow(column3_df)){
338 column3_plot = ggplot(column3_df, aes(x=x, y=y, fill=column3))+ 338 column3_plot = ggplot(column3_df, aes(x=x, y=y, fill=column3))+
339 geom_tile() + 339 geom_tile() +
340 coord_fixed()+ 340 coord_fixed()+
341 ggtitle(paste0(annotation_colnames[3]))+ 341 ggtitle(paste0(annotation_colnames[3]))+
342 theme_bw()+ 342 theme_bw()+
343 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 343 theme(text=element_text(family="ArialMT", face="bold", size=15))+
344 theme(legend.position="bottom",legend.direction="vertical")+ 344 theme(legend.position="bottom",legend.direction="vertical")+
345 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[3])) 345 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[3]))
346 print(column3_plot)} 346 print(column3_plot)}
347 ##rename columnname for output tabular file 347 ##rename columnname for output tabular file
348 colnames(column3_df)[3] = annotation_colnames[3] 348 colnames(column3_df)[3] = annotation_colnames[3]
349 349
350 ## plot 4 350 ## plot 4
351 column4_df = cbind(coord(msidata), msidata\$column4) 351 column4_df = cbind(coord(msidata)[,1:2], msidata\$column4)
352 colnames(column4_df)[3] = "column4" 352 colnames(column4_df)[3] = "column4"
353 353
354 if (sum(is.na(column4_df[3])) < nrow(column4_df)){ 354 if (sum(is.na(column4_df[3])) < nrow(column4_df)){
355 column4_plot = ggplot(column4_df, aes(x=x, y=y, fill=column4))+ 355 column4_plot = ggplot(column4_df, aes(x=x, y=y, fill=column4))+
356 geom_tile() + 356 geom_tile() +
357 coord_fixed()+ 357 coord_fixed()+
358 ggtitle(paste0(annotation_colnames[4]))+ 358 ggtitle(paste0(annotation_colnames[4]))+
359 theme_bw()+ 359 theme_bw()+
360 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 360 theme(text=element_text(family="ArialMT", face="bold", size=15))+
361 theme(legend.position="bottom",legend.direction="vertical")+ 361 theme(legend.position="bottom",legend.direction="vertical")+
362 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[4])) 362 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[4]))
363 print(column4_plot)} 363 print(column4_plot)}
364 ##rename columnname for output tabular file 364 ##rename columnname for output tabular file
365 colnames(column4_df)[3] = annotation_colnames[4] 365 colnames(column4_df)[3] = annotation_colnames[4]
366 366
367 ## plot5 367 ## plot5
368 368
369 column5_df = cbind(coord(msidata), msidata\$column5) 369 column5_df = cbind(coord(msidata)[,1:2], msidata\$column5)
370 colnames(column5_df)[3] = "column5" 370 colnames(column5_df)[3] = "column5"
371 if (sum(is.na(column5_df[3])) < nrow(column5_df)){ 371 if (sum(is.na(column5_df[3])) < nrow(column5_df)){
372 column5_plot = ggplot(column5_df, aes(x=x, y=y, fill=column5))+ 372 column5_plot = ggplot(column5_df, aes(x=x, y=y, fill=column5))+
373 geom_tile() + 373 geom_tile() +
374 coord_fixed()+ 374 coord_fixed()+
375 ggtitle(paste0(annotation_colnames[5]))+ 375 ggtitle(paste0(annotation_colnames[5]))+
376 theme_bw()+ 376 theme_bw()+
377 theme(text=element_text(family="ArialMT", face="bold", size=15))+ 377 theme(text=element_text(family="ArialMT", face="bold", size=15))+
378 theme(legend.position="bottom",legend.direction="vertical")+ 378 theme(legend.position="bottom",legend.direction="vertical")+
379 guides(fill=guide_legend(ncol=5,byrow=TRUE, title=annotation_colnames[5])) 379 guides(fill=guide_legend(ncol=4,byrow=TRUE, title=annotation_colnames[5]))
380 print(column5_plot)} 380 print(column5_plot)}
381 ##rename columnname for output tabular file 381 ##rename columnname for output tabular file
382 colnames(column5_df)[3] = annotation_colnames[5] 382 colnames(column5_df)[3] = annotation_colnames[5]
383 383
384 #end if 384 #end if
385
386 dev.off() 385 dev.off()
387 386
388 ##################### annotation tabular output ################################ 387 ##################### annotation tabular output ################################
389 388
390 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0){ 389 if (length(features(msidata))> 0 & length(pixels(msidata)) > 0){
391 390 position_df\$sample_name = gsub("^[^_]*_","",position_df\$sample_name)
392 position_df\$sample_name = gsub("^[^_]*_","",position_df\$sample_name)
393 391
394 #if str($annotation_cond.annotation_tabular) == 'no_annotation': 392 #if str($annotation_cond.annotation_tabular) == 'no_annotation':
395 393
396 write.table(position_df, file="$pixel_annotations", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") 394 write.table(position_df, file="$pixel_annotations", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
397 395
398 #else 396 #else
399 annotation_df_list = list(position_df, column1_df, column2_df, column3_df, column4_df, column5_df) 397 annotation_df_list = list(position_df, column1_df, column2_df, column3_df, column4_df, column5_df)
400 combined_annotations = Reduce(function(...) merge(..., by=c("x", "y"), all=TRUE), annotation_df_list) 398 combined_annotations = Reduce(function(...) merge(..., by=c("x", "y"), all=TRUE), annotation_df_list)
401 write.table(combined_annotations, file="$pixel_annotations", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t") 399 write.table(combined_annotations, file="$pixel_annotations", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\t")
402
403 #end if 400 #end if
404 401
405 }else{ 402 }else{
406 print("No annotation tabular output because file has no features or pixels left") 403 print("No annotation tabular output because file has no features or pixels left")
407 } 404 }
448 <option value="automatic_combine" selected="True" >automatic combination</option> 445 <option value="automatic_combine" selected="True" >automatic combination</option>
449 <option value="xy_shifts">shift xy coordinates with a tabular file</option> 446 <option value="xy_shifts">shift xy coordinates with a tabular file</option>
450 </param> 447 </param>
451 <when value="automatic_combine"/> 448 <when value="automatic_combine"/>
452 <when value="xy_shifts"> 449 <when value="xy_shifts">
453 <param name="coordinates_file" type="data" format="tabular" label="datasetnames, x and y values to shift pixel coordinates before combining" 450 <param name="coordinates_file" type="data" format="tabular" label="Datasetnames, x and y values to shift pixel coordinates before combining"
454 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift. Pixels with the same coordinates after shifting will be deleted."/> 451 help="Tabular file with three columns: 1 for the filename, 1 for the x-coordinate shift and 1 for the y-coordinate shift. Pixels with the same coordinates after shifting will be deleted."/>
455 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/> 452 <param name="column_x" data_ref="coordinates_file" label="Column with values for shift in x direction" type="data_column"/>
456 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/> 453 <param name="column_y" data_ref="coordinates_file" label="Column with values for shift in y direction" type="data_column"/>
457 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/> 454 <param name="column_names" data_ref="coordinates_file" label="Column with dataset names" type="data_column"/>
458 <param name="xy_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/> 455 <param name="xy_header" type="boolean" label="Tabular files contain a header line" truevalue="TRUE" falsevalue="FALSE"/>
459 </when> 456 </when>
460 </conditional> 457 </conditional>
461 <param name="imzml_output" type="boolean" label="Output of imzML file" truevalue="TRUE" falsevalue="FALSE"/> 458 <param name="imzml_output" type="select" display = "radio" optional = "False"
459 label="Output format" help= "Choose the output format">
460 <option value="imzml_format" selected="True">imzML</option>
461 <option value="rdata_format">RData</option>
462 </param>
462 </inputs> 463 </inputs>
463 <outputs> 464 <outputs>
464 <data format="rdata" name="msidata_combined" label="${tool.name} on ${on_string}"/> 465 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML">
466 <filter>imzml_output=='imzml_format'</filter>
467 </data>
468 <data format="rdata" name="outfile_rdata" label="${tool.name} on ${on_string}: RData">
469 <filter>imzml_output == 'rdata_format'</filter>
470 </data>
465 <data format="pdf" name="QC_overview" from_work_dir="Combined_qc.pdf" label = "${tool.name} on ${on_string}: QC"/> 471 <data format="pdf" name="QC_overview" from_work_dir="Combined_qc.pdf" label = "${tool.name} on ${on_string}: QC"/>
466 <data format="tabular" name="pixel_annotations" label="${tool.name} on ${on_string}: annotations"/> 472 <data format="tabular" name="pixel_annotations" label="${tool.name} on ${on_string}: annotations"/>
467 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string} : imzML">
468 <filter>imzml_output</filter>
469 </data>
470 </outputs> 473 </outputs>
471 <tests> 474 <tests>
472 <test> 475 <test>
473 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/> 476 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
474 <conditional name="annotation_cond"> 477 <conditional name="annotation_cond">
479 <param name="combine_method" value="xy_shifts"/> 482 <param name="combine_method" value="xy_shifts"/>
480 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/> 483 <param name="coordinates_file" ftype="tabular" value="xy_coordinates.tabular"/>
481 <param name="column_x" value="1"/> 484 <param name="column_x" value="1"/>
482 <param name="column_y" value="2"/> 485 <param name="column_y" value="2"/>
483 <param name="column_names" value="3"/> 486 <param name="column_names" value="3"/>
487 <param name="imzml_output" value="rdata_format"/>
484 <output name="pixel_annotations" file="123_annotation_output.tabular"/> 488 <output name="pixel_annotations" file="123_annotation_output.tabular"/>
485 <output name="msidata_combined" file="123_combined.RData" compare="sim_size" /> 489 <output name="outfile_rdata" file="123_combined.RData" compare="sim_size" />
486 <output name="QC_overview" file="123_combined_QC.pdf" compare="sim_size"/> 490 <output name="QC_overview" file="123_combined_QC.pdf" compare="sim_size"/>
491 </test>
492 <test>
493 <param name="infiles" value="msidata_1.RData,msidata_2.RData,msidata_3.RData" ftype="rdata"/>
494 <conditional name="annotation_cond">
495 <param name="annotation_tabular" value="no_annotation"/>
496 </conditional>
497 <param name="combine_method" value="automatic_combine"/>
498 <param name="imzml_output" value="imzml_format"/>
499 <output name="QC_overview" file="123_combined_auto.pdf" compare="sim_size"/>
500 <output name="pixel_annotations" file="123_combined_auto.tabular"/>
501 <output name="outfile_imzml" ftype="imzml" file="123_combined_auto.imzml.txt" compare="sim_size">
502 <extra_files type="file" file="123_combined_auto.imzml" name="imzml" lines_diff="4"/>
503 <extra_files type="file" file="123_combined_auto.ibd" name="ibd" compare="sim_size"/>
504 </output>
487 </test> 505 </test>
488 <test> 506 <test>
489 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/> 507 <param name="infiles" value="msidata_1.RData,msidata_2.RData" ftype="rdata"/>
490 <conditional name="annotation_cond"> 508 <conditional name="annotation_cond">
491 <param name="annotation_tabular" value="annotation"/> 509 <param name="annotation_tabular" value="annotation"/>
492 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular" ftype="tabular"/> 510 <param name="annotation_files" value="annotations_file1.tabular,annotations_file2.tabular" ftype="tabular"/>
493 <param name="tabular_header" value="TRUE"/> 511 <param name="tabular_header" value="TRUE"/>
494 </conditional> 512 </conditional>
495 <param name="combine_method" value="automatic_combine"/> 513 <param name="combine_method" value="automatic_combine"/>
514 <param name="imzml_output" value="rdata_format"/>
496 <output name="pixel_annotations" file="12_annotation_output.tabular"/> 515 <output name="pixel_annotations" file="12_annotation_output.tabular"/>
497 <output name="msidata_combined" file="12_combined.RData" compare="sim_size" /> 516 <output name="outfile_rdata" file="12_combined.RData" compare="sim_size" />
498 <output name="QC_overview" file="12_combined_QC.pdf" compare="sim_size"/> 517 <output name="QC_overview" file="12_combined_QC.pdf" compare="sim_size"/>
499 </test> 518 </test>
500 <test> 519 <test>
501 <param name="infiles" value="msidata_1.RData,123_combined.RData" ftype="rdata"/> 520 <param name="infiles" value="msidata_1.RData,123_combined.RData" ftype="rdata"/>
502 <conditional name="annotation_cond"> 521 <conditional name="annotation_cond">
503 <param name="annotation_tabular" value="annotation"/> 522 <param name="annotation_tabular" value="annotation"/>
504 <param name="annotation_files" value="annotations_file1.tabular,123_annotation.tabular" ftype="tabular"/> 523 <param name="annotation_files" value="annotations_file1.tabular,123_annotation.tabular" ftype="tabular"/>
505 <param name="tabular_header" value="TRUE"/> 524 <param name="tabular_header" value="TRUE"/>
506 </conditional> 525 </conditional>
507 <param name="combine_method" value="automatic_combine"/> 526 <param name="combine_method" value="automatic_combine"/>
527 <param name="imzml_output" value="imzml_format"/>
508 <output name="pixel_annotations" file="112_annotation_output.tabular"/> 528 <output name="pixel_annotations" file="112_annotation_output.tabular"/>
509 <output name="msidata_combined" file="112_auto_combined.RData" compare="sim_size" />
510 <output name="QC_overview" file="112_auto_combined_QC.pdf" compare="sim_size"/> 529 <output name="QC_overview" file="112_auto_combined_QC.pdf" compare="sim_size"/>
530 <output name="outfile_imzml" ftype="imzml" file="112_auto_combined.imzml.txt" compare="sim_size">
531 <extra_files type="file" file="112_auto_combined.imzml" name="imzml" lines_diff="4"/>
532 <extra_files type="file" file="112_auto_combined.ibd" name="ibd" compare="sim_size"/>
533 </output>
511 </test> 534 </test>
512 <test> 535 <test>
513 <param name="infiles" value="msidata_2.RData,123_combined.RData" ftype="rdata"/> 536 <param name="infiles" value="msidata_2.RData,123_combined.RData" ftype="rdata"/>
514 <conditional name="annotation_cond"> 537 <conditional name="annotation_cond">
515 <param name="annotation_tabular" value="no_annotation"/> 538 <param name="annotation_tabular" value="no_annotation"/>
516 </conditional> 539 </conditional>
517 <param name="combine_method" value="automatic_combine"/> 540 <param name="combine_method" value="automatic_combine"/>
541 <param name="imzml_output" value="rdata_format"/>
518 <output name="pixel_annotations" file="2123_annotation_output.tabular"/> 542 <output name="pixel_annotations" file="2123_annotation_output.tabular"/>
519 <output name="msidata_combined" file="2123_auto_combined.RData" compare="sim_size" /> 543 <output name="outfile_rdata" file="2123_auto_combined.RData" compare="sim_size" />
520 <output name="QC_overview" file="2123_auto_combined_QC.pdf" compare="sim_size"/> 544 <output name="QC_overview" file="2123_auto_combined_QC.pdf" compare="sim_size"/>
521 </test> 545 </test>
522 </tests> 546 </tests>
523 <help> 547 <help>
524 <![CDATA[ 548 <![CDATA[
564 588
565 589
566 590
567 **Output** 591 **Output**
568 592
569 - 593 - MSI data as imzML file or .RData (can be read with the Cardinal package in R)
570 - MSI data as .RData output (can be read with the Cardinal package in R)
571 - optional: MSI data as imzML file
572 - pdf that shows the pixel positions and annotations of the combined files 594 - pdf that shows the pixel positions and annotations of the combined files
573 - Tabular file with pixel annotations (x,y,column with input file names and up to five annotation columns) 595 - Tabular file with pixel annotations (x,y,column with input file names and up to five annotation columns)
574 596
575 597
576 ]]> 598 ]]>