comparison Intchecks/wrapper_intensity_check.R @ 3:bdee2c2c484b draft

Uploaded
author melpetera
date Fri, 08 Mar 2019 09:07:12 -0500
parents 4973a2104cfd
children 49c36c54e0cf
comparison
equal deleted inserted replaced
2:a7553caa2572 3:bdee2c2c484b
7 #Script: Script_intensity_check.R # 7 #Script: Script_intensity_check.R #
8 #Xml: xml_intensity_check.xml # 8 #Xml: xml_intensity_check.xml #
9 # # 9 # #
10 # # 10 # #
11 # Input: Data Matrix, VariableMetadata, SampleMetadata # 11 # Input: Data Matrix, VariableMetadata, SampleMetadata #
12 # Output: VariableMetadata, Graphics (barplots and boxplots) # 12 # Output: VariableMetadata, Graphics #
13 # # 13 # #
14 # # 14 # #
15 ############################################################################# 15 #############################################################################
16 16
17 17
25 } 25 }
26 #Import the different functions 26 #Import the different functions
27 source_local("Script_intensity_check.R", "RcheckLibrary.R") 27 source_local("Script_intensity_check.R", "RcheckLibrary.R")
28 28
29 29
30 if(length(args) < 8){ stop("NOT enough argument !!!") } 30 if(length(args) < 7){ stop("NOT enough argument !!!") }
31 31
32 32 class_col <- NULL
33 test_fold <- NULL
33 class1 <- NULL 34 class1 <- NULL
34 fold_frac <- NULL 35 fold_frac <- NULL
35 if(args$type == "One_class"){ 36 logarithm <- NULL
37 if(args$method == "each_class"){
38 class_col <- args$class_col
39 test_fold <- args$test_fold
40 if(args$test_fold == "Yes"){
41 logarithm <- args$logarithm
42 }
43 }
44 if(args$method == "one_class"){
45 class_col <- args$class_col
36 class1 <- args$class1 46 class1 <- args$class1
37 fold_frac <- args$fold_frac 47 test_fold <- args$test_fold
48 if(args$test_fold == "Yes"){
49 fold_frac <- args$fold_frac
50 logarithm <- args$logarithm
51 }
52 }
53
54 err_no_option <- NULL
55
56 if(((args$method == "no_class")&&(args$chosen_stat == "None"))||
57 ((args$method != "no_class") && (args$chosen_stat == "None") && (test_fold == "No"))){
58 err_no_option<- "You did not select any computational option. Program could not be executed."
59 stop("\n- - - - - - - - -\n",err_no_option,"\n- - - - - - - - -\n")
38 } 60 }
39 61
40 62
41 #print args 63 #print args
42 cat("\n-------------------------------\nIntensity Check parameters:\n\n") 64 cat("\n-------------------------------\nIntensity Check parameters:\n\n")
43 print(args) 65 print(args)
44 cat("--------------------------------\n") 66 cat("--------------------------------\n")
45 67
68 if(is.null(err_no_option)){
46 69
47 intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$class_col, args$type, 70 intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$method, args$chosen_stat,
48 class1, fold_frac, args$logarithm, args$variableMetadata_out, args$graphs_out) 71 class_col, test_fold, class1, fold_frac, logarithm, args$variableMetadata_out, args$graphs_out)
49 72 }
73
50 sessionInfo() 74 sessionInfo()
51 cat("--------------------------------\n") 75 cat("--------------------------------\n")
52 76
53 #delete the parameters to avoid the passage to the next tool in .RData image 77 #delete the parameters to avoid the passage to the next tool in .RData image
54 rm(args) 78 rm(args)