compileFeatures: Create GeneMANIA database

Description Usage Arguments Details Value Examples

View source: R/compileFeatures.R

Description

Create GeneMANIA database

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
compileFeatures(
  netDir,
  outDir = tempdir(),
  simMetric = "pearson",
  netSfx = "txt$",
  verbose = TRUE,
  numCores = 1L,
  P2N_threshType = "off",
  P2N_maxMissing = 100,
  JavaMemory = 4L,
  altBaseDir = NULL,
  debugMode = FALSE,
  ...
)

Arguments

netDir

(char) path to dir with input networks/profiles. All networks in this directory will be added to the GM database. Note: This needs to be an absolute path, not relative.

outDir

(char) path to dir in which GeneMANIA database is created. The database will be under outDir/dataset.

simMetric

(char) similarity measure to use in converting profiles to interaction networks.

netSfx

(char) pattern for finding network files in netDir.

verbose

(logical) print messages

numCores

(integer) num cores for parallel processing

P2N_threshType

(char) Most users shouldn't have to change this. ProfileToNetworkDriver's threshold option. One of 'off|auto'. unit testing

P2N_maxMissing

(integer 5-100)

JavaMemory

(integer) Memory for GeneMANIA (in Gb)

altBaseDir

(char) Only use this if you're developing netDx. Used in unit tests

debugMode

(logical) when TRUE runs jobs in serial instead of parallel and prints verbose messages. Also prints system Java calls and prints all standard out and error output associated with these calls.

...

params for writeQueryBatchFile()

Details

Creates a generic_db for use with GeneMania QueryRunner. The database is in tab-delimited format, and indexes are built using Apache lucene. NOTE: This pipeline expects input in the form of interaction networks and not profiles. Profile tables have patient-by-datapoint format (e.g. patient-by-genotype) Interaction networks have pairwise similarity measures: <PatientA> <PatientB><similarity> Documentation: https://github.com/GeneMANIA/pipeline/wiki/GenericDb

Value

(list). 'dbDir': path to GeneMANIA database 'netDir': path to directory with interaction networks. If profiles are provided, this points to the INTERACTIONS/ subdirectory within the text-based GeneMANIA generic database If the DB creation process results in an erorr, these values return NA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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)
netList <- createPSN_MultiData(dataList=dataList, groupList=groupList,
    pheno=pheno_id,netDir=netDir,customFunc=makeNets,verbose=TRUE)

outDir <- paste(tmpDir,'dbdir',sep=getFileSep()); 
dir.create(outDir)
dbDir <- compileFeatures(netDir,outDir)

netDx documentation built on Dec. 11, 2020, 2:01 a.m.