Repository 'msi_ion_images'
hg clone https://toolshed.g2.bx.psu.edu/repos/galaxyp/msi_ion_images

Changeset 5:2b9fa240e261 (2018-06-11)
Previous changeset 4:9746576123c9 (2018-05-28) Next changeset 6:5a5b5a8fa8a0 (2018-06-19)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_ion_images commit a7be47698f53eb4f00961192327d93e8989276a7
modified:
msi_ion_images.xml
test-data/Example_Continuous.ibd
test-data/Example_Continuous.imzML
test-data/Heatmaps_LM8_file16.pdf
test-data/Heatmaps_analyze75.pdf
test-data/Heatmaps_imzml.pdf
test-data/Heatmaps_rdata.pdf
b
diff -r 9746576123c9 -r 2b9fa240e261 msi_ion_images.xml
--- a/msi_ion_images.xml Mon May 28 12:37:17 2018 -0400
+++ b/msi_ion_images.xml Mon Jun 11 17:33:52 2018 -0400
[
b'@@ -1,6 +1,6 @@\n-<tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.0">\n+<tool id="mass_spectrometry_imaging_ion_images" name="MSI ion images" version="1.10.0.1">\n     <description>\n-        mass spectrometry imaging heatmaps\n+        mass spectrometry imaging m/z heatmaps\n     </description>\n     <requirements>\n         <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>\n@@ -45,9 +45,9 @@\n \n ###################################### file properties in numbers ##############\n \n-## Number of features (mz)\n+## Number of features (m/z)\n maxfeatures = length(features(msidata))\n-## Range mz\n+## Range m/z\n minmz = round(min(mz(msidata)), digits=2)\n maxmz = round(max(mz(msidata)), digits=2)\n ## Number of spectra (pixels)\n@@ -64,7 +64,7 @@\n medint = round(median(spectra(msidata)[]), digits=2)\n ## Number of intensities > 0\n npeaks= sum(spectra(msidata)[]>0)\n-## Spectra multiplied with mz (potential number of peaks)\n+## Spectra multiplied with m/z (potential number of peaks)\n numpeaks = ncol(spectra(msidata)[])*nrow(spectra(msidata)[])\n ## Percentage of intensities > 0\n percpeaks = round(npeaks/numpeaks*100, digits=2)\n@@ -103,43 +103,34 @@\n     peakpickinginfo=processinginfo@peakPicking\n }\n \n-##################################### read and filter input masses ##############\n+##################################### read and filter input m/z ##############\n \n input_list = read.delim("$massfile", header = FALSE, stringsAsFactors = FALSE)\n \n-### in case input file had only one column with mz values but not names, duplicate mz values and use as names:\n+### in case input file had only one column with m/z values but not names, duplicate m/z values and use as names:\n+if (ncol(input_list) == 1){\n+    input_list = cbind(input_list, input_list)}\n \n-if (ncol(input_list) == 1)\n-{\n-    input_list = cbind(input_list, input_list)\n-}\n+### calculate how many input m/z are valid: \n+inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]\n+inputmz = as.numeric(inputmasses[,1])\n+inputnames = as.character(inputmasses[,2])\n \n-### calculate how many input masses are valid: \n-inputmasses = input_list[input_list[,1]>minmz & input_list[,1]<maxmz,]\n-\n-inputmz = inputmasses[,1]\n-inputnames = inputmasses[,2]\n \n-if (length(inputmz) == 1)\n-{\n-    countpixels = sum(spectra(msidata)[features(msidata, mz = inputmz), ] >0)\n-    percentpixels = round(countpixels/pixelcount*100, digits=1)\n-    valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels))\n-    write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\\t")\n-}else if (length(inputmz) >1) {\n-    countpixels = rowSums(spectra(msidata)[features(msidata, mz=inputmz),] >0)\n-    percentpixels = round(countpixels/pixelcount*100, digits=1)\n-    valuesdataframe = cbind(inputmz, cbind(countpixels, percentpixels))\n-    write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\\t")\n-}else{\n-    valuesdataframe = data.frame(0,0)\n-    write.table(valuesdataframe, file="$pixel_count", quote = FALSE, row.names = FALSE, col.names=TRUE, sep = "\\t")\n-}\n+############################## PDF #############################################\n+################################################################################\n \n-############################ summarize file properties in numbers ##############\n+pdf("heatmaps.pdf", fonts = "Times", pointsize = 12)\n+plot(0,type=\'n\',axes=FALSE,ann=FALSE)\n+#if not $filename:\n+    #set $filename = $infile.display_name\n+#end if\n+title(main=paste("\\nHeatmap images\\n\\n", "Filename:\\n", "$filename"))\n \n-properties = c("Number of mz features",\n-               "Range of mz values [Da]",\n+############################# I) numbers ####################################\n+\n+properties = c("Number of m/z features",\n+               "Range of m/z values [Da]",\n                "Number of pixels", \n                "Range of x coordinates", \n '..b'    <param name="image_smoothing" value="gaussian"/>\n+            <param name="strip" value="False"/>\n+            <param name="colorkey" value="True"/>\n             <output name="plots" file="Heatmaps_analyze75.pdf" compare="sim_size" delta="20000"/>\n-            <output name="pixel_count" file="tabular_analyze75.tabular"/>\n         </test>\n         <test>\n             <param name="infile" value="preprocessed.rdata" ftype="rdata"/>\n             <param name="massfile" value="inputpeptides.tabular" ftype="tabular"/>\n             <param name="plusminus_dalton" value="0.5"/>\n+            <param name="strip" value="True"/>\n+            <param name="colorkey" value="True"/>\n+            <param name="image_type" value="lattice_image"/>\n             <param name="filename" value="Testfile_rdata"/>\n             <output name="plots" file="Heatmaps_rdata.pdf" compare="sim_size" delta="20000"/>\n-            <output name="pixel_count" file="tabular_rdata.tabular"/>\n         </test>\n         <test>\n             <param name="infile" value="empty_spectra.rdata" ftype="rdata"/>\n             <param name="massfile" value="inputpeptides2.tabular" ftype="tabular"/>\n             <param name="plusminus_dalton" value="0.5"/>\n+            <param name="strip" value="True"/>\n+            <param name="colorkey" value="False"/>\n             <param name="filename" value="Testfile_rdata"/>\n             <output name="plots" file="Heatmaps_LM8_file16.pdf" compare="sim_size" delta="20000"/>\n-            <output name="pixel_count" file="tabular_LM8file16.tabular"/>\n         </test>\n     </tests>\n     <help><![CDATA[\n@@ -280,32 +301,32 @@\n \n Cardinal is an R package that implements statistical & computational tools for analyzing mass spectrometry imaging datasets. `More information on Cardinal <http://cardinalmsi.org//>`_\n \n-This tool uses the Cardinal image function to plot the intensity distribution of interesting masses of mass-spectrometry imaging data. \n+This tool uses the Cardinal image function to plot the intensity distribution of interesting m/z of mass spectrometry imaging data. \n Input data: \n \n-3 types of mass-spectrometry imaging data can be used:\n+3 types of mass spectrometry imaging data can be used:\n \n - imzml file (upload imzml and ibd file via the "composite" function) `Introduction to the imzml format <https://ms-imaging.org/wp/imzml/>`_\n - Analyze7.5 (upload hdr, img and t2m file via the "composite" function)\n - Cardinal "MSImageSet" data (with variable name "msidata", saved as .RData)\n \n-Tabular file with masses:\n+Tabular file with m/z:\n \n - tab separated file (.tabular), datatype in Galaxy must be tabular otherwise file will not appear in selection window (if Galaxy auto-detection was wrong, datatype can be changed by pressing button with the pen (edit attributes))\n-- first column must contain masses (separate point numbers by point, not comma)\n-- optionally a second column with names for the masses can be provided\n+- first column must contain m/z (separate point numbers by point, not comma)\n+- optionally a second column with names for the m/z can be provided\n - no empty fields or letters are allowed in the first column\n \n Output:\n \n - Pdf with the heatmap images\n-- Tabular with masses that were in the mass range and their occurence over all pixels (absolute and in %)\n \n Troubleshooting:\n \n - no heatmaps are plotted when tabular file doesn\'t fulfill the criteria described above\n - no heatmaps are plotted when the input mass spectrometry imaging file has no intensities > 0\n-- out of thetabular file only masses with > 1.5-2% pixel coverage can be used with the contrast enhance and image smoothing functions, as both crash when a mass has not enough intensity values\n+- the contrast enhance and image smoothing functions require a certain number of m/z with intensities > 0 (empirical value > 2% of spectra)\n+- the standard image function should work for all files while the lattice function works not on every file (nicely)\n \n     ]]>\n     </help>\n'
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Example_Continuous.ibd
b
Binary file test-data/Example_Continuous.ibd has changed
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Example_Continuous.imzML
--- a/test-data/Example_Continuous.imzML Mon May 28 12:37:17 2018 -0400
+++ b/test-data/Example_Continuous.imzML Mon Jun 11 17:33:52 2018 -0400
[
b'@@ -1,373 +1,313 @@\n-<?xml version="1.0" encoding="ISO-8859-1"?>\r\n-<mzML xmlns="http://psi.hupo.org/ms/mzml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://psi.hupo.org/ms/mzml http://psidev.info/files/ms/mzML/xsd/mzML1.1.0_idx.xsd" version="1.1">\r\n-  <cvList count="3">\r\n-    <cv id="MS" fullName="Proteomics Standards Initiative Mass Spectrometry Ontology" version="1.3.1" URI="http://psidev.info/ms/mzML/psi-ms.obo"/>\r\n-    <cv id="UO" fullName="Unit Ontology" version="1.15" URI="http://obo.cvs.sourceforge.net/obo/obo/ontology/phenotype/unit.obo"/>\r\n-    <cv id="IMS" fullName="Imaging MS Ontology" version="0.9.1" URI="http://www.maldi-msi.org/download/imzml/imagingMS.obo"/>\r\n-  </cvList>\r\n-  <fileDescription>\r\n-    <fileContent>\r\n-      <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000128" name="profile spectrum" value=""/>\r\n-      <cvParam cvRef="IMS" accession="IMS:1000080" name="universally unique identifier" value="{554A27FA-79D2-4766-9A2C-862E6D78B1F3}"/>\r\n-      <cvParam cvRef="IMS" accession="IMS:1000091" name="ibd SHA-1" value="A5BE532D25997B71BE6D20C76561DDC4D5307DDD"/>\r\n-      <cvParam cvRef="IMS" accession="IMS:1000030" name="continuous" value=""/>\r\n-    </fileContent>\r\n-    <sourceFileList count="1">\r\n-      <sourceFile id="sf1" name="Example.raw" location="C:\\Users\\Thorsten Schramm\\Documents\\Promotion\\imzML\\Website\\files\\Beispiel-Dateien\\Example images\\">\r\n-        <cvParam cvRef="MS" accession="MS:1000563" name="Thermo RAW file" value=""/>\r\n-        <cvParam cvRef="MS" accession="MS:1000768" name="Thermo nativeID format" value=""/>\r\n-        <cvParam cvRef="MS" accession="MS:1000569" name="SHA-1" value="7623BE263B25FF99FDF017154B86FAB742D4BB0B"/>\r\n-      </sourceFile>\r\n-    </sourceFileList>\r\n-    <contact>\r\n-      <cvParam cvRef="MS" accession="MS:1000586" name="contact name" value="Thorsten Schramm"/>\r\n-      <cvParam cvRef="MS" accession="MS:1000590" name="contact organization" value="Institut f\xfcr Anorganische und Analytische Chemie"/>\r\n-      <cvParam cvRef="MS" accession="MS:1000587" name="contact address" value="Schubertstra\xdfe 60, Haus 16, Gie\xdfen, Germany"/>\r\n-      <cvParam cvRef="MS" accession="MS:1000589" name="contact email" value="thorsten.schramm@anorg.chemie.uni-.giessen.de"/>\r\n-    </contact>\r\n-  </fileDescription>\r\n-  <referenceableParamGroupList count="4">\r\n-    <referenceableParamGroup id="mzArray">\r\n-      <cvParam cvRef="MS" accession="MS:1000576" name="no compression" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000514" name="m/z array" value="" unitCvRef="MS" unitAccession="MS:1000040" unitName="m/z"/>\r\n-      <cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true"/>\r\n-      <cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value=""/>\r\n-    </referenceableParamGroup>\r\n-    <referenceableParamGroup id="intensityArray">\r\n-      <cvParam cvRef="MS" accession="MS:1000576" name="no compression" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000515" name="intensity array" value="" unitCvRef="MS" unitAccession="MS:1000131" unitName="number of counts"/>\r\n-      <cvParam cvRef="IMS" accession="IMS:1000101" name="external data" value="true"/>\r\n-      <cvParam cvRef="MS" accession="MS:1000521" name="32-bit float" value=""/>\r\n-    </referenceableParamGroup>\r\n-    <referenceableParamGroup id="scan1">\r\n-      <cvParam cvRef="MS" accession="MS:1000093" name="increasing m/z scan" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000095" name="linear" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000512" name="filter string" value="ITMS - p NSI Full ms [100,00-800,00]"/>\r\n-    </referenceableParamGroup>\r\n-    <referenceableParamGroup id="spectrum1">\r\n-      <cvParam cvRef="MS" accession="MS:1000579" name="MS1 spectrum" value=""/>\r\n-      <cvParam cvRef="MS" accession="MS:1000511" name="ms level" value="0"/>\r\n-      <cvParam cvRef="MS" accessio'..b'"1" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />\n+\t\t\t\t\t</scan>\n+\t\t\t\t</scanList>\n+\t\t\t\t<binaryDataArrayList count="2">\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="mzArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="intensityArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="33588" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t</binaryDataArrayList>\n+\t\t\t</spectrum>\n+\t\t\t<spectrum id="Spectrum=8" defaultArrayLength="0" index="8">\n+\t\t\t\t<referenceableParamGroupRef ref="spectrum1" />\n+\t\t\t\t<scanList count="1">\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />\n+\t\t\t\t\t<scan instrumentConfigurationRef="IC1">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="scan1" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="2" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />\n+\t\t\t\t\t</scan>\n+\t\t\t\t</scanList>\n+\t\t\t\t<binaryDataArrayList count="2">\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="mzArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="intensityArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="38384" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t</binaryDataArrayList>\n+\t\t\t</spectrum>\n+\t\t\t<spectrum id="Spectrum=9" defaultArrayLength="0" index="9">\n+\t\t\t\t<referenceableParamGroupRef ref="spectrum1" />\n+\t\t\t\t<scanList count="1">\n+\t\t\t\t\t<cvParam cvRef="MS" accession="MS:1000795" name="no combination" value="" />\n+\t\t\t\t\t<scan instrumentConfigurationRef="IC1">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="scan1" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000050" name="position x" value="3" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000051" name="position y" value="3" />\n+\t\t\t\t\t</scan>\n+\t\t\t\t</scanList>\n+\t\t\t\t<binaryDataArrayList count="2">\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="mzArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="16" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t\t<binaryDataArray encodedLength="0">\n+\t\t\t\t\t\t<referenceableParamGroupRef ref="intensityArray" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000102" name="external offset" value="43180" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000103" name="external array length" value="1199" />\n+\t\t\t\t\t\t<cvParam cvRef="IMS" accession="IMS:1000104" name="external encoded length" value="4796" />\n+\t\t\t\t\t\t<binary />\n+\t\t\t\t\t</binaryDataArray>\n+\t\t\t\t</binaryDataArrayList>\n+\t\t\t</spectrum>\n+\t\t</spectrumList>\n+\t</run>\n+</mzML>\n'
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Heatmaps_LM8_file16.pdf
b
Binary file test-data/Heatmaps_LM8_file16.pdf has changed
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Heatmaps_analyze75.pdf
b
Binary file test-data/Heatmaps_analyze75.pdf has changed
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Heatmaps_imzml.pdf
b
Binary file test-data/Heatmaps_imzml.pdf has changed
b
diff -r 9746576123c9 -r 2b9fa240e261 test-data/Heatmaps_rdata.pdf
b
Binary file test-data/Heatmaps_rdata.pdf has changed