Mercurial > repos > melpetera > intensity_checks
diff Intchecks/wrapper_intensity_check.R @ 3:bdee2c2c484b draft
Uploaded
author | melpetera |
---|---|
date | Fri, 08 Mar 2019 09:07:12 -0500 |
parents | 4973a2104cfd |
children | 49c36c54e0cf |
line wrap: on
line diff
--- a/Intchecks/wrapper_intensity_check.R Mon Jan 14 08:17:26 2019 -0500 +++ b/Intchecks/wrapper_intensity_check.R Fri Mar 08 09:07:12 2019 -0500 @@ -9,7 +9,7 @@ # # # # # Input: Data Matrix, VariableMetadata, SampleMetadata # -# Output: VariableMetadata, Graphics (barplots and boxplots) # +# Output: VariableMetadata, Graphics # # # # # ############################################################################# @@ -27,14 +27,36 @@ source_local("Script_intensity_check.R", "RcheckLibrary.R") -if(length(args) < 8){ stop("NOT enough argument !!!") } +if(length(args) < 7){ stop("NOT enough argument !!!") } - +class_col <- NULL +test_fold <- NULL class1 <- NULL fold_frac <- NULL -if(args$type == "One_class"){ +logarithm <- NULL +if(args$method == "each_class"){ + class_col <- args$class_col + test_fold <- args$test_fold + if(args$test_fold == "Yes"){ + logarithm <- args$logarithm + } +} +if(args$method == "one_class"){ + class_col <- args$class_col class1 <- args$class1 - fold_frac <- args$fold_frac + test_fold <- args$test_fold + if(args$test_fold == "Yes"){ + fold_frac <- args$fold_frac + logarithm <- args$logarithm + } +} + +err_no_option <- NULL + +if(((args$method == "no_class")&&(args$chosen_stat == "None"))|| + ((args$method != "no_class") && (args$chosen_stat == "None") && (test_fold == "No"))){ + err_no_option<- "You did not select any computational option. Program could not be executed." + stop("\n- - - - - - - - -\n",err_no_option,"\n- - - - - - - - -\n") } @@ -43,10 +65,12 @@ print(args) cat("--------------------------------\n") +if(is.null(err_no_option)){ -intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$class_col, args$type, - class1, fold_frac, args$logarithm, args$variableMetadata_out, args$graphs_out) - + intens_check(args$dataMatrix_in, args$sampleMetadata_in, args$variableMetadata_in, args$method, args$chosen_stat, + class_col, test_fold, class1, fold_frac, logarithm, args$variableMetadata_out, args$graphs_out) +} + sessionInfo() cat("--------------------------------\n")