changeset 8:262db9893c6f draft

planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/msi_filtering commit 5feaf3d0e0da8cef1241fecc1f4d6f81324594e6
author galaxyp
date Wed, 22 Aug 2018 13:42:05 -0400
parents 73b5a754f35c
children 28ac8199d4d5
files msi_filtering.xml test-data/analyze75_filtered2.pdf test-data/analyze_filtered.RData test-data/analyze_filtered.pdf test-data/analyze_filteredoutside.RData test-data/imzml_filtered.RData test-data/imzml_filtered.pdf test-data/imzml_filtered2.pdf test-data/imzml_filtered3.RData test-data/imzml_filtered3.pdf test-data/imzml_filtered4.RData test-data/imzml_filtered4.pdf test-data/imzml_filtered5.RData test-data/imzml_filtered5.pdf test-data/rdata_notfiltered.pdf
diffstat 15 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/msi_filtering.xml	Wed Aug 15 05:40:01 2018 -0400
+++ b/msi_filtering.xml	Wed Aug 22 13:42:05 2018 -0400
@@ -1,4 +1,4 @@
-<tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.10.0.5">
+<tool id="mass_spectrometry_imaging_filtering" name="MSI filtering" version="1.10.0.6">
     <description>tool for filtering mass spectrometry imaging data</description>
     <requirements>
         <requirement type="package" version="1.10.0">bioconductor-cardinal</requirement>
@@ -44,7 +44,12 @@
 #elif $infile.ext == 'analyze75'
     msidata = readAnalyze('infile')
 #else
-    load('infile.RData')
+    loadRData <- function(fileName){
+    load(fileName)
+    get(ls()[ls() != "fileName"])
+    }
+    msidata = loadRData('infile.RData')
+
 #end if
 
 
@@ -392,6 +397,8 @@
 {
         ### visual pixel control
 
+            levels(position_df\$annotation) = factor(paste(1:length(levels(position_df\$annotation)), levels(position_df\$annotation), sep="_"))
+
             pixel_image = ggplot(position_df, aes(x=x, y=y, fill=annotation))+
                    geom_tile(height = 1, width=1)+
                    coord_fixed()+
@@ -400,8 +407,16 @@
                    theme(plot.title = element_text(hjust = 0.5))+
                    theme(text=element_text(family="ArialMT", face="bold", size=12))+
                    theme(legend.position="bottom",legend.direction="vertical")+
+                   theme(legend.key.size = unit(0.2, "line"), legend.text = element_text(size = 6))+
                    guides(fill=guide_legend(ncol=4,byrow=TRUE))
 
+    coord_labels = aggregate(cbind(x,y)~annotation, data=position_df, mean, na.rm=TRUE, na.action="na.pass")
+    coord_labels\$file_number = 1:length(levels(position_df\$annotation))
+
+    for(file_count in 1:nrow(coord_labels))
+    {pixel_image = pixel_image + annotate("text",x=coord_labels[file_count,"x"],
+    y=coord_labels[file_count,"y"],label=toString(coord_labels[file_count,4]))}
+
             print(pixel_image)
 
             ### control features which are removed
Binary file test-data/analyze75_filtered2.pdf has changed
Binary file test-data/analyze_filtered.RData has changed
Binary file test-data/analyze_filtered.pdf has changed
Binary file test-data/analyze_filteredoutside.RData has changed
Binary file test-data/imzml_filtered.RData has changed
Binary file test-data/imzml_filtered.pdf has changed
Binary file test-data/imzml_filtered2.pdf has changed
Binary file test-data/imzml_filtered3.RData has changed
Binary file test-data/imzml_filtered3.pdf has changed
Binary file test-data/imzml_filtered4.RData has changed
Binary file test-data/imzml_filtered4.pdf has changed
Binary file test-data/imzml_filtered5.RData has changed
Binary file test-data/imzml_filtered5.pdf has changed
Binary file test-data/rdata_notfiltered.pdf has changed