countIntType_batch {netDx} | R Documentation

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

### Description

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

### Usage

    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

    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"))

[Package netDx version 1.1.4 Index]