Mercurial > repos > mingchen0919 > aurora_deseq2
diff deseq2_render.R @ 3:caae0a188548 draft
add deseq2 package
| author | mingchen0919 |
|---|---|
| date | Thu, 08 Mar 2018 21:03:01 -0500 |
| parents | 405d8fa2f560 |
| children | cadfcfb4036d |
line wrap: on
line diff
--- a/deseq2_render.R Thu Mar 08 20:13:30 2018 -0500 +++ b/deseq2_render.R Thu Mar 08 21:03:01 2018 -0500 @@ -17,12 +17,25 @@ #------------get arguments into R-------------------- -library(dplyr) -getopt_specification_matrix(extract_short_flags('deseq2.xml')) %>% - write.table(file = 'spec.txt', sep = ',', row.names = FALSE, col.names = TRUE, quote = FALSE) +# library(dplyr) +# getopt_specification_matrix(extract_short_flags('deseq2.xml')) %>% +# 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_A", "X_B", + "X_C", "X_D", "X_E", "X_F", "X_G", "X_H", "X_I"), + short_flags = c("e", "o", "d", "s", "t", "A", "B", "C", "D", "E", + "F", "G", "H", "I", "J"), + argument_mask_flags = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, + 1L, 1L), + data_type_flags = c("character", "character", "character", "character", + "character", "character", "character", "character", + "character", "character", "character", "character", + "character", "character", "character") + ) +) opt = getopt(spec_matrix) #---------------------------------------------------- @@ -35,16 +48,16 @@ #---------- often used variables ---------------- # OUTPUT_DIR: path to the output associated directory, which stores all outputs # TOOL_DIR: path to the tool installation directory -OUTPUT_DIR = '' -TOOL_DIR = '' -RMD_NAME = '' +OUTPUT_DIR = opt$X_d +TOOL_DIR = opt$X_t +RMD_NAME = 'deseq2.Rmd' OUTPUT_REPORT = opt$X_o # create the output associated directory to store all outputs 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==============
