changeset 11:f9732f6bf218 draft

planemo upload commit 3cad4bb49300f86625d62d40ea7e2ea2ba40e314-dirty
author sblanck
date Thu, 11 May 2017 10:20:35 -0400
parents 56267e3293b2
children 2da91c541ae4
files Analyse.R Analyse.xml
diffstat 2 files changed, 10 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Analyse.R	Thu May 11 08:31:34 2017 -0400
+++ b/Analyse.R	Thu May 11 10:20:35 2017 -0400
@@ -20,7 +20,8 @@
 		make_option("--htmloutput",type="character",default=NULL,help="Output html report"),
 		make_option("--htmloutputpath",type="character",default="NULL",help="Path of output html report"),
 		make_option("--tabularoutput",type="character",default=NULL,help="Output text file"),
-		make_option("--htmltemplate",type="character",default=NULL,help="html template)")
+		make_option("--htmltemplate",type="character",default=NULL,help="html template)"),
+		make_option("--tooldirectory",type="character",default=NULL,help="tool directory)")
 
 	
 );
@@ -62,6 +63,7 @@
 result.path=opt$htmloutputpath
 result.tabular=opt$tabularoutput
 result.template=opt$htmltemplate
+tooldirectory=opt$tooldirectory
 
 #file.copy(targetFile,"./targetFile.txt")
 
@@ -102,18 +104,17 @@
 f <- as.factor(condNames)
 #eset$description <- factors
 design <- model.matrix(~ 0+f)
-design
 
 colnames(design) <- levels(f)
-colnames(design)
+#colnames(design)
 fit <- lmFit(eset, design)
-fit
+
 #cont.matrix <- makeContrasts(C1=paste0(condition1Name,"-",condition2Name), levels=design)
 cont.matrix <- makeContrasts(G0-G1, levels=design)
-cont.matrix
+#cont.matrix
 fit2 <- contrasts.fit(fit, cont.matrix)
 fit2 <- eBayes(fit2)
-fit2
+
 tT <- topTable(fit2, adjust="fdr", sort.by="B", number=nbresult)
 
 #head(exprs(eset))
@@ -121,7 +122,8 @@
 gpl <- annotation(eset)
 if (substr(x = gpl,1,3)!="GPL"){
 	#if the annotation info does not start with "GPL" we retrieve the corresponding GPL annotation
-	mapping=read.csv("gplToBioc.csv",stringsAsFactors=FALSE)
+	print(getwd())
+	mapping=read.csv(paste0(tooldirectory,"/gplToBioc.csv"),stringsAsFactors=FALSE)
 	gpl=mapping[which(mapping$bioc_package==annotation(eset)),]$gpl
 	gpl=gpl[1]
 	
--- a/Analyse.xml	Thu May 11 08:31:34 2017 -0400
+++ b/Analyse.xml	Thu May 11 10:20:35 2017 -0400
@@ -25,6 +25,7 @@
             --htmloutputpath $result_html.files_path
             --tabularoutput $result_tabular
             --htmltemplate ${__tool_directory__}/Analyse_tpl.html
+            --tooldirectory ${__tool_directory__}
         ]]>
     </command>