diff xcms_plot_chromatogram.r @ 13:9a5b4a1b9880 draft

"planemo upload for repository https://github.com/workflow4metabolomics/xcms commit f1caf2a3bf23cf319a75dd12c86402555dd02617"
author workflow4metabolomics
date Wed, 12 Feb 2020 13:26:21 +0000
parents 5f0327d6f474
children bf87ce10267e
line wrap: on
line diff
--- a/xcms_plot_chromatogram.r	Mon Apr 29 06:09:00 2019 -0400
+++ b/xcms_plot_chromatogram.r	Wed Feb 12 13:26:21 2020 +0000
@@ -48,8 +48,9 @@
 
 cat("\t\tDRAW GRAPHICS\n")
 
-if (!is.null(chromTIC) || is.null(chromTIC)) { cat("\t\t\tCompute TIC\n"); chromTIC <- chromatogram(xdata, aggregationFun = "sum") }
-if (!is.null(chromBPI) || is.null(chromBPI)) { cat("\t\t\tCompute BPI\n"); chromBPI <- chromatogram(xdata, aggregationFun = "max") }
+register(SerialParam())
+if (!exists("chromTIC") || is.null(chromTIC)) { cat("\t\t\tCompute TIC\n"); chromTIC <- chromatogram(xdata, aggregationFun = "sum") }
+if (!exists("chromBPI") || is.null(chromBPI)) { cat("\t\t\tCompute BPI\n"); chromBPI <- chromatogram(xdata, aggregationFun = "max") }
 
 if (!is.null(chromTIC_adjusted)) chromTIC <- chromTIC_adjusted
 if (!is.null(chromBPI_adjusted)) chromBPI <- chromBPI_adjusted
@@ -65,11 +66,12 @@
 print(xdata)
 cat("\n\n")
 
-cat("\txcmsSet OBJECT INFO\n")
+# 2020-01-17 - disable because xcms 3.4.4 raises an error with xdata build with xcms 3.6.1
+#cat("\txcmsSet OBJECT INFO\n")
 # Get the legacy xcmsSet object
-xset <- getxcmsSetObject(xdata)
-print(xset)
-cat("\n\n")
+#xset <- getxcmsSetObject(xdata)
+#print(xset)
+#cat("\n\n")
 
 
 cat("\tDONE\n")