# HG changeset patch # User galaxyp # Date 1534325941 14400 # Node ID dd44a98ce32c1d6685132e75c35bbcc4c81b525c # Parent 188de53d93f76c4d4027a46d6ae44be711774f1c planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit 620a469e20836b921b6c0147421c8a4268b66ebd diff -r 188de53d93f7 -r dd44a98ce32c msi_ion_images.xml --- a/msi_ion_images.xml Fri Jul 06 14:11:15 2018 -0400 +++ b/msi_ion_images.xml Wed Aug 15 05:39:01 2018 -0400 @@ -1,4 +1,4 @@ - + mass spectrometry imaging m/z heatmaps @@ -178,40 +178,50 @@ if (npeaks > 0){ if (length(inputmz) != 0){ - for (mass in 1:length(inputmz)){ + for (mass in 1:length(inputmz)){ -###standard image + ###standard image -#if str($image_cond.image_type) == "standard_image": - print("standard image") + #if str($image_cond.image_type) == "standard_image": + print("standard image") - print(image(msidata, mz=inputmz[mass],plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", - smooth.image = "$image_smoothing", strip=$strip, colorkey=$colorkey,ylim= c(maximumy+0.1*maximumy,minimumy-0.1*minimumy), - main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} + print(image(msidata, mz=inputmz[mass],plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", + smooth.image = "$image_smoothing", strip=$strip, colorkey=$colorkey,ylim= c(maximumy+0.1*maximumy,minimumy-0.1*minimumy), + main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} -###lattice image + ###lattice image + + #elif str($image_cond.image_type) == "lattice_image": + print("lattice image") + + #if str($strip) =="TRUE": -#elif str($image_cond.image_type) == "lattice_image": - print("lattice image") + print(image(msidata, mz=inputmz[mass], strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), + lattice=TRUE, plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing", + colorkey=$colorkey,ylim= c(maximumy+0.1*maximumy,minimumy-0.1*minimumy), + main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} - #if str($strip) =="TRUE": + #elif str($strip) =="FALSE": - print(image(msidata, mz=inputmz[mass], strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), - lattice=TRUE, plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing", - colorkey=$colorkey,ylim= c(maximumy+0.1*maximumy,minimumy-0.1*minimumy), - main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} + print(image(msidata, mz=inputmz[mass], strip = $strip, + lattice=TRUE, plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing", + colorkey=$colorkey, + main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} - #elif str($strip) =="FALSE": + #end if + + #end if - print(image(msidata, mz=inputmz[mass], strip = $strip, - lattice=TRUE, plusminus = $plusminus_dalton, contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing", - colorkey=$colorkey, - main= paste0(inputnames[mass], " (", round(inputmz[mass], digits = 2)," ± ", $plusminus_dalton, " Da)")))} + ## optional svg output with original coordinates + #if str($svg_cond.svg_pixelimage) == "yes_svg": + print("svg pixel image") - #end if - -#end if + svg(file="svg_pixel_output.svg") + par(mar=c(0,0,0,0)) + image(msidata, mz = inputmz[1],strip=FALSE, ylim=c(maximumy, minimumy), plusminus = $plusminus_dalton,colorkey = FALSE,axes=FALSE, xlab=NA, ylab=NA,contrast.enhance = "$image_contrast", smooth.image = "$image_smoothing") + dev.off() + #end if } else {print("The input m/z were invalid")} dev.off() @@ -219,6 +229,8 @@ print("inputfile has no intensities > 0") dev.off() } + + ]]> @@ -262,9 +274,20 @@ + + + + + + + + + + svg_cond['svg_pixelimage'] == 'yes_svg' + @@ -293,7 +316,11 @@ + + + + @@ -339,6 +366,7 @@ Output: - Pdf with the heatmap images +- optional svg file of a mass-spectrometry imaging m/z heatmap Troubleshooting: diff -r 188de53d93f7 -r dd44a98ce32c test-data/Heatmaps_LM8_file16.pdf Binary file test-data/Heatmaps_LM8_file16.pdf has changed diff -r 188de53d93f7 -r dd44a98ce32c test-data/Heatmaps_analyze75.pdf Binary file test-data/Heatmaps_analyze75.pdf has changed diff -r 188de53d93f7 -r dd44a98ce32c test-data/Heatmaps_imzml.pdf Binary file test-data/Heatmaps_imzml.pdf has changed diff -r 188de53d93f7 -r dd44a98ce32c test-data/Heatmaps_rdata.pdf Binary file test-data/Heatmaps_rdata.pdf has changed diff -r 188de53d93f7 -r dd44a98ce32c test-data/analyze75.svg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test-data/analyze75.svg Wed Aug 15 05:39:01 2018 -0400 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + +