diff xcms_differential_analysis.r @ 8:ddef5534c294

new tool diffreport
author pieter.lukasse@wur.nl
date Thu, 06 Nov 2014 13:06:25 +0100
parents 627ddbd15823
children
line wrap: on
line diff
--- a/xcms_differential_analysis.r	Thu Nov 06 11:32:16 2014 +0100
+++ b/xcms_differential_analysis.r	Thu Nov 06 13:06:25 2014 +0100
@@ -38,22 +38,17 @@
 			xcmsSet <- readRDS(args.xsetData)
 			
 			# info: levels(xcmsSet@phenoData$class) also gives access to the class names
-			
-			reporttab <- diffreport(xcmsSet, args.class1, args.class2, args.htmlReportFile.files_path, args.topcount, metlin = 0.15, h=480, w=640)
+			dir.create(file.path(args.htmlReportFile.files_path), showWarnings = FALSE)
+			reporttab <- diffreport(xcmsSet, args.class1, args.class2, paste(args.htmlReportFile.files_path,"/fig", sep=""), args.topcount, metlin = 0.15, h=480, w=640)
 			
 			# write out tsv table:
 			write.table(reporttab, args.outTable, sep="\t", row.names=FALSE)
 			
 			message("\nGenerating report.........")
-			# report
-			dir.create(file.path(args.htmlReportFile.files_path), showWarnings = FALSE)
-			# setwd(file.path(args.htmlReportFile.files_path))
-			file.rename("fig_eic", paste(args.htmlReportFile.files_path, "/fig_eic"))
-			
 			
 			cat("<html><body><h1>Differential analysis report</h1>", file= args.htmlReportFile)
 			#HTML(reporttab[1:args.topcount,], file= args.htmlReportFile)
-			figuresPath <- paste(args.htmlReportFile.files_path, "_eic", sep="")
+			figuresPath <- paste(args.htmlReportFile.files_path, "/fig_eic", sep="")
 			message(figuresPath)
 			listOfFiles <- list.files(path = figuresPath)
 			for (i in 1:length(listOfFiles))