diff lib.r @ 15:77a191e37af4 draft

planemo upload commit 9d47e3b467dbbe0af0d90a937c5e9f2c4b958c4b
author lecorguille
date Mon, 25 Apr 2016 11:06:59 -0400
parents e98ca7f0dcbd
children 85b8351ded6c
line wrap: on
line diff
--- a/lib.r	Fri Apr 22 08:36:37 2016 -0400
+++ b/lib.r	Mon Apr 25 11:06:59 2016 -0400
@@ -114,7 +114,7 @@
 }
 
 
-combinexsAnnos_function <- function(xaP, xaN, diffrepP=NULL,diffrepN=NULL,convert_param=FALSE,pos=TRUE,tol=2,ruleset=NULL,keep_meta=TRUE, variableMetadataOutput="variableMetadata.tsv"){
+combinexsAnnos_function <- function(xaP, xaN, listOFlistArgumentsP,listOFlistArgumentsN, diffrepP=NULL,diffrepN=NULL,convert_param=FALSE,pos=TRUE,tol=2,ruleset=NULL,keep_meta=TRUE, variableMetadataOutput="variableMetadata.tsv"){
 
   #Load the two Rdata to extract the xset objects from positive and negative mode
   cat("\tObject xset from positive mode\n")
@@ -143,12 +143,15 @@
 
   if(pos){
     xa=xaP
+    listOFlistArgumentsP=listOFlistArguments
     mode="neg. Mode"
   } else {
     xa=xaN
+    listOFlistArgumentsN=listOFlistArguments
     mode="pos. Mode"
   }
-  peakList=getPeaklist(xa,intval=listArguments[["intval"]])
+  intval = "into"; for (steps in names(listOFlistArguments)) { if (!is.null(listOFlistArguments[[steps]]$intval)) intval = listOFlistArguments[[steps]]$intval }
+  peakList=getPeaklist(xa,intval=intval)
   peakList=cbind(groupnames(xa@xcmsSet),peakList); colnames(peakList)[1] = c("name");
   variableMetadata=cbind(peakList, cAnnot[, c("isotopes", "adduct", "pcgroup",mode)]);
   variableMetadata=variableMetadata[,!(colnames(variableMetadata) %in% c(sampnames(xa@xcmsSet)))]