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

Changeset 5:cee9cf693709 (2018-06-11)
Previous changeset 4:aec189b0c64d (2018-05-28) Next changeset 6:80b6b96a175c (2018-06-19)
Commit message:
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_segmentation commit a7be47698f53eb4f00961192327d93e8989276a7
modified:
segmentation_tool.xml
test-data/Example_Continuous.ibd
test-data/Example_Continuous.imzML
test-data/centroids_rdata.pdf
test-data/kmeans_analyze.pdf
test-data/loadings_pca.tabular
test-data/pca_imzml.pdf
test-data/scores_pca.tabular
test-data/toplabels_skm.tabular
added:
test-data/cluster_skm.RData
b
diff -r aec189b0c64d -r cee9cf693709 segmentation_tool.xml
--- a/segmentation_tool.xml Mon May 28 12:39:28 2018 -0400
+++ b/segmentation_tool.xml Mon Jun 11 17:34:31 2018 -0400
[
b'@@ -1,5 +1,5 @@\n-<tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.10.0.0">\n-    <description>tool for spatial clustering</description>\n+<tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.10.0.1">\n+    <description>mass spectrometry imaging spatial clustering</description>\n     <requirements>\n         <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>\n         <requirement type="package" version="2.2.1">r-gridextra</requirement>\n@@ -28,8 +28,7 @@\n         <configfile name="MSI_segmentation"><![CDATA[\n \n \n-################################# load libraries and read file #########################\n-\n+################################# load libraries and read file #################\n \n library(Cardinal)\n library(gridExtra)\n@@ -47,9 +46,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@@ -66,7 +65,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@@ -74,12 +73,11 @@\n TICs = colSums(spectra(msidata)[]) \n NumemptyTIC = sum(TICs == 0)\n \n-\n ## Processing informations\n processinginfo = processingData(msidata)\n centroidedinfo = processinginfo@centroided # TRUE or FALSE\n \n-## if TRUE write processinginfo if no write FALSE\n+## if TRUE write processinginfo if FALSE write FALSE\n \n ## normalization\n if (length(processinginfo@normalization) == 0) {\n@@ -106,10 +104,8 @@\n   peakpickinginfo=processinginfo@peakPicking\n }\n \n-#############################################################################\n-\n-properties = c("Number of mz features",\n-               "Range of mz values [Da]",\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                "Range of y coordinates",\n@@ -167,6 +163,21 @@\n         #set $color_string = \',\'.join([\'"%s"\' % $color.feature_color for $color in $colours])\n         colourvector = c($color_string)\n \n+        ### preparation for images and plots:\n+        #if str($image_cond.image_type) == "standard_image":\n+            print("standard image")\n+\n+            strip_input = TRUE\n+            lattice_input = FALSE\n+\n+        #elif str($image_cond.image_type) == "lattice_image":\n+            print("lattice image")\n+\n+            strip_input = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))\n+            lattice_input = TRUE\n+\n+        #end if\n+\n \n         #if str( $segm_cond.segmentationtool ) == \'pca\':\n             print(\'pca\')\n@@ -178,25 +189,31 @@\n             pca = PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE, \n             method = "$segm_cond.pca_method", scale = $segm_cond.pca_scale, layout = c(ncomp, 1))\n \n-            print(image(pca, main="PCA image", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), col=colourvector))\n-            print(plot(pca, main="PCA plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))))\n+            print(image(pca, main="PCA image", lattice=lattice_input, strip = strip_input, col=colourvector))\n+            print(plot(pca, main="PCA plot", lattice=lattice_input, col= colourvector, strip = strip_input))\n \n-\n-            pcaloadings = (pca@resultData\\$ncomp\\$loadings) ### loading for each mz value'..b'    </when>\n             </conditional>\n+            <conditional name="image_cond">\n+                <param name="image_type" type="select" label="Select the image type">\n+                    <option value="standard_image" selected="True">standard</option>\n+                    <option value="lattice_image">lattice</option>\n+                </param>\n+                <when value="standard_image"/>\n+                <when value="lattice_image"/>\n+            </conditional>\n             <repeat name="colours" title="Colours for the plots" min="1" max="50">\n                 <param name="feature_color" type="color" label="Colours" value="#ff00ff" help="Numbers of columns should be the same as number of components">\n                   <sanitizer>\n@@ -309,11 +348,15 @@\n                   </sanitizer>\n                 </param>\n             </repeat>\n+        <param name="output_rdata" type="boolean" display="radio" label="Results as .RData output"/>\n     </inputs>\n     <outputs>\n-        <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "${tool.name} ${on_string}"/>\n-        <data format="tabular" name="mzfeatures" label="Mz features ${on_string}"/>\n-        <data format="tabular" name="pixeloutput" label="Pixels ${on_string}"/>\n+        <data format="pdf" name="segmentationimages" from_work_dir="segmentationpdf.pdf" label = "$infile.display_name segmentation"/>\n+        <data format="tabular" name="mzfeatures" label="$infile.display_name m/z features"/>\n+        <data format="tabular" name="pixeloutput" label="$infile.display_name pixels"/>\n+        <data format="rdata" name="segmentation_rdata" label="$infile.display_name segmentation">\n+            <filter>output_rdata</filter>\n+        </data>\n     </outputs>\n     <tests>\n         <test>\n@@ -322,6 +365,7 @@\n                 <composite_data value="Example_Continuous.ibd"/>\n             </param>\n             <param name="segmentationtool" value="pca"/>\n+            <param name="image_type" value="lattice_image"/>\n             <repeat name="colours">\n                 <param name="feature_color" value="#ff00ff"/>\n             </repeat>\n@@ -351,9 +395,12 @@\n             <repeat name="colours">\n                 <param name="feature_color" value="#00C957"/>\n             </repeat>\n+            <param name="output_rdata" value="True"/>\n             <output name="segmentationimages" file="kmeans_analyze.pdf" compare="sim_size" delta="20000"/>\n             <output name="mzfeatures" file="toplabels_skm.tabular" compare="sim_size"/>\n             <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/>\n+            <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/>\n+            <output name="segmentation_rdata" file="cluster_skm.RData" compare="sim_size"/>\n         </test>\n         <test>\n             <param name="infile" value="preprocessed.RData" ftype="rdata"/>\n@@ -386,7 +433,7 @@\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 provides three different Cardinal functions for unsupervised clustering/spatial segmentation of mass-spectrometry imaging data.\n+This tool provides three different Cardinal functions for unsupervised clustering/spatial segmentation of mass spectrometry imaging data.\n \n Input data: 3 types of input data can be used:\n \n@@ -403,7 +450,8 @@\n Output: \n \n - Pdf with the heatmaps and plots for the segmentation\n-- Tabular file with information on masses and pixels: loadings/scores (PCA), toplabels/clusters (k-means), toplabels/classes (spatial shrunken centroids)\n+- Tabular file with information on m/z and pixels: loadings/scores (PCA), toplabels/clusters (k-means), toplabels/classes (spatial shrunken centroids)\n+- Optional .RData file which contains the segmentation results and can be used for further exploration in R\n \n         ]]>\n     </help>\n'
b
diff -r aec189b0c64d -r cee9cf693709 test-data/Example_Continuous.ibd
b
Binary file test-data/Example_Continuous.ibd has changed
b
diff -r aec189b0c64d -r cee9cf693709 test-data/Example_Continuous.imzML
--- a/test-data/Example_Continuous.imzML Mon May 28 12:39:28 2018 -0400
+++ b/test-data/Example_Continuous.imzML Mon Jun 11 17:34:31 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 aec189b0c64d -r cee9cf693709 test-data/centroids_rdata.pdf
b
Binary file test-data/centroids_rdata.pdf has changed
b
diff -r aec189b0c64d -r cee9cf693709 test-data/cluster_skm.RData
b
Binary file test-data/cluster_skm.RData has changed
b
diff -r aec189b0c64d -r cee9cf693709 test-data/kmeans_analyze.pdf
b
Binary file test-data/kmeans_analyze.pdf has changed
b
diff -r aec189b0c64d -r cee9cf693709 test-data/loadings_pca.tabular
--- a/test-data/loadings_pca.tabular Mon May 28 12:39:28 2018 -0400
+++ b/test-data/loadings_pca.tabular Mon Jun 11 17:34:31 2018 -0400
b
b'@@ -1,8400 +1,1200 @@\n \tPC1\tPC2\n-m/z = 100.08\t-6.59981408171217e-20\t1.99414411127552e-20\n-m/z = 100.17\t-1.22067252762475e-18\t3.64221598131909e-19\n-m/z = 100.25\t-1.24069213403948e-19\t3.51078303122228e-20\n-m/z = 100.33\t-9.39299647838578e-19\t2.84232090526467e-19\n-m/z = 100.42\t1.40181870261228e-18\t-4.17745672317481e-19\n-m/z = 100.5\t-7.85629776886283e-19\t2.27360363693363e-19\n-m/z = 100.58\t-0.000104656106492357\t-0.000353453375099738\n-m/z = 100.67\t-0.0019180641296081\t-0.00647784695026116\n-m/z = 100.75\t-0.00180844223665623\t-0.00610762270489914\n-m/z = 100.83\t0.000360645067163722\t-0.00196796460781244\n-m/z = 100.92\t0.0149012861337974\t-0.00227595239712753\n-m/z = 101\t0.0175435591487301\t0.0143023652391707\n-m/z = 101.08\t0.0310027471358161\t-0.0122614203884689\n-m/z = 101.17\t0.0338611449231096\t-0.0223356162474475\n-m/z = 101.25\t0.00673689843629036\t-0.00469328645894407\n-m/z = 101.33\t-6.07248591968357e-06\t7.65206415618964e-07\n-m/z = 101.42\t-8.72856050309731e-09\t-2.94788261454435e-08\n-m/z = 101.5\t3.45834782551789e-07\t1.20261345070265e-06\n-m/z = 101.58\t3.23622451836243e-07\t1.12537180515404e-06\n-m/z = 101.67\t3.86117478476953e-06\t-2.3794105462402e-06\n-m/z = 101.75\t1.16030815032103e-06\t-8.04388710714278e-07\n-m/z = 101.83\t1.00752913826932e-07\t-7.12295619841685e-08\n-m/z = 101.92\t-1.83947691626959e-12\t-6.21243633447582e-12\n-m/z = 102\t-4.17247201180986e-14\t-1.40919493238779e-13\n-m/z = 102.08\t3.30266978899162e-11\t1.14847770267925e-10\n-m/z = 102.17\t2.71286070470063e-10\t-1.38524371576274e-10\n-m/z = 102.25\t1.61761087481509e-10\t-1.07254854666952e-10\n-m/z = 102.33\t2.76943738202762e-11\t-1.93156956459852e-11\n-m/z = 102.42\t-2.92905595157179e-16\t-9.87516223450364e-16\n-m/z = 102.5\t-3.42699444289153e-17\t-1.14555206238362e-16\n-m/z = 102.58\t2.02894967697271e-15\t7.05299364378458e-15\n-m/z = 102.67\t1.46141828737087e-15\t5.0799238890951e-15\n-m/z = 102.75\t1.81351813127881e-14\t-1.13407399205491e-14\n-m/z = 102.83\t4.9951418830631e-15\t-3.46528740157625e-15\n-m/z = 102.92\t3.55553125416556e-16\t-2.52530286392769e-16\n-m/z = 103\t-5.61051336193066e-19\t1.3560102454813e-19\n-m/z = 103.08\t-9.42463593593183e-19\t2.68280229371382e-19\n-m/z = 103.17\t5.76632059057751e-19\t4.19721255305056e-19\n-m/z = 103.25\t2.414840404398e-19\t-4.09426345968327e-19\n-m/z = 103.33\t3.76263032655203e-19\t-3.79531790360356e-19\n-m/z = 103.42\t-3.15388096672981e-21\t-4.47658336246464e-20\n-m/z = 103.5\t-1.30980756704854e-18\t3.91362855934182e-19\n-m/z = 103.58\t8.16237790966026e-19\t-2.41768259368016e-19\n-m/z = 103.67\t-1.4961308872314e-18\t4.40828089048662e-19\n-m/z = 103.75\t-1.07584263333159e-18\t3.21867027162327e-19\n-m/z = 103.83\t1.64216416153113e-18\t-4.58782786606414e-19\n-m/z = 103.92\t-7.38431217739484e-19\t2.18296921841222e-19\n-m/z = 104\t5.45740276295977e-19\t-1.57517069561636e-19\n-m/z = 104.08\t-3.76533395730842e-19\t1.10140581720912e-19\n-m/z = 104.17\t-3.66953790122529e-19\t1.07380706052198e-19\n-m/z = 104.25\t-8.32617710704452e-19\t2.42211017787331e-19\n-m/z = 104.33\t-1.75991086553368e-18\t5.26014714836997e-19\n-m/z = 104.42\t-5.25688917020009e-19\t1.5357904674123e-19\n-m/z = 104.5\t6.53669615383435e-20\t-1.92724800190222e-20\n-m/z = 104.58\t1.09682691812306e-18\t-3.19063922597583e-19\n-m/z = 104.67\t7.2570588358456e-20\t-2.12069989563054e-20\n-m/z = 104.75\t-9.10471069304961e-19\t2.72867655716586e-19\n-m/z = 104.83\t-5.32533875032083e-19\t1.55228282718103e-19\n-m/z = 104.92\t-1.43568057118607e-18\t4.27761236869507e-19\n-m/z = 105\t-1.00470414813769e-18\t3.0071799148075e-19\n-m/z = 105.08\t-1.02817029960769e-19\t3.07093535781794e-20\n-m/z = 105.17\t-3.41491151156671e-20\t9.98330794914744e-21\n-m/z = 105.25\t-1.33123335221451e-18\t3.90272854534939e-19\n-m/z = 105.33\t-5.1796154271336e-19\t1.49970571283422e-19\n-m/z = 105.42\t-2.79082741204465e-18\t8.28331739792456e-19\n-m/z = 105.5\t1.29483228207151e-18\t-3.88909174088853e-19\n-m/z = 105.58\t-1.53784614461232e-19\t4.48640311879004e-20\n-m/z = 105.67\t-1.61531841406635e-18\t4.68344001507285e-19\n-m/z = 105.75\t7.97152957592111e-19\t-2.36352673313969e-19\n-m/z = 105.83\t1.15084115566217e-21\t-3.37882312255747e-22\n-m/z = 105.92\t-2.7077486134346'..b'00989421728722454\t0.0315093316645264\n+m/z = 394.08\t-0.00166917857982564\t0.0531570081597262\n+m/z = 394.17\t-0.000515223006486967\t0.0164551396233415\n+m/z = 394.25\t-4.55292483933687e-05\t0.00146398008581852\n+m/z = 394.33\t3.80471565286917e-08\t-5.85774622007296e-08\n+m/z = 394.42\t1.80276852073344e-14\t-2.05748180322006e-14\n+m/z = 394.5\t7.79296684892187e-15\t-8.89788603938411e-15\n+m/z = 394.58\t-1.12421356224435e-07\t3.58019391594853e-06\n+m/z = 394.67\t-7.11020518830093e-08\t2.2676977993027e-06\n+m/z = 394.75\t-0.000316047453349278\t0.0100649148736834\n+m/z = 394.83\t-0.00229889763821623\t0.0732111724683768\n+m/z = 394.92\t-0.00150372971795871\t0.0478880892309077\n+m/z = 395\t-0.000292705972843081\t0.00932157526617026\n+m/z = 395.08\t0.00875103820451382\t-0.00998622320294574\n+m/z = 395.17\t0.0126456283855077\t-0.0144305240873076\n+m/z = 395.25\t0.00378465244012697\t-0.00431884573343676\n+m/z = 395.33\t0.000315001652628072\t-0.000359463270406603\n+m/z = 395.42\t-1.56478579108136e-07\t4.9832493669211e-06\n+m/z = 395.5\t-4.95699913397783e-08\t1.57861625005334e-06\n+m/z = 395.58\t-4.59965931339919e-09\t1.46481706771579e-07\n+m/z = 395.67\t8.93363646462621e-07\t-1.01945947057564e-06\n+m/z = 395.75\t5.28499859977677e-07\t-6.03096163120612e-07\n+m/z = 395.83\t-0.0101721470821755\t-0.00254460417531895\n+m/z = 395.92\t-0.0901124169298955\t-0.0225408899978152\n+m/z = 396\t-0.0619057408174025\t-0.0154852188209355\n+m/z = 396.08\t-0.0120686207083509\t-0.0030188675604313\n+m/z = 396.17\t-1.02809192659662e-19\t-1.1167343587966e-18\n+m/z = 396.25\t5.93693479925687e-11\t-6.77491704550239e-11\n+m/z = 396.33\t1.62663163287853e-11\t-1.85622560009591e-11\n+m/z = 396.42\t1.09391611489935e-12\t-1.24832179983514e-12\n+m/z = 396.5\t-6.43609376126251e-06\t-1.60993663686402e-06\n+m/z = 396.58\t-2.04220500508536e-06\t-5.1084101380166e-07\n+m/z = 396.67\t-1.90042568567589e-07\t-4.75376068379556e-08\n+m/z = 396.75\t4.67483954132442e-15\t-5.32595800133748e-15\n+m/z = 396.83\t2.3543653958446e-15\t-2.6893757633834e-15\n+m/z = 396.92\t3.61576415040578e-16\t-4.09724092217582e-16\n+m/z = 397\t-0.00683320944088087\t-0.00170927192743566\n+m/z = 397.08\t-0.0508156173515183\t-0.0127111145890862\n+m/z = 397.17\t-0.0315399671799999\t-0.0078894670153804\n+m/z = 397.25\t-0.0057109852596642\t-0.00142855664922872\n+m/z = 397.33\t2.40849403475241e-20\t-2.54601064024024e-18\n+m/z = 397.42\t-7.80507618573971e-19\t-6.31784670000242e-18\n+m/z = 397.5\t-9.64670050327617e-20\t-7.70557204491629e-19\n+m/z = 397.58\t3.35366129881104e-20\t3.68787205770921e-19\n+m/z = 397.67\t-3.41887735034647e-06\t-8.55204443661653e-07\n+m/z = 397.75\t-1.00353056889392e-06\t-2.51025033631676e-07\n+m/z = 397.83\t-8.01158365244942e-08\t-2.00403268018226e-08\n+m/z = 397.92\t4.41810477602555e-19\t2.76743696405334e-18\n+m/z = 398\t3.72397151211073e-19\t2.51478953520004e-18\n+m/z = 398.08\t0.002066071966796\t-0.00235769234822124\n+m/z = 398.17\t0.0225874349565932\t-0.025775589684846\n+m/z = 398.25\t0.0160218359330536\t-0.0182832742502866\n+m/z = 398.33\t0.00269408959956319\t-0.00307435297682501\n+m/z = 398.42\t-2.53713693743446e-20\t-1.88203545088092e-19\n+m/z = 398.5\t4.91605173665205e-19\t5.06716781179571e-18\n+m/z = 398.58\t1.20084006722825e-19\t9.26419538592546e-19\n+m/z = 398.67\t-0.00295354336564466\t-0.0016465989339032\n+m/z = 398.75\t-0.100753555082997\t-0.0424027103707122\n+m/z = 398.83\t-0.0858729519853826\t-0.0359862357359941\n+m/z = 398.92\t-0.0173733382364934\t-0.00713147150476624\n+m/z = 399\t5.64277281477416e-19\t5.15284717964396e-18\n+m/z = 399.08\t4.96925909557876e-20\t5.27528645391406e-19\n+m/z = 399.17\t2.15222159026217e-19\t3.08391792077735e-18\n+m/z = 399.25\t-4.73725302833353e-20\t-4.20034870428914e-19\n+m/z = 399.33\t-8.72598113342299e-06\t-3.70432674671241e-06\n+m/z = 399.42\t-2.88619885891206e-06\t-1.19693828707071e-06\n+m/z = 399.5\t-2.87745593747813e-07\t-1.14900342932531e-07\n+m/z = 399.58\t-3.35898013477324e-19\t-3.03535580137559e-18\n+m/z = 399.67\t-6.00568900274991e-19\t-5.45554234427916e-18\n+m/z = 399.75\t-6.20154171960683e-20\t-7.34629234970848e-19\n+m/z = 399.83\t-5.28798131898754e-10\t-2.33513644109201e-10\n+m/z = 399.92\t-3.87854517365835e-10\t-1.62263519869647e-10\n'
b
diff -r aec189b0c64d -r cee9cf693709 test-data/pca_imzml.pdf
b
Binary file test-data/pca_imzml.pdf has changed
b
diff -r aec189b0c64d -r cee9cf693709 test-data/scores_pca.tabular
--- a/test-data/scores_pca.tabular Mon May 28 12:39:28 2018 -0400
+++ b/test-data/scores_pca.tabular Mon Jun 11 17:34:31 2018 -0400
b
@@ -1,10 +1,10 @@
  PC1 PC2
-x = 1, y = 1 -3.10354953946923 -0.882256622295125
-x = 2, y = 1 0.896503112130741 2.98575442188364
-x = 3, y = 1 -1.57899570254885 -2.26797345312224
-x = 1, y = 2 4.34938743071702 6.43242810521546
-x = 2, y = 2 -4.25927282262867 0.298723132409785
-x = 3, y = 2 -3.62418135901873 -0.627868439327959
-x = 1, y = 3 -3.2784007788516 1.98430745878089
-x = 2, y = 3 -1.38097137864788 -4.74863282848961
-x = 3, y = 3 11.9794810383172 -3.17448177505488
+x = 1, y = 1 -1.00970093989579 -0.757987492163091
+x = 2, y = 1 -0.579669229309752 0.365615195586662
+x = 3, y = 1 1.04790449059336 -0.831141108678229
+x = 1, y = 2 -3.5004093695087 -0.608578545994502
+x = 2, y = 2 0.325050824762021 -0.275854508943189
+x = 3, y = 2 1.31374997886227 -0.0192699346592579
+x = 1, y = 3 1.46193831394871 0.0337353199555271
+x = 2, y = 3 1.08833133183904 -1.1646109051122
+x = 3, y = 3 -0.147195401291164 3.25809198000829
b
diff -r aec189b0c64d -r cee9cf693709 test-data/toplabels_skm.tabular
--- a/test-data/toplabels_skm.tabular Mon May 28 12:39:28 2018 -0400
+++ b/test-data/toplabels_skm.tabular Mon Jun 11 17:34:31 2018 -0400
b
@@ -1,21 +1,21 @@
  mz r k cluster centers withinss betweenss
 1 1199.55615234375 3 3 1 12.3333333333333 18.6666666666667 3661.33333333333
-2 1199.55615234375 3 3 2 81 0 3661.33333333333
-3 1199.55615234375 3 3 3 37 154 3661.33333333333
+2 1199.55615234375 3 3 2 81 154 3661.33333333333
+3 1199.55615234375 3 3 3 37 0 3661.33333333333
 4 1199.59753417969 3 3 1 14.3333333333333 144.666666666667 3658.13333333333
-5 1199.59753417969 3 3 2 84 0 3658.13333333333
-6 1199.59753417969 3 3 3 34.6 137.2 3658.13333333333
-7 1199.55615234375 1 3 1 12.3333333333333 18.6666666666667 2198
-8 1199.55615234375 1 3 2 49.3333333333333 1504.66666666667 2198
+5 1199.59753417969 3 3 2 84 137.2 3658.13333333333
+6 1199.59753417969 3 3 3 34.6 0 3658.13333333333
+7 1199.55615234375 1 3 1 12.3333333333333 1504.66666666667 2198
+8 1199.55615234375 1 3 2 49.3333333333333 18.6666666666667 2198
 9 1199.55615234375 1 3 3 39.3333333333333 112.666666666667 2198
-10 1199.55615234375 2 3 1 12.3333333333333 18.6666666666667 2198
-11 1199.55615234375 2 3 2 49.3333333333333 1504.66666666667 2198
+10 1199.55615234375 2 3 1 12.3333333333333 1504.66666666667 2198
+11 1199.55615234375 2 3 2 49.3333333333333 18.6666666666667 2198
 12 1199.55615234375 2 3 3 39.3333333333333 112.666666666667 2198
 13 1199.63891601562 3 3 1 11 26 2049.02222222222
-14 1199.63891601562 3 3 2 62 0 2049.02222222222
-15 1199.63891601562 3 3 3 30.4 45.2 2049.02222222222
-16 1199.55615234375 2 2 1 12.3333333333333 1767.33333333333 2048
-17 1199.55615234375 2 2 2 44.3333333333333 18.6666666666667 2048
-18 1199.55615234375 3 2 1 12.3333333333333 1767.33333333333 2048
-19 1199.55615234375 3 2 2 44.3333333333333 18.6666666666667 2048
-20 1199.59753417969 1 3 1 14.3333333333333 144.666666666667 1784.66666666667
+14 1199.63891601562 3 3 2 62 45.2 2049.02222222222
+15 1199.63891601562 3 3 3 30.4 0 2049.02222222222
+16 1199.55615234375 2 2 1 12.3333333333333 18.6666666666667 2048
+17 1199.55615234375 2 2 2 44.3333333333333 1767.33333333333 2048
+18 1199.55615234375 3 2 1 12.3333333333333 18.6666666666667 2048
+19 1199.55615234375 3 2 2 44.3333333333333 1767.33333333333 2048
+20 1199.59753417969 1 3 1 14.3333333333333 1946 1784.66666666667