setupFeatureDB {netDx} | R Documentation |
Creates all the input files for the collection of features used in feature selection.
setupFeatureDB(pheno, prepDir = tempdir())
pheno |
(data.frame) patient metadata. Must contain ID column |
prepDir |
(char) directory in which to setup database |
(data.frame) internal numerical id for patients (INTERNAL_ID) and user-provided ID (ID)
data(xpr,pheno) pathwayList <- list(pathA=rownames(xpr)[1:10],pathB=rownames(xpr)[21:50]) dataList <- list(rna=xpr) #only one layer type groupList <- list(rna=pathwayList) # group genes by pathways makeNets <- function(dataList, groupList, netDir,...) { netList <- makePSN_NamedMatrix(dataList[['rna']], rownames(dataList[['rna']]), groupList[['rna']],netDir,verbose=FALSE, writeProfiles=TRUE,...) unlist(netList) } tmpDir <- tempdir(); netDir <- paste(tmpDir,"nets",sep=getFileSep()) dir.create(netDir,recursive=TRUE) pheno_id <- setupFeatureDB(pheno,netDir)