setupFeatureDB: setup database of features for feature selection

Description Usage Arguments Value Examples

View source: R/setupFeatureDB.R

Description

Creates all the input files for the collection of features used in feature selection.

Usage

1

Arguments

pheno

(data.frame) patient metadata. Must contain ID column

prepDir

(char) directory in which to setup database

Value

(data.frame) internal numerical id for patients (INTERNAL_ID) and user-provided ID (ID)

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
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)

BaderLab/netDx documentation built on Sept. 26, 2021, 9:13 a.m.