Mercurial > repos > sblanck > mpagenomics
comparison selectionExtracted.R @ 4:3fcbb8030fcc draft
"planemo upload for repository https://github.com/sblanck/MPAgenomics4Galaxy/tree/master/mpagenomics_wrappers commit 40eda5ea3551e8b3bae32d0a8f405fe90ef22646-dirty"
author | sblanck |
---|---|
date | Mon, 12 Apr 2021 14:47:09 +0000 |
parents | 4d539083cf7f |
children |
comparison
equal
deleted
inserted
replaced
3:94fc6ed13946 | 4:3fcbb8030fcc |
---|---|
48 #nbFolds=as.numeric(args[4]) | 48 #nbFolds=as.numeric(args[4]) |
49 #loss=args[5] | 49 #loss=args[5] |
50 #output=args[6] | 50 #output=args[6] |
51 | 51 |
52 library(MPAgenomics) | 52 library(MPAgenomics) |
53 workdir=file.path(tmp_dir, "mpagenomics") | 53 workdir=file.path(tmp_dir) |
54 if (!dir.exists(workdir)) | |
55 dir.create(workdir, showWarnings = TRUE, recursive = TRUE) | |
54 setwd(workdir) | 56 setwd(workdir) |
55 | 57 |
56 if (outputlog){ | 58 if (outputlog){ |
57 sinklog <- file(log, open = "wt") | 59 sinklog <- file(log, open = "wt") |
58 sink(sinklog ,type = "output") | 60 sink(sinklog ,type = "output") |
68 listOfFile=resp[[1]] | 70 listOfFile=resp[[1]] |
69 responseValue=resp[[2]] | 71 responseValue=resp[[2]] |
70 index = match(listOfFile,rownames(CNsignalMatrix)) | 72 index = match(listOfFile,rownames(CNsignalMatrix)) |
71 responseValueOrder=responseValue[index] | 73 responseValueOrder=responseValue[index] |
72 | 74 |
73 result=variableSelection(CNsignalMatrix,responseValueOrder,nbFolds=nbFolds,loss=loss,plot=TRUE) | 75 result=variableSelection(CNsignalMatrix,responseValueOrder,nbFolds=nbFolds,loss=loss,plot=FALSE) |
74 | 76 |
75 CNsignalResult=CN[result$markers.index,(names(CN)%in% drops)] | 77 CNsignalResult=CN[result$markers.index,(names(CN)%in% drops)] |
76 | 78 |
77 CNsignalResult["coefficient"]=result$coefficient | 79 CNsignalResult["coefficient"]=result$coefficient |
78 CNsignalResult["index"]=result$markers.index | 80 CNsignalResult["index"]=result$markers.index |