diff DESeq_render.R @ 3:a520a6c5e111 draft default tip

update
author mingchen0919
date Tue, 27 Feb 2018 15:30:28 -0500
parents 754a36851c6b
children
line wrap: on
line diff
--- a/DESeq_render.R	Tue Feb 27 14:07:10 2018 -0500
+++ b/DESeq_render.R	Tue Feb 27 15:30:28 2018 -0500
@@ -17,11 +17,21 @@
 
 
 #------------get arguments into R--------------------
-# getopt_specification_matrix(extract_short_flags('fastqc_report.xml')) %>%
+# getopt_specification_matrix(extract_short_flags('')) %>%
 #   write.table(file = 'spec.txt', sep = ',', row.names = FALSE, col.names = TRUE, quote = FALSE)
 
 
-spec_matrix = as.matrix()
+spec_matrix = as.matrix(
+  data.frame(stringsAsFactors=FALSE,
+              long_flags = c("X_e", "X_o", "X_d", "X_s", "X_t", "X_P", "X_N",
+                             "X_S", "X_p", "X_w"),
+             short_flags = c("e", "o", "d", "s", "t", "P", "N", "S", "p", "w"),
+     argument_mask_flags = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L),
+         data_type_flags = c("character", "character", "character", "character",
+                             "character", "character", "character",
+                             "character", "character", "character")
+  )
+)
 opt = getopt(spec_matrix)
 #----------------------------------------------------
 
@@ -35,16 +45,17 @@
 # OUTPUT_DIR: path to the output associated directory, which stores all outputs
 # TOOL_DIR: path to the tool installation directory
 # RMD_NAME: name of Rmd file to be rendered
+# OUTPUT_REPORT: path to galaxy output report
 OUTPUT_DIR = opt$X_d
 TOOL_DIR =   opt$X_t
 RMD_NAME = 'DESeq.Rmd'
 OUTPUT_REPORT = opt$X_o
 
 # create the output associated directory to store all outputs
-dir.create(OUT_DIR, recursive = TRUE)
+dir.create(OUTPUT_DIR, recursive = TRUE)
 
 #-----------------render Rmd--------------
-render(paste0(TOOL_DIR, RMD_NAME, sep = '/'), output_file = OUTPUT_REPORT)
+render(paste0(TOOL_DIR, '/', RMD_NAME), output_file = OUTPUT_REPORT)
 #------------------------------------------
 
 #==============the end==============