Mercurial > repos > eschen42 > w4mcorcov
comparison w4mcorcov_wrapper.R @ 14:90708fdbc22d draft default tip
"planemo upload for repository https://github.com/HegemanLab/w4mcorcov_galaxy_wrapper/tree/master commit 5fd9687d543a48a715b1180caf93abebebd58b0e"
author | eschen42 |
---|---|
date | Wed, 18 Nov 2020 18:53:37 +0000 |
parents | 2ae2d26e3270 |
children |
comparison
equal
deleted
inserted
replaced
13:2ae2d26e3270 | 14:90708fdbc22d |
---|---|
2 | 2 |
3 # This script assumes that it is being executed in a current working directory containing the following files: | 3 # This script assumes that it is being executed in a current working directory containing the following files: |
4 # - w4mcorcov_lib.R | 4 # - w4mcorcov_lib.R |
5 # - w4mcorcov_input.R | 5 # - w4mcorcov_input.R |
6 # - w4mcorcov_calc.R | 6 # - w4mcorcov_calc.R |
7 | 7 options(warn=1) |
8 ## constants | 8 ## constants |
9 ##---------- | 9 ##---------- |
10 | 10 |
11 modNamC <- "w4mcorcov" ## module name | 11 modNamC <- "w4mcorcov" ## module name |
12 | 12 |
106 my_env$facC <- as.character(argVc["facC"]) | 106 my_env$facC <- as.character(argVc["facC"]) |
107 my_env$pairSigFeatOnly <- as.logical(argVc["pairSigFeatOnly"]) | 107 my_env$pairSigFeatOnly <- as.logical(argVc["pairSigFeatOnly"]) |
108 my_env$levCSV <- as.character(argVc["levCSV"]) | 108 my_env$levCSV <- as.character(argVc["levCSV"]) |
109 my_env$matchingC <- as.character(argVc["matchingC"]) | 109 my_env$matchingC <- as.character(argVc["matchingC"]) |
110 my_env$labelFeatures <- as.character(argVc["labelFeatures"]) # number of features to label at each extreme of the loadings or 'ALL' | 110 my_env$labelFeatures <- as.character(argVc["labelFeatures"]) # number of features to label at each extreme of the loadings or 'ALL' |
111 my_env$min_crossval_i <- as.character(argVc["min_crossval_i"]) # Minumum number of samples for OPLS-DA cross-validation | |
111 my_env$fdr_features <- as.character(argVc["fdr_features"]) # number of features to consider when adjusting p-value, or 'ALL' | 112 my_env$fdr_features <- as.character(argVc["fdr_features"]) # number of features to consider when adjusting p-value, or 'ALL' |
112 my_env$cplot_o <- as.logical(argVc["cplot_o"]) # TRUE if orthogonal C-plot is requested | 113 my_env$cplot_o <- as.logical(argVc["cplot_o"]) # TRUE if orthogonal C-plot is requested |
113 my_env$cplot_p <- as.logical(argVc["cplot_p"]) # TRUE if parallel C-plot is requested | 114 my_env$cplot_p <- as.logical(argVc["cplot_p"]) # TRUE if parallel C-plot is requested |
114 my_env$cplot_y <- as.character(argVc["cplot_y"]) # Choice of covariance/correlation for Y-axis on C-plot | 115 my_env$cplot_y <- as.character(argVc["cplot_y"]) # Choice of covariance/correlation for Y-axis on C-plot |
115 | 116 |
126 labelfeatures_check <- FALSE | 127 labelfeatures_check <- FALSE |
127 } | 128 } |
128 if ( !labelfeatures_check ) { | 129 if ( !labelfeatures_check ) { |
129 my_log("invalid argument: labelFeatures") | 130 my_log("invalid argument: labelFeatures") |
130 print(label_features) | 131 print(label_features) |
132 quit(save = "no", status = 10, runLast = TRUE) | |
133 } | |
134 | |
135 min_crossval_i <- my_env$min_crossval_i | |
136 crossval_check <- TRUE | |
137 if ( is.na(min_crossval_i) ) { | |
138 crossval_check <- FALSE | |
139 } else if ( is.null(min_crossval_i) ) { | |
140 crossval_check <- FALSE | |
141 } else { | |
142 if ( is.na(as.numeric(min_crossval_i)) ) | |
143 crossval_check <- FALSE | |
144 else if ( as.numeric(min_crossval_i) < 0 ) | |
145 crossval_check <- FALSE | |
146 } | |
147 if ( !crossval_check ) { | |
148 my_log("invalid argument: min_crossval_i") | |
149 print(min_crossval_i) | |
131 quit(save = "no", status = 10, runLast = TRUE) | 150 quit(save = "no", status = 10, runLast = TRUE) |
132 } | 151 } |
133 | 152 |
134 corcov_tsv_colnames <- TRUE | 153 corcov_tsv_colnames <- TRUE |
135 corcov_tsv_append <- FALSE | 154 corcov_tsv_append <- FALSE |