comparison biosigner_wrapper.R @ 2:b2414be87d4b draft

planemo upload for repository https://github.com/workflow4metabolomics/biosigner.git commit d85321a93588817e9e8884b90dde6331292bbe79
author ethevenot
date Sat, 06 Aug 2016 12:17:12 -0400
parents 48e4be935243
children fa80bd02055f
comparison
equal deleted inserted replaced
1:4ff502a46189 2:b2414be87d4b
1 #!/usr/bin/env Rscript 1 #!/usr/bin/env Rscript
2 2
3 library(batch) ## parseCommandArgs 3 library(batch) ## parseCommandArgs
4 4
5 argVc <- unlist(parseCommandArgs(evaluate=FALSE)) 5 argVc <- unlist(parseCommandArgs(evaluate=FALSE))
6
7
8 #### Start_of_tested_code <- function() {}
9 6
10 7
11 ##------------------------------ 8 ##------------------------------
12 ## Initializing 9 ## Initializing
13 ##------------------------------ 10 ##------------------------------
170 tierVc <- tierFullVc[1:which(tierFullVc == tierMaxC)] 167 tierVc <- tierFullVc[1:which(tierFullVc == tierMaxC)]
171 168
172 if(sum(tierMC %in% tierVc)) { 169 if(sum(tierMC %in% tierVc)) {
173 cat("\nSignificant features from '", paste(tierVc, collapse = "', '"), "' tiers:\n", sep = "") 170 cat("\nSignificant features from '", paste(tierVc, collapse = "', '"), "' tiers:\n", sep = "")
174 print(tierMC[apply(tierMC, 1, function(rowVc) sum(rowVc %in% tierVc) > 0), , 171 print(tierMC[apply(tierMC, 1, function(rowVc) sum(rowVc %in% tierVc) > 0), ,
175 drop = FALSE]) 172 drop = FALSE])
173
176 cat("\nAccuracy:\n") 174 cat("\nAccuracy:\n")
177 print(round(getAccuracyMN(bsnLs), 3)) 175 print(round(getAccuracyMN(bsnLs), 3))
178 } else 176 } else
179 cat("\nNo significant variable found for any classifier\n") 177 cat("\nNo significant variable found for any classifier\n")
180 178
220 218
221 sink() 219 sink()
222 220
223 options(stringsAsFactors = strAsFacL) 221 options(stringsAsFactors = strAsFacL)
224 222
225
226 #### End_of_tested_code <- function() {}
227
228
229 rm(list = ls()) 223 rm(list = ls())
230 224