changeset 1:f64656ae9ea4 draft

planemo upload for repository https://github.com/workflow4metabolomics/batchcorrection.git commit b1f8bd1260c1c4b73600fb3867ca3bc613f258a7
author melpetera
date Sun, 09 Oct 2016 09:54:00 -0400
parents 71d83d8920bf
children 016780b192a6
files README.md batch_correction.xml batch_correction_all_loess_script.R build.xml determine_bc.xml runit/output/out_graph.pdf
diffstat 6 files changed, 34 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Tue Aug 09 06:47:41 2016 -0400
+++ b/README.md	Sun Oct 09 09:54:00 2016 -0400
@@ -7,8 +7,8 @@
 
 ### Description
 
-**Version:** 2.0.6  
-**Date:** 2016-08-02  
+**Version:** 2.0.8  
+**Date:** 2016-10-09  
 **Author:** Jean-François Martin (INRA, AXIOM), Mélanie Pétéra (INRA, PFEM), Marion Landi (INRA, PFEM), Franck Giacomoni (INRA, PFEM), and Etienne A. Thévenot (CEA, LIST)  
 **Email:** [jean-francois.martin(at)toulouse.inra.fr](mailto:jean-francois.martin@toulouse.inra.frr), [melanie.petera(at)clermont.inra.fr](mailto:melanie.petera@clermont.inra.fr), [etienne.thevenot(at)cea.fr](mailto:etienne.thevenot@cea.fr)  
 **Citation:**  
@@ -75,11 +75,17 @@
 
 ### News
 
-##### CHANGES IN VERSION 2.0.6
+##### CHANGES IN VERSION 2.0.8  
+
+INTERNAL MODIFICATIONS  
 
-INTERNAL MODIFICATIONS
+ * For PCA figure display only ("all_loess_" options): missing values are set to the minimum value before PCA computation is performed (with svd)
+ 
+##### CHANGES IN VERSION 2.0.6  
 
- * Additional running and installation tests added with planemo, conda, and travis
+INTERNAL MODIFICATIONS  
+
+ * Additional running and installation tests added with planemo, conda, and travis  
 
 ##### CHANGES IN VERSION 2.0.4
 
--- a/batch_correction.xml	Tue Aug 09 06:47:41 2016 -0400
+++ b/batch_correction.xml	Sun Oct 09 09:54:00 2016 -0400
@@ -1,12 +1,12 @@
-<tool id="Batch_correction" name="Batch_correction" version="2.0.6">
+<tool id="Batch_correction" name="Batch_correction" version="2.0.8">
   <description>Corrects intensities for signal drift and batch-effects</description>
 
   <requirements>
     <requirement type="package" version="3.3.1">R</requirement>
     <requirement type="package">r-batch</requirement>
     <requirement type="package">r-ade4</requirement>
-    <requirement type="package">r-pcaMethods</requirement>
-    <requirement type="package" version="1.4.2">bioconductor-ropls</requirement>
+    <requirement type="package">bioconductor-pcamethods</requirement>
+    <requirement type="package">bioconductor-ropls</requirement>
   </requirements>
 
   <stdio>
@@ -293,6 +293,13 @@
 NEWS
 ----
 
+CHANGES IN VERSION 2.0.8
+========================
+
+INTERNAL MODIFICATIONS  
+
+ For PCA figure display only ("all_loess_" options): missing values are set to the minimum value before PCA computation is performed (with svd)
+
 CHANGES IN VERSION 2.0.6
 ========================
 
--- a/batch_correction_all_loess_script.R	Tue Aug 09 06:47:41 2016 -0400
+++ b/batch_correction_all_loess_script.R	Sun Oct 09 09:54:00 2016 -0400
@@ -1,10 +1,7 @@
-loessF <- function(datVn, qcaVi, preVi, spnN, vrbL=FALSE) {
+loessF <- function(datVn, qcaVi, preVi, spnN) {
 
     if(length(qcaVi) < 5) {
 
-        if(vrbL)
-            cat("\nWarning: less than 5 '", refC, "'; linear regression will be performed instead of loess regression for this batch\n", sep="")
-
         return(predict(lm(datVn[qcaVi] ~ qcaVi),
                        newdata = data.frame(qcaVi = preVi)))
 
@@ -108,7 +105,12 @@
 
     pcaMN <- datMN
 
-    pcaLs <- opls(pcaMN, predI = 4, printL = FALSE, plotL = FALSE)
+    if(any(is.na(pcaMN))) {
+        minN <- min(pcaMN, na.rm = TRUE)
+        pcaMN[is.na(pcaMN)] <- minN
+    }
+
+    pcaLs <- opls(pcaMN, predI = 4, algoC = "svd", printL = FALSE, plotL = FALSE)
     tMN <- getScoreMN(pcaLs)
     vRelVn <- pcaLs@modelDF[, "R2X"]
 
@@ -263,11 +265,14 @@
 
         batRefVi <- grep(refC.arg, batSamDF[, "sampleType"])
 
+        if(length(batRefVi) < 5)
+            cat("\nWarning: less than 5 '", refC.arg, "'; linear regression will be performed instead of loess regression for this batch\n", sep="")
+
         ## prediction of the loess fit
 
         batLoeMN <- apply(batRawMN,
                           2,
-                          function(rawVn) loessF(rawVn, batRefVi, batAllVi, spnN=spnN.arg, vrbL=TRUE))
+                          function(rawVn) loessF(rawVn, batRefVi, batAllVi, spnN=spnN.arg))
 
         ## normalization
 
--- a/build.xml	Tue Aug 09 06:47:41 2016 -0400
+++ b/build.xml	Sun Oct 09 09:54:00 2016 -0400
@@ -36,7 +36,7 @@
 			<arg value="--conda_prefix"/>
 			<arg value="${conda.dir}"/>
 			<arg value="--galaxy_branch"/>
-			<arg value="release_16.01"/>
+			<arg value="release_16.07"/>
 			<arg value="--conda_dependency_resolution"/>
 			<arg value="${tool.xml}"/>
 		</exec>
--- a/determine_bc.xml	Tue Aug 09 06:47:41 2016 -0400
+++ b/determine_bc.xml	Sun Oct 09 09:54:00 2016 -0400
@@ -5,7 +5,7 @@
     <requirement type="package" version="3.3.1">R</requirement>
     <requirement type="package">r-batch</requirement>
     <requirement type="package">r-ade4</requirement>
-    <requirement type="package">r-pcaMethods</requirement>
+    <requirement type="package">bioconductor-pcamethods</requirement>
   </requirements>
 
   <stdio>
Binary file runit/output/out_graph.pdf has changed