0
|
1 #!/usr/bin/Rscript --vanilla --slave --no-site-file
|
|
2
|
1
|
3
|
|
4 #############################################################################
|
|
5 # WRAPPER for INTENSITY CHECK #
|
|
6 # #
|
|
7 #Script: Script_intensity_check.R #
|
|
8 #Xml: xml_intensity_check.xml #
|
|
9 # #
|
|
10 # #
|
|
11 # Input: Data Matrix, VariableMetadata, SampleMetadata #
|
|
12 # Output: VariableMetadata, Graphics (barplots and boxplots) #
|
|
13 # #
|
|
14 # #
|
|
15 #############################################################################
|
0
|
16
|
|
17
|
|
18 library(batch) #necessary for parseCommandArgs function
|
|
19 args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
|
|
20
|
|
21 source_local <- function(...){
|
|
22 argv <- commandArgs(trailingOnly = FALSE)
|
|
23 base_dir <- dirname(substring(argv[grep("--file=", argv)], 8))
|
|
24 for(i in 1:length(list(...))){source(paste(base_dir, list(...)[[i]], sep="/"))}
|
|
25 }
|
|
26 #Import the different functions
|
|
27 source_local("Script_intensity_check.R", "RcheckLibrary.R")
|
|
28
|
|
29
|
1
|
30 if(length(args) < 8){ stop("NOT enough argument !!!") }
|
|
31
|
0
|
32
|
|
33 class1 <- NULL
|
1
|
34 fold_frac <- NULL
|
0
|
35 if(args$type == "One_class"){
|
|
36 class1 <- args$class1
|
1
|
37 fold_frac <- args$fold_frac
|
0
|
38 }
|
|
39
|
1
|
40
|
0
|
41 #print args
|
|
42 cat("\n-------------------------------\nIntensity Check parameters:\n\n")
|
|
43 print(args)
|
|
44 cat("--------------------------------\n")
|
|
45
|
|
46
|
1
|
47 intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$class_col, args$type,
|
|
48 class1, fold_frac, args$logarithm, args$variableMetadata_out, args$graphs_out)
|
0
|
49
|
|
50 sessionInfo()
|
|
51 cat("--------------------------------\n")
|
|
52
|
|
53 #delete the parameters to avoid the passage to the next tool in .RData image
|
|
54 rm(args)
|