diff lib.r @ 4:9a1a72ee9418 draft

planemo upload commit 2761472c8afc41d54cecd54cabd1c5a5713514a3-dirty
author lecorguille
date Mon, 25 Apr 2016 09:25:31 -0400
parents 2591056df814
children 972152941964
line wrap: on
line diff
--- a/lib.r	Tue Apr 12 04:14:10 2016 -0400
+++ b/lib.r	Mon Apr 25 09:25:31 2016 -0400
@@ -6,8 +6,8 @@
   pdfEicOutput = paste(new_file_path,filebase,"-eic_visible_pdf",sep="")
   pdfBoxOutput = paste(new_file_path,filebase,"-box_visible_pdf",sep="")
 
-  system(paste("convert ",filebase,"_eic/*.png ",filebase,"_eic.pdf",sep=""))
-  system(paste("convert ",filebase,"_box/*.png ",filebase,"_box.pdf",sep=""))
+  system(paste("gm convert ",filebase,"_eic/*.png ",filebase,"_eic.pdf",sep=""))
+  system(paste("gm convert ",filebase,"_box/*.png ",filebase,"_box.pdf",sep=""))
 
   file.copy(paste(filebase,"_eic.pdf",sep=""), pdfEicOutput)
   file.copy(paste(filebase,"_box.pdf",sep=""), pdfBoxOutput)
@@ -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)))]