# HG changeset patch
# User galaxyp
# Date 1551363893 18000
# Node ID 585ef27873c9018f62b3340a38b86d2e8ad62d34
# Parent cbc7e53518cea64c3037b1b3ba8ef7ab7d519873
planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/cardinal commit 2c4a1a862900b4efbc30824cbcb798f835b168b2
diff -r cbc7e53518ce -r 585ef27873c9 classification.xml
--- a/classification.xml Fri Feb 15 10:18:51 2019 -0500
+++ b/classification.xml Thu Feb 28 09:24:53 2019 -0500
@@ -33,6 +33,10 @@
## to make sure that processed files work as well:
iData(msidata) = iData(msidata)[]
+## remove duplicated coordinates
+print(paste0(sum(duplicated(coord(msidata))), " duplicated coordinates were removed"))
+msidata <- msidata[,!duplicated(coord(msidata))]
+
@DATA_PROPERTIES_INRAM@
@@ -231,10 +235,13 @@
### m/z and pixel information output
pls_classes = data.frame(msidata.pls\$classes[[1]])
- pixel_names = gsub(", y = ", "_", names(pixels(msidata)))
- pixel_names = gsub(" = ", "y_", pixel_names)
- x_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,2]
- y_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,3]
+ ## pixel names and coordinates
+ ## to remove potential sample names and z dimension, split at comma and take only x and y
+ x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1))
+ y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2))
+ x_coordinates = gsub("x = ","",x_coords)
+ y_coordinates = gsub(" y = ","",y_coords)
+ pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates)
## remove msidata to clean up RAM space
rm(msidata)
@@ -373,12 +380,15 @@
maximumy = max(coord(msidata)[,2])
print(image(msidata, mz = topLabels(msidata.opls)[1,1], normalize.image = "linear", contrast.enhance = "histogram",smooth.image="gaussian", ylim= c(maximumy+0.2*maximumy,minimumy-0.2*minimumy), main="best m/z heatmap"))
- ## m/z and pixel information output
opls_classes = data.frame(msidata.opls\$classes[[1]])
- pixel_names = gsub(", y = ", "_", names(pixels(msidata)))
- pixel_names = gsub(" = ", "y_", pixel_names)
- x_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,2]
- y_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,3]
+ ## pixel names and coordinates
+ ## to remove potential sample names and z dimension, split at comma and take only x and y
+ x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1))
+ y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2))
+ x_coordinates = gsub("x = ","",x_coords)
+ y_coordinates = gsub(" y = ","",y_coords)
+ pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates)
+
opls_classes2 = data.frame(pixel_names, x_coordinates, y_coordinates, opls_classes)
colnames(opls_classes2) = c("pixel names", "x", "y","predicted condition")
@@ -520,10 +530,15 @@
## m/z and pixel information output
ssc_classes = data.frame(msidata.ssc\$classes[[1]])
- pixel_names = gsub(", y = ", "_", names(pixels(msidata)))
- pixel_names = gsub(" = ", "y_", pixel_names)
- x_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,2]
- y_coordinates = matrix(unlist(strsplit(pixel_names, "_")), ncol=3, byrow=TRUE)[,3]
+
+ ## pixel names and coordinates
+ ## to remove potential sample names and z dimension, split at comma and take only x and y
+ x_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 1))
+ y_coords = unlist(lapply(strsplit(names(pixels(msidata)), ","), `[[`, 2))
+ x_coordinates = gsub("x = ","",x_coords)
+ y_coordinates = gsub(" y = ","",y_coords)
+ pixel_names = paste0("xy_", x_coordinates, "_", y_coordinates)
+
## remove msidata to clean up RAM space
rm(msidata)
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results1.ibd
Binary file test-data/preprocessing_results1.ibd has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results1.imzml
--- a/test-data/preprocessing_results1.imzml Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results1.imzml Thu Feb 28 09:24:53 2019 -0500
@@ -9,8 +9,8 @@
-
-
+
+
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results1.imzml.txt
--- a/test-data/preprocessing_results1.imzml.txt Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results1.imzml.txt Thu Feb 28 09:24:53 2019 -0500
@@ -1,4 +1,4 @@
imzML file:
total 24
--rw-r--r-- 1 meli meli 96 Feb 12 21:24 ibd
--rw-r--r-- 1 meli meli 16714 Feb 12 21:24 imzml
+-rw-r--r-- 1 meli meli 96 Feb 24 14:11 ibd
+-rw-r--r-- 1 meli meli 16714 Feb 24 14:11 imzml
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results1.pdf
Binary file test-data/preprocessing_results1.pdf has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results2.ibd
Binary file test-data/preprocessing_results2.ibd has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results2.imzml
--- a/test-data/preprocessing_results2.imzml Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results2.imzml Thu Feb 28 09:24:53 2019 -0500
@@ -9,8 +9,8 @@
-
-
+
+
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results2.imzml.txt
--- a/test-data/preprocessing_results2.imzml.txt Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results2.imzml.txt Thu Feb 28 09:24:53 2019 -0500
@@ -1,4 +1,4 @@
imzML file:
total 80
--rw-r--r-- 1 meli meli 54720 Feb 12 21:25 ibd
--rw-r--r-- 1 meli meli 21132 Feb 12 21:25 imzml
+-rw-r--r-- 1 meli meli 54720 Feb 24 14:12 ibd
+-rw-r--r-- 1 meli meli 21132 Feb 24 14:12 imzml
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results2.pdf
Binary file test-data/preprocessing_results2.pdf has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results3.ibd
Binary file test-data/preprocessing_results3.ibd has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results3.imzml
--- a/test-data/preprocessing_results3.imzml Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results3.imzml Thu Feb 28 09:24:53 2019 -0500
@@ -9,8 +9,8 @@
-
-
+
+
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results3.imzml.txt
--- a/test-data/preprocessing_results3.imzml.txt Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results3.imzml.txt Thu Feb 28 09:24:53 2019 -0500
@@ -1,4 +1,4 @@
imzML file:
total 36
--rw-r--r-- 1 meli meli 14216 Feb 12 21:26 ibd
--rw-r--r-- 1 meli meli 16824 Feb 12 21:26 imzml
+-rw-r--r-- 1 meli meli 14216 Feb 24 14:12 ibd
+-rw-r--r-- 1 meli meli 16824 Feb 24 14:12 imzml
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results3.pdf
Binary file test-data/preprocessing_results3.pdf has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results4.ibd
Binary file test-data/preprocessing_results4.ibd has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results4.imzml
--- a/test-data/preprocessing_results4.imzml Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results4.imzml Thu Feb 28 09:24:53 2019 -0500
@@ -9,8 +9,8 @@
-
-
+
+
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results4.imzml.txt
--- a/test-data/preprocessing_results4.imzml.txt Fri Feb 15 10:18:51 2019 -0500
+++ b/test-data/preprocessing_results4.imzml.txt Thu Feb 28 09:24:53 2019 -0500
@@ -1,4 +1,4 @@
imzML file:
total 28
--rw-r--r-- 1 meli meli 6376 Feb 12 21:29 ibd
--rw-r--r-- 1 meli meli 16801 Feb 12 21:29 imzml
+-rw-r--r-- 1 meli meli 6376 Feb 24 14:13 ibd
+-rw-r--r-- 1 meli meli 16801 Feb 24 14:13 imzml
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results4.pdf
Binary file test-data/preprocessing_results4.pdf has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results5.RData
Binary file test-data/preprocessing_results5.RData has changed
diff -r cbc7e53518ce -r 585ef27873c9 test-data/preprocessing_results5.pdf
Binary file test-data/preprocessing_results5.pdf has changed