diff segmentation_tool.xml @ 1:d4158c9955ea draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/msi_segmentation commit edbf2a6cb50fb04d0db56a7557a64e3bb7a0806a
author galaxyp
date Thu, 01 Mar 2018 08:26:19 -0500
parents 0c1a9b68f436
children f66c5789deac
line wrap: on
line diff
--- a/segmentation_tool.xml	Sat Feb 24 13:51:32 2018 -0500
+++ b/segmentation_tool.xml	Thu Mar 01 08:26:19 2018 -0500
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.7.0">
+<tool id="mass_spectrometry_imaging_segmentations" name="MSI segmentation" version="1.7.0.1">
     <description>tool for spatial clustering</description>
     <requirements>
         <requirement type="package" version="1.7.0">bioconductor-cardinal</requirement>
@@ -40,9 +40,9 @@
 ## Read MALDI Imaging dataset
 
 #if $infile.ext == 'imzml'
-    msidata <- readMSIData('infile.imzML')
+    msidata = readMSIData('infile.imzML')
 #elif $infile.ext == 'analyze75'
-    msidata <- readMSIData('infile.hdr')
+    msidata = readMSIData('infile.hdr')
 #else
     load('infile.RData')
 #end if
@@ -177,10 +177,10 @@
             component_vector = character()
             for (numberofcomponents in 1:$segm_cond.pca_ncomp)
             {component_vector[numberofcomponents]= paste0("PC", numberofcomponents)}
-            pca <- PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE, 
+            pca = PCA(msidata, ncomp=$segm_cond.pca_ncomp, column = component_vector, superpose = FALSE, 
             method = "$segm_cond.pca_method", scale = $segm_cond.pca_scale, layout = c(ncomp, 1))
 
-            print(image(pca, main="PCA image", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.pca_imagecontrast", smooth.image = "$segm_cond.pca_imagesmoothing", col=colourvector))
+            print(image(pca, main="PCA image", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.pca_imagecontrast", smooth.image = "$segm_cond.pca_imagesmoothing", col=colourvector, ylim=c(maximumy+2, 0)))
             print(plot(pca, main="PCA plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))))
 
 
@@ -194,8 +194,8 @@
             print('kmeans')
             ##k-means
 
-            skm <- spatialKMeans(msidata, r=$segm_cond.kmeans_r, k=$segm_cond.kmeans_k, method="$segm_cond.kmeans_method")
-            print(image(skm, key=TRUE, main="K-means clustering", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.kmeans_imagecontrast", col= colourvector, smooth.image = "$segm_cond.kmeans_imagesmoothing"))
+            skm = spatialKMeans(msidata, r=$segm_cond.kmeans_r, k=$segm_cond.kmeans_k, method="$segm_cond.kmeans_method")
+            print(image(skm, key=TRUE, main="K-means clustering", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.kmeans_imagecontrast", col= colourvector, smooth.image = "$segm_cond.kmeans_imagesmoothing", ylim=c(maximumy+2, 0)))
             print(plot(skm, main="K-means plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))))
 
 
@@ -210,8 +210,8 @@
             print('centroids')
             ##centroids
 
-            ssc <- spatialShrunkenCentroids(msidata, r=$segm_cond.centroids_r, k=$segm_cond.centroids_k, s=$segm_cond.centroids_s, method="$segm_cond.centroids_method")
-            print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.centroids_imagecontrast", col= colourvector, smooth.image = "$segm_cond.centroids_imagesmoothing"))
+            ssc = spatialShrunkenCentroids(msidata, r=$segm_cond.centroids_r, k=$segm_cond.centroids_k, s=$segm_cond.centroids_s, method="$segm_cond.centroids_method")
+            print(image(ssc, key=TRUE, main="Spatial shrunken centroids", lattice=TRUE, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9)), contrast.enhance = "$segm_cond.centroids_imagecontrast", col= colourvector, smooth.image = "$segm_cond.centroids_imagesmoothing", ylim=c(maximumy+2, 0)))
             print(plot(ssc, main="Spatial shrunken centroids plot", lattice=TRUE, col= colourvector, strip = strip.custom(bg="lightgrey", par.strip.text=list(col="black", cex=.9))))
 
             ssc_classes = (ssc@resultData\$r\$classes)
@@ -342,8 +342,8 @@
                 <param name="feature_color" value="#0000FF"/>
             </repeat>
             <output name="segmentationimages" file="pca_imzml.pdf" compare="sim_size" delta="20000"/>
-            <output name="mzfeatures" file="pcaloadings_results1.txt" compare="sim_size"/>
-            <output name="pixeloutput" file="pcascores_results1.txt" compare="sim_size"/>
+            <output name="mzfeatures" file="loadings_pca.tabular" compare="sim_size"/>
+            <output name="pixeloutput" file="scores_pca.tabular" compare="sim_size"/>
         </test>
         <test>
             <param name="infile" value="" ftype="analyze75">
@@ -362,8 +362,8 @@
                 <param name="feature_color" value="#00C957"/>
             </repeat>
             <output name="segmentationimages" file="kmeans_imzml.pdf" compare="sim_size" delta="20000"/>
-            <output name="mzfeatures" file="toplabels_results1.txt" compare="sim_size"/>
-            <output name="pixeloutput" file="cluster_results1.txt" compare="sim_size"/>
+            <output name="mzfeatures" file="toplabels_skm.tabular" compare="sim_size"/>
+            <output name="pixeloutput" file="cluster_skm.tabular" compare="sim_size"/>
         </test>
         <test>
             <param name="infile" value="preprocessing_results1.RData" ftype="rdata"/>
@@ -384,8 +384,8 @@
                 <param name="feature_color" value="#848484"/>
             </repeat>
             <output name="segmentationimages" file="centroids_imzml.pdf" compare="sim_size" delta="20000"/>
-            <output name="mzfeatures" file="toplabels_results1.txt" compare="sim_size"/>
-            <output name="pixeloutput" file="classes_results1.txt" compare="sim_size"/>
+            <output name="mzfeatures" file="toplabels_ssc.tabular" compare="sim_size"/>
+            <output name="pixeloutput" file="classes_ssc.tabular" compare="sim_size"/>
         </test>
     </tests>
     <help>