Mercurial > repos > galaxyp > cardinal_filtering
comparison filtering.xml @ 6:97fdb0ce4dd3 draft
"planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 15e24b1f0143679647906bc427654f66b417a45c"
| author | galaxyp |
|---|---|
| date | Wed, 25 Mar 2020 09:24:18 +0000 |
| parents | b045ba419ac6 |
| children | 5aaea231da6b |
comparison
equal
deleted
inserted
replaced
| 5:44dfff9c268f | 6:97fdb0ce4dd3 |
|---|---|
| 1 <tool id="cardinal_filtering" name="MSI filtering" version="@VERSION@.3"> | 1 <tool id="cardinal_filtering" name="MSI filtering" version="2.4.0.0"> |
| 2 <description>tool for filtering mass spectrometry imaging data</description> | 2 <description>tool for filtering mass spectrometry imaging data</description> |
| 3 <macros> | 3 <macros> |
| 4 <import>macros.xml</import> | 4 <import>macros.xml</import> |
| 5 </macros> | 5 </macros> |
| 6 <expand macro="requirements"> | 6 <requirements> |
| 7 <requirement type="package" version="2.4.0">bioconductor-cardinal</requirement> | |
| 8 <requirement type="package" version="3.6.1">r-base</requirement> | |
| 7 <requirement type="package" version="2.3">r-gridextra</requirement> | 9 <requirement type="package" version="2.3">r-gridextra</requirement> |
| 8 <requirement type="package" version="3.0">r-ggplot2</requirement> | 10 <requirement type="package" version="3.2.1">r-ggplot2</requirement> |
| 9 </expand> | 11 </requirements> |
| 10 <expand macro="print_version"/> | 12 <expand macro="print_version"/> |
| 11 <command detect_errors="exit_code"> | 13 <command detect_errors="exit_code"> |
| 12 <![CDATA[ | 14 <![CDATA[ |
| 13 | 15 |
| 14 @INPUT_LINKING@ | 16 @INPUT_LINKING@ |
| 15 cat '${MSI_subsetting}' && | 17 cat '${MSI_subsetting}' && |
| 16 Rscript '${MSI_subsetting}' && | 18 Rscript '${MSI_subsetting}' && |
| 17 | 19 mkdir $outfile_imzml.files_path && |
| 18 #if str($imzml_output) == "imzml_format": | 20 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true && |
| 19 mkdir $outfile_imzml.files_path && | 21 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true && |
| 20 mv ./out.imzML "${os.path.join($outfile_imzml.files_path, 'imzml')}" | true && | |
| 21 mv ./out.ibd "${os.path.join($outfile_imzml.files_path, 'ibd')}" | true && | |
| 22 #end if | |
| 23 echo "imzML file:" > $outfile_imzml && | 22 echo "imzML file:" > $outfile_imzml && |
| 24 ls -l "$outfile_imzml.files_path" >> $outfile_imzml | 23 ls -l "$outfile_imzml.files_path" >> $outfile_imzml |
| 25 ]]> | 24 ]]> |
| 26 </command> | 25 </command> |
| 27 | 26 |
| 35 | 34 |
| 36 library(Cardinal) | 35 library(Cardinal) |
| 37 library(ggplot2) | 36 library(ggplot2) |
| 38 library(gridExtra) | 37 library(gridExtra) |
| 39 | 38 |
| 40 @READING_MSIDATA@ | 39 |
| 40 | |
| 41 ## function to read RData files independent of filename | |
| 42 loadRData <- function(fileName){ | |
| 43 load(fileName) | |
| 44 get(ls()[ls() != "fileName"]) | |
| 45 } | |
| 46 | |
| 47 #if $infile.ext == 'imzml' | |
| 48 #if str($processed_cond.processed_file) == "processed": | |
| 49 msidata <- readImzML('infile', resolution=$processed_cond.accuracy, units = "$processed_cond.units", attach.only=TRUE) | |
| 50 centroided(msidata) = $centroids | |
| 51 #else | |
| 52 msidata <- readImzML('infile', attach.only=TRUE) | |
| 53 centroided(msidata) = $centroids | |
| 54 #end if | |
| 55 #elif $infile.ext == 'analyze75' | |
| 56 msidata = readAnalyze('infile', attach.only=TRUE) | |
| 57 centroided(msidata) = $centroids | |
| 58 #else | |
| 59 msidata = loadRData('infile.RData') | |
| 60 msidata = as(msidata, "MSImagingExperiment") | |
| 61 #end if | |
| 41 | 62 |
| 42 | 63 |
| 43 ########################### QC numbers ######################## | 64 ########################### QC numbers ######################## |
| 44 | 65 |
| 45 ## Number of features (m/z) | 66 ## Number of features (m/z) |
| 46 maxfeatures = length(features(msidata)) | 67 maxfeatures = nrow(msidata) |
| 47 ## Range m/z | 68 ## Range m/z |
| 48 minmz = round(min(mz(msidata)), digits=2) | 69 minmz = round(min(mz(msidata)), digits=2) |
| 49 maxmz = round(max(mz(msidata)), digits=2) | 70 maxmz = round(max(mz(msidata)), digits=2) |
| 50 ## Number of spectra (pixels) | 71 ## Number of spectra (pixels) |
| 51 pixelcount = length(pixels(msidata)) | 72 pixelcount = ncol(msidata) |
| 52 ## Range x coordinates | 73 ## Range x coordinates |
| 53 minimumx = min(coord(msidata)[,1]) | 74 minimumx = min(coord(msidata)\$x) |
| 54 maximumx = max(coord(msidata)[,1]) | 75 maximumx = max(coord(msidata)\$x) |
| 55 ## Range y coordinates | 76 ## Range y coordinates |
| 56 minimumy = min(coord(msidata)[,2]) | 77 minimumy = min(coord(msidata)\$y) |
| 57 maximumy = max(coord(msidata)[,2]) | 78 maximumy = max(coord(msidata)\$y) |
| 58 ## Store features for QC plot | 79 ## Store features for QC plot |
| 59 featuresinfile = mz(msidata) | 80 featuresinfile = mz(msidata) |
| 60 | 81 |
| 61 all_df = cbind(coord(msidata)[,1:2], rep("removed pixels", times=ncol(msidata))) | 82 all_df = data.frame(coord(msidata)\$x, coord(msidata)\$y, rep("removed pixels", times=ncol(msidata))) |
| 62 colnames(all_df)[3] = "annotation" | 83 colnames(all_df) = c("x", "y", "annotation") |
| 63 | 84 |
| 64 ## Next steps will only run if there are more than 0 pixels/features in the file | 85 ## Next steps will only run if there are more than 0 pixels/features in the file |
| 65 | 86 |
| 66 if (ncol(msidata)>0 & nrow(msidata) >0) | 87 if (ncol(msidata)>0 & nrow(msidata) >0) |
| 67 { | 88 { |
| 90 } | 111 } |
| 91 }, | 112 }, |
| 92 error=function(cond) { | 113 error=function(cond) { |
| 93 ## in case all coordinates were outside the dataset leading to zero pixels, tool is stopped to avoid continuing with wrong data | 114 ## in case all coordinates were outside the dataset leading to zero pixels, tool is stopped to avoid continuing with wrong data |
| 94 message("Error during pixel filtering") | 115 message("Error during pixel filtering") |
| 95 message("Possible problems: Forgot to set 'Tabular file contains a header line' = Yes, wrong columns selected, columns with coordinates contain empty fields or letters, all coordinates were outside the range of the dataset - this can be checked with the 'MSI qualitycontrol' tool)") | 116 message("Possible problems: Forgot to set 'Tabular file contains a header line' = Yes, wrong columns selected, columns with coordinates contain empty fields or letters, all coordinates were outside the range of the dataset - this can be checked with the 'MSI qualitycontrol' tool") |
| 96 stop(call.=FALSE) | 117 stop(call.=FALSE) |
| 97 } | 118 } |
| 98 ) | 119 ) |
| 99 | 120 |
| 100 ## QC values: | 121 ## QC values: |
| 140 | 161 |
| 141 ############################# QC data ##################################### | 162 ############################# QC data ##################################### |
| 142 | 163 |
| 143 ## dataframe for QC of pixel distribution | 164 ## dataframe for QC of pixel distribution |
| 144 | 165 |
| 145 remaining_df = cbind(coord(msidata)[,1:2], rep("remaining pixels", times=ncol(msidata))) | 166 remaining_df = data.frame(as.numeric(coord(msidata)\$x), as.numeric(coord(msidata)\$y), rep("remaining pixels", times=ncol(msidata))) |
| 146 colnames(remaining_df)[3] = "annotation" | 167 colnames(remaining_df) = c("x", "y", "annotation") |
| 147 position_df = rbind(all_df, remaining_df) | 168 position_df = rbind(all_df, remaining_df) |
| 148 position_df[row.names(unique(position_df[,c("x", "y")])),] | 169 position_df[row.names(unique(position_df[,c("x", "y")])),] |
| 149 position_df\$annotation = factor(position_df\$annotation) | 170 position_df\$annotation = factor(position_df\$annotation) |
| 150 gc() | 171 gc() |
| 151 | 172 |
| 152 }else{ | 173 }else{ |
| 203 }, | 224 }, |
| 204 error=function(cond) { | 225 error=function(cond) { |
| 205 ## in case all provided m/z values were outside the m/z range | 226 ## in case all provided m/z values were outside the m/z range |
| 206 ## tool is stopped to avoid continuing with wrong data | 227 ## tool is stopped to avoid continuing with wrong data |
| 207 message("Error during m/z filtering") | 228 message("Error during m/z filtering") |
| 208 message("Possible problems: Forgot to set 'Tabular file contains a header line' = Yes, wrong columns selected, column with m/z features contains empty fields or letters, all m/z features s were outside the range of the dataset - this can be checked with the 'MSI qualitycontrol' tool) or did not match any m/z feature of the dataset (see help section for more information on that)") | 229 message("Possible problems: Forgot to set 'Tabular file contains a header line' = Yes, wrong columns selected, column with m/z features contains empty fields or letters, all m/z features s were outside the range of the dataset (this can be checked with the 'MSI qualitycontrol' tool) or did not match any m/z feature of the dataset (see help section for more information on that)") |
| 209 stop(call.=FALSE) | 230 stop(call.=FALSE) |
| 210 } | 231 } |
| 211 ) | 232 ) |
| 212 | 233 |
| 213 | 234 |
| 260 #if str($features_cond.units_removal) == "ppm": | 281 #if str($features_cond.units_removal) == "ppm": |
| 261 plusminus = masses * $features_cond.removal_plusminus/1000000 | 282 plusminus = masses * $features_cond.removal_plusminus/1000000 |
| 262 #end if | 283 #end if |
| 263 current_mass = which(c(mz(msidata) <= masses + plusminus & mz(msidata) >= masses - plusminus)) | 284 current_mass = which(c(mz(msidata) <= masses + plusminus & mz(msidata) >= masses - plusminus)) |
| 264 mass_to_remove = append(mass_to_remove, current_mass)} | 285 mass_to_remove = append(mass_to_remove, current_mass)} |
| 265 msidata= msidata[-mass_to_remove, ] | 286 mass_to_keep = setdiff(1:nrow(msidata),mass_to_remove) |
| 266 validmz = numberfeatures - nrow(msidata) | 287 |
| 288 msidata= msidata[mass_to_keep, ] | |
| 289 validmz = maxfeatures - nrow(msidata) | |
| 290 | |
| 267 ## does not throw error when processed file has no features left, therefore create error to avoid continuing with wrong data | 291 ## does not throw error when processed file has no features left, therefore create error to avoid continuing with wrong data |
| 268 if (nrow(msidata) == 0) | 292 if (nrow(msidata) == 0) |
| 269 { | 293 { |
| 270 stop(call.=FALSE) | 294 stop(call.=FALSE) |
| 271 } | 295 } |
| 276 } | 300 } |
| 277 ) | 301 ) |
| 278 | 302 |
| 279 | 303 |
| 280 | 304 |
| 281 | |
| 282 ######################## No m/z filtering ############################## | 305 ######################## No m/z filtering ############################## |
| 283 | 306 |
| 284 #elif str($features_cond.features_filtering) == "none": | 307 #elif str($features_cond.features_filtering) == "none": |
| 285 | 308 |
| 286 print("no feature filtering") | 309 print("no feature filtering") |
| 302 gc() | 325 gc() |
| 303 | 326 |
| 304 #################### QC numbers ####################### | 327 #################### QC numbers ####################### |
| 305 | 328 |
| 306 ## Number of features (m/z) | 329 ## Number of features (m/z) |
| 307 maxfeatures2 = length(features(msidata)) | 330 maxfeatures2 = nrow(msidata) |
| 308 ## Range m/z | 331 ## Range m/z |
| 309 minmz2 = round(min(mz(msidata)), digits=2) | 332 minmz2 = round(min(mz(msidata)), digits=2) |
| 310 maxmz2 = round(max(mz(msidata)), digits=2) | 333 maxmz2 = round(max(mz(msidata)), digits=2) |
| 311 ## Number of spectra (pixels) | 334 ## Number of spectra (pixels) |
| 312 pixelcount2 = length(pixels(msidata)) | 335 pixelcount2 = ncol(msidata) |
| 313 ## Range x coordinates | 336 ## Range x coordinates |
| 314 minimumx2 = min(coord(msidata)[,1]) | 337 minimumx2 = min(coord(msidata)\$x) |
| 315 maximumx2 = max(coord(msidata)[,1]) | 338 maximumx2 = max(coord(msidata)\$x) |
| 316 ## Range y coordinates | 339 ## Range y coordinates |
| 317 minimumy2 = min(coord(msidata)[,2]) | 340 minimumy2 = min(coord(msidata)\$y) |
| 318 maximumy2 = max(coord(msidata)[,2]) | 341 maximumy2 = max(coord(msidata)\$y) |
| 319 | 342 |
| 320 properties = c("Number of m/z features", | 343 properties = c("Number of m/z features", |
| 321 "Range of m/z values", | 344 "Range of m/z values", |
| 322 "Number of pixels", | 345 "Number of pixels", |
| 323 "Range of x coordinates", | 346 "Range of x coordinates", |
| 345 | 368 |
| 346 ########################### PDF QC and MSI output ########################### | 369 ########################### PDF QC and MSI output ########################### |
| 347 | 370 |
| 348 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) | 371 pdf("filtertool_QC.pdf", fonts = "Times", pointsize = 12) |
| 349 plot(0,type='n',axes=FALSE,ann=FALSE) | 372 plot(0,type='n',axes=FALSE,ann=FALSE) |
| 350 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.display_name")) | 373 title(main=paste0("Qualitycontrol of filtering tool for file: \n\n", "$infile.element_identifier")) |
| 351 grid.table(property_df, rows= NULL) | 374 grid.table(property_df, rows= NULL) |
| 352 | 375 |
| 353 ## QC report only when pixels/features are left | 376 ## QC report only when pixels/features are left |
| 354 if (ncol(msidata)>0 & nrow(msidata) >0) | 377 if (ncol(msidata)>0 & nrow(msidata) >0) |
| 355 { | 378 { |
| 360 geom_tile(height = 1, width=1)+ | 383 geom_tile(height = 1, width=1)+ |
| 361 coord_fixed()+ | 384 coord_fixed()+ |
| 362 ggtitle("Spatial orientation of filtered pixels")+ | 385 ggtitle("Spatial orientation of filtered pixels")+ |
| 363 theme_bw()+ | 386 theme_bw()+ |
| 364 theme(plot.title = element_text(hjust = 0.5))+ | 387 theme(plot.title = element_text(hjust = 0.5))+ |
| 365 theme(legend.position="bottom",legend.direction="vertical") | 388 theme(legend.position="bottom",legend.direction="vertical")+ |
| 389 guides(fill=guide_legend(ncol=5,byrow=TRUE)) | |
| 366 print(pixel_image) | 390 print(pixel_image) |
| 367 | 391 |
| 368 ### plot features which are removed | 392 |
| 369 hist(mz(msidata), xlab="m/z", main="Kept m/z values") | 393 ### visual mz feature control |
| 370 #if str($features_cond.features_filtering) == "none": | 394 |
| 371 print("no difference histogram as no m/z filtering took place") | 395 kept_df = data.frame(mz(msidata), rep("remaining m/z", nrow(msidata))) |
| 372 #else: | 396 colnames(kept_df) = c("mz", "legend") |
| 373 if (isTRUE(all.equal(featuresinfile, mz(msidata)))){ | 397 |
| 374 print("No difference in m/z values before and after filtering, no histogram drawn") | 398 mz_removed = setdiff(featuresinfile, mz(msidata)) |
| 375 }else{ | 399 removed_df = data.frame(mz_removed, rep("removed m/z", length(mz_removed))) |
| 376 hist(setdiff(featuresinfile, mz(msidata)), xlab="m/z", main="Removed m/z values")} | 400 colnames(removed_df) = c("mz", "legend") |
| 377 #end if | 401 histogram_df = rbind(removed_df,kept_df) |
| 402 | |
| 403 histogram_mz= ggplot(histogram_df, aes(x=mz, fill=legend)) + | |
| 404 geom_histogram()+ theme_bw()+ | |
| 405 theme(plot.title = element_text(hjust = 0.5))+ | |
| 406 theme(legend.position="bottom",legend.direction="vertical")+ | |
| 407 labs(title="Overview of filtered m/z", x="m/z", y = "count") + | |
| 408 guides(fill=guide_legend(ncol=5,byrow=TRUE)) | |
| 409 print(histogram_mz) | |
| 410 | |
| 378 | 411 |
| 379 dev.off() | 412 dev.off() |
| 380 | 413 |
| 381 ## save msidata as imzML file, will only work if there is at least 1 m/z left | 414 ## save msidata as imzML file, will only work if there is at least 1 m/z left |
| 382 | 415 |
| 383 #if str($imzml_output) == "imzml_format": | |
| 384 if (maxfeatures2 > 0){ | 416 if (maxfeatures2 > 0){ |
| 385 ## make sure that coordinates are integers | 417 ## make sure that coordinates are integers |
| 386 coord(msidata)\$y = as.integer(coord(msidata)\$y) | 418 coord(msidata)\$y = as.integer(coord(msidata)\$y) |
| 387 coord(msidata)\$x = as.integer(coord(msidata)\$x) | 419 coord(msidata)\$x = as.integer(coord(msidata)\$x) |
| 388 writeImzML(msidata, "out")} | 420 writeImzML(msidata, "out")} |
| 389 #elif str($imzml_output) == "rdata_format": | |
| 390 ## save msidata as Rfile | |
| 391 iData(msidata) = iData(msidata)[] | |
| 392 save(msidata, file="$outfile_rdata") | |
| 393 #end if | |
| 394 | 421 |
| 395 | 422 |
| 396 }else{ | 423 }else{ |
| 397 print("Inputfile or filtered file has no intensities > 0") | 424 print("Inputfile or filtered file has no intensities > 0") |
| 398 dev.off() | 425 dev.off() |
| 446 <option value="ppm" selected="True">ppm</option> | 473 <option value="ppm" selected="True">ppm</option> |
| 447 <option value="Da">Da</option> | 474 <option value="Da">Da</option> |
| 448 </param> | 475 </param> |
| 449 </when> | 476 </when> |
| 450 </conditional> | 477 </conditional> |
| 451 <param name="imzml_output" type="select" display = "radio" optional = "False" | |
| 452 label="Output format" help= "Choose the output format"> | |
| 453 <option value="imzml_format" >imzML</option> | |
| 454 <option value="rdata_format" selected="True" >RData</option> | |
| 455 </param> | |
| 456 </inputs> | 478 </inputs> |
| 457 | 479 |
| 458 <outputs> | 480 <outputs> |
| 459 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"> | 481 <data format="imzml" name="outfile_imzml" label="${tool.name} on ${on_string}: imzML"/> |
| 460 <filter>imzml_output =='imzml_format'</filter> | |
| 461 </data> | |
| 462 <data format="rdata" name="outfile_rdata" label="${tool.name} on ${on_string}: RData"> | |
| 463 <filter>imzml_output == 'rdata_format'</filter> | |
| 464 </data> | |
| 465 <data format="pdf" name="QC_overview" from_work_dir="filtertool_QC.pdf" label = "${tool.name} on ${on_string}: QC"/> | 482 <data format="pdf" name="QC_overview" from_work_dir="filtertool_QC.pdf" label = "${tool.name} on ${on_string}: QC"/> |
| 466 </outputs> | 483 </outputs> |
| 467 <tests> | 484 <tests> |
| 468 <test> | 485 <test> |
| 469 <expand macro="infile_imzml"/> | 486 <expand macro="infile_imzml"/> |
| 473 <param name="min_y_range" value="2"/> | 490 <param name="min_y_range" value="2"/> |
| 474 <param name="max_y_range" value="2"/> | 491 <param name="max_y_range" value="2"/> |
| 475 <param name="features_filtering" value="features_range"/> | 492 <param name="features_filtering" value="features_range"/> |
| 476 <param name="min_mz" value="350"/> | 493 <param name="min_mz" value="350"/> |
| 477 <param name="max_mz" value="500"/> | 494 <param name="max_mz" value="500"/> |
| 478 <param name="imzml_output" value="imzml_format"/> | |
| 479 <output name="QC_overview" file="imzml_filtered3.pdf" compare="sim_size"/> | 495 <output name="QC_overview" file="imzml_filtered3.pdf" compare="sim_size"/> |
| 480 <output name="outfile_imzml" ftype="imzml" file="out3.imzml.txt" compare="sim_size"> | 496 <output name="outfile_imzml" ftype="imzml" file="out3.imzml.txt" compare="sim_size"> |
| 481 <extra_files type="file" file="out3.imzml" name="imzml" lines_diff="4"/> | 497 <extra_files type="file" file="out3.imzml" name="imzml" lines_diff="6"/> |
| 482 <extra_files type="file" file="out3.ibd" name="ibd" compare="sim_size"/> | 498 <extra_files type="file" file="out3.ibd" name="ibd" compare="sim_size"/> |
| 483 </output> | 499 </output> |
| 484 </test> | 500 </test> |
| 485 <test> | 501 <test> |
| 486 <expand macro="infile_imzml"/> | 502 <expand macro="infile_imzml"/> |
| 487 <param name="pixel_filtering" value="two_columns"/> | 503 <param name="pixel_filtering" value="two_columns"/> |
| 488 <param name="annotation_file" ftype="tabular" value="inputpixels_2column.tabular"/> | 504 <param name="annotation_file" ftype="tabular" value="inputpixels_2column.tabular"/> |
| 489 <param name="column_x" value="1"/> | 505 <param name="column_x" value="1"/> |
| 490 <param name="column_y" value="3"/> | 506 <param name="column_y" value="3"/> |
| 491 <param name="imzml_output" value="imzml_format"/> | |
| 492 <output name="QC_overview" file="imzml_filtered4.pdf" compare="sim_size"/> | 507 <output name="QC_overview" file="imzml_filtered4.pdf" compare="sim_size"/> |
| 493 <output name="outfile_imzml" ftype="imzml" file="out4.imzml.txt" compare="sim_size"> | 508 <output name="outfile_imzml" ftype="imzml" file="out4.imzml.txt" compare="sim_size"> |
| 494 <extra_files type="file" file="out4.imzml" name="imzml" lines_diff="4"/> | 509 <extra_files type="file" file="out4.imzml" name="imzml" lines_diff="6"/> |
| 495 <extra_files type="file" file="out4.ibd" name="ibd" compare="sim_size"/> | 510 <extra_files type="file" file="out4.ibd" name="ibd" compare="sim_size"/> |
| 496 </output> | 511 </output> |
| 497 </test> | 512 </test> |
| 498 <test> | 513 <test> |
| 499 <expand macro="infile_imzml"/> | 514 <expand macro="infile_imzml"/> |
| 504 <param name="max_y_range" value="20"/> | 519 <param name="max_y_range" value="20"/> |
| 505 <param name="features_filtering" value="features_list"/> | 520 <param name="features_filtering" value="features_list"/> |
| 506 <param name="mz_tabular" ftype="tabular" value = "featuresofinterest5.tabular"/> | 521 <param name="mz_tabular" ftype="tabular" value = "featuresofinterest5.tabular"/> |
| 507 <param name="feature_column" value="1"/> | 522 <param name="feature_column" value="1"/> |
| 508 <param name="feature_header" value="0"/> | 523 <param name="feature_header" value="0"/> |
| 509 <param name="imzml_output" value="imzml_format"/> | |
| 510 <output name="QC_overview" file="imzml_filtered5.pdf" compare="sim_size"/> | 524 <output name="QC_overview" file="imzml_filtered5.pdf" compare="sim_size"/> |
| 511 <output name="outfile_imzml" ftype="imzml" file="out5.imzml.txt" compare="sim_size"> | 525 <output name="outfile_imzml" ftype="imzml" file="out5.imzml.txt" compare="sim_size"> |
| 512 <extra_files type="file" file="out5.imzml" name="imzml" lines_diff="4"/> | 526 <extra_files type="file" file="out5.imzml" name="imzml" lines_diff="6"/> |
| 513 <extra_files type="file" file="out5.ibd" name="ibd" compare="sim_size"/> | 527 <extra_files type="file" file="out5.ibd" name="ibd" compare="sim_size"/> |
| 514 </output> | 528 </output> |
| 515 </test> | 529 </test> |
| 516 <test> | 530 <test> |
| 517 <expand macro="infile_analyze75"/> | 531 <expand macro="infile_analyze75"/> |
| 518 <param name="imzml_output" value="imzml_format"/> | |
| 519 <output name="QC_overview" file="analyze75_filtered2.pdf" compare="sim_size"/> | 532 <output name="QC_overview" file="analyze75_filtered2.pdf" compare="sim_size"/> |
| 520 <output name="outfile_imzml" ftype="imzml" file="out6.imzml.txt" compare="sim_size"> | 533 <output name="outfile_imzml" ftype="imzml" file="out6.imzml.txt" compare="sim_size"> |
| 521 <extra_files type="file" file="out6.imzml" name="imzml" lines_diff="4"/> | 534 <extra_files type="file" file="out6.imzml" name="imzml" lines_diff="6"/> |
| 522 <extra_files type="file" file="out6.ibd" name="ibd" compare="sim_size"/> | 535 <extra_files type="file" file="out6.ibd" name="ibd" compare="sim_size"/> |
| 523 </output> | 536 </output> |
| 524 </test> | 537 </test> |
| 525 <test> | 538 <test> |
| 526 <param name="infile" value="preprocessed.RData" ftype="rdata"/> | 539 <param name="infile" value="preprocessed.RData" ftype="rdata"/> |
| 527 <conditional name="outputs"> | |
| 528 <param name="outputs_select" value="no_quality_control"/> | |
| 529 </conditional> | |
| 530 <param name="imzml_output" value="imzml_format"/> | |
| 531 <output name="QC_overview" file="rdata_notfiltered.pdf" compare="sim_size" /> | 540 <output name="QC_overview" file="rdata_notfiltered.pdf" compare="sim_size" /> |
| 532 <output name="outfile_imzml" ftype="imzml" file="out7.imzml.txt" compare="sim_size"> | 541 <output name="outfile_imzml" ftype="imzml" file="out7.imzml.txt" compare="sim_size"> |
| 533 <extra_files type="file" file="out7.imzml" name="imzml" lines_diff="4"/> | 542 <extra_files type="file" file="out7.imzml" name="imzml" lines_diff="6"/> |
| 534 <extra_files type="file" file="out7.ibd" name="ibd" compare="sim_size"/> | 543 <extra_files type="file" file="out7.ibd" name="ibd" compare="sim_size"/> |
| 544 </output> | |
| 545 </test> | |
| 546 <test> | |
| 547 <expand macro="processed_infile_imzml"/> | |
| 548 <conditional name="processed_cond"> | |
| 549 <param name="processed_file" value="processed"/> | |
| 550 <param name="accuracy" value="100"/> | |
| 551 <param name="units" value="ppm"/> | |
| 552 </conditional> | |
| 553 <param name="pixel_filtering" value="two_columns"/> | |
| 554 <param name="annotation_file" ftype="tabular" value="inputpixels_2column.tabular"/> | |
| 555 <param name="column_x" value="1"/> | |
| 556 <param name="column_y" value="3"/> | |
| 557 <param name="features_filtering" value="remove_features"/> | |
| 558 <param name="mz_tabular" ftype="tabular" value = "featuresofinterest5.tabular"/> | |
| 559 <param name="feature_column" value="1"/> | |
| 560 <param name="feature_header" value="0"/> | |
| 561 <param name="removal_plusminus" value="100"/> | |
| 562 <param name="units_removal" value="ppm"/> | |
| 563 <output name="QC_overview" file="imzml_filtered8.pdf" compare="sim_size"/> | |
| 564 <output name="outfile_imzml" ftype="imzml" file="out8.imzml.txt" compare="sim_size"> | |
| 565 <extra_files type="file" file="out8.imzml" name="imzml" lines_diff="6"/> | |
| 566 <extra_files type="file" file="out8.ibd" name="ibd" compare="sim_size"/> | |
| 535 </output> | 567 </output> |
| 536 </test> | 568 </test> |
| 537 </tests> | 569 </tests> |
| 538 <help> | 570 <help> |
| 539 <![CDATA[ | 571 <![CDATA[ |
| 579 - An error occurs if the input for filtering (tabular file or mz-range) contains not a single m/z feature that occurs in the dataset | 611 - An error occurs if the input for filtering (tabular file or mz-range) contains not a single m/z feature that occurs in the dataset |
| 580 | 612 |
| 581 | 613 |
| 582 - m/z feature removing: | 614 - m/z feature removing: |
| 583 | 615 |
| 584 - Perturbing m/z features such as matrix contaminants can be removed by specifying their m/z value in a tabular file, optionally with a half window size in ppm or m/z for the window in which peaks should be removed | 616 - Perturbing m/z features such as matrix contaminants, tryptic peptides and internal calibrants can be removed by specifying their m/z value in a tabular file, optionally with a half window size in ppm or m/z for the window in which peaks should be removed |
| 585 | 617 |
| 586 | 618 |
| 587 **Tips** | 619 **Tips** |
| 588 | 620 |
| 589 - m/z feautre filtering with a tabular file: | 621 - m/z feautre filtering with a tabular file: |
| 596 - In case tabular file cannot be selected in drop-down menu: Datatype in Galaxy might be different from 'tabular' - datatype can be changed by pressing the pen button of the dataset (edit attributes) | 628 - In case tabular file cannot be selected in drop-down menu: Datatype in Galaxy might be different from 'tabular' - datatype can be changed by pressing the pen button of the dataset (edit attributes) |
| 597 | 629 |
| 598 | 630 |
| 599 **Output** | 631 **Output** |
| 600 | 632 |
| 601 - MSI data as imzML file or .RData (can be read with the Cardinal package in R) | 633 - MSI data as (continuous) imzML file |
| 602 - pdf with heatmap showing the pixels that are removed and kept as well as histograms of kept and removed m/z | 634 - pdf with heatmap showing the pixels that are removed and kept as well as histograms of kept and removed m/z |
| 603 | 635 |
| 604 | 636 |
| 605 ]]> | 637 ]]> |
| 606 </help> | 638 </help> |
