comparison Intchecks/wrapper_intensity_check.R @ 1:4973a2104cfd draft

Uploaded
author melpetera
date Wed, 05 Dec 2018 10:27:45 -0500
parents c2c2e1be904a
children bdee2c2c484b
comparison
equal deleted inserted replaced
0:c2c2e1be904a 1:4973a2104cfd
1 #!/usr/bin/Rscript --vanilla --slave --no-site-file 1 #!/usr/bin/Rscript --vanilla --slave --no-site-file
2 2
3 #################################################################### 3
4 # WRAPPER for INTENSITY CHECK 4 #############################################################################
5 #Script: Script_intensity_check_v1.R 5 # WRAPPER for INTENSITY CHECK #
6 #Xml: xml_intensity_check_v1.xml 6 # #
7 # 7 #Script: Script_intensity_check.R #
8 # V1: Fold and NA 8 #Xml: xml_intensity_check.xml #
9 # 9 # #
10 # Input: Data Matrix, VariableMetadata, SampleMetadata 10 # #
11 # Output: VariableMetadata, Graphics (barplots and boxplots) 11 # Input: Data Matrix, VariableMetadata, SampleMetadata #
12 # 12 # Output: VariableMetadata, Graphics (barplots and boxplots) #
13 # 13 # #
14 #################################################################### 14 # #
15 #############################################################################
15 16
16 17
17 library(batch) #necessary for parseCommandArgs function 18 library(batch) #necessary for parseCommandArgs function
18 args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects 19 args = parseCommandArgs(evaluate=FALSE) #interpretation of arguments given in command line as an R list of objects
19 20
24 } 25 }
25 #Import the different functions 26 #Import the different functions
26 source_local("Script_intensity_check.R", "RcheckLibrary.R") 27 source_local("Script_intensity_check.R", "RcheckLibrary.R")
27 28
28 29
29 if(length(args) < 7){ stop("NOT enough argument !!!") } 30 if(length(args) < 8){ stop("NOT enough argument !!!") }
31
30 32
31 class1 <- NULL 33 class1 <- NULL
34 fold_frac <- NULL
32 if(args$type == "One_class"){ 35 if(args$type == "One_class"){
33 class1 <- args$class1 36 class1 <- args$class1
37 fold_frac <- args$fold_frac
34 } 38 }
39
35 40
36 #print args 41 #print args
37 cat("\n-------------------------------\nIntensity Check parameters:\n\n") 42 cat("\n-------------------------------\nIntensity Check parameters:\n\n")
38 print(args) 43 print(args)
39 cat("--------------------------------\n") 44 cat("--------------------------------\n")
40 45
41 46
42 intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$type, 47 intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$class_col, args$type,
43 args$class_col, class1, args$variableMetadata_out, args$graphs_out) 48 class1, fold_frac, args$logarithm, args$variableMetadata_out, args$graphs_out)
44 49
45 sessionInfo() 50 sessionInfo()
46 cat("--------------------------------\n") 51 cat("--------------------------------\n")
47 52
48 #delete the parameters to avoid the passage to the next tool in .RData image 53 #delete the parameters to avoid the passage to the next tool in .RData image