countIntType: Counts the number of (+,+) and (+,-) interactions in a single...

Description Usage Arguments Value Examples

View source: R/sparsenet_enrichment_functions.R

Description

Counts the number of (+,+) and (+,-) interactions in a single network

Usage

1
countIntType(inFile, plusID, minusID)

Arguments

inFile

(char) path to interaction networks

plusID

(char) vector of + nodes

minusID

(char) vector of - nodes

Value

(numeric of length 2) Number of (+,+) interactions, and non-(+,+) interactions (i.e. (+,-) and (-,-) interactions)

Examples

1
2
3
4
5
6
7
8
9
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)

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

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