countIntType_batch: Counts number of (+,+) and (+,-) interactions in a set of...

Description Usage Arguments Value Examples

View source: R/sparsenet_enrichment_functions.R

Description

Counts number of (+,+) and (+,-) interactions in a set of networks

Usage

1
2
3
4
5
6
7
8
countIntType_batch(
  inFiles,
  plusID,
  minusID,
  tmpDir = tempdir(),
  enrType = "binary",
  numCores = 1L
)

Arguments

inFiles

(char) path to interaction networks to process

plusID

(char) IDs of + nodes

minusID

(char) IDs of - nodes

tmpDir

(char) path to dir where temporary files can be stored

enrType

(char) see getEnr.R

numCores

(integer) number of cores for parallel processing

Value

(matrix) two columns, one row per network If enrType="binary", number of (+,+) and other interactions Otherwise if enrType="corr" mean edge weight of (+,+) edges and of other edges

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
d <- tempdir()
# write PSN
m1 <- matrix(c("P1","P1","P2","P2","P3","P4",1,1,1),byrow=FALSE,ncol=3)
write.table(m1,file=paste(d,"net1.txt",sep=getFileSep()),sep="\t",
col.names=FALSE,row.names=FALSE,quote=FALSE)
m2 <- matrix(c("P3","P4",1),nrow=1)
write.table(m2,file=paste(d,"net2.txt",sep=getFileSep()),sep="\t",
col.names=FALSE,row.names=FALSE,quote=FALSE)

countIntType_batch(paste(d,c("net1.txt","net2.txt"),sep=getFileSep()),
	c("P1","P2","P3"),c("P4","P5"))

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