##Create the genetic interaction matrix
gInt <- sample(c(0, 1), 25, TRUE)
iMat <- matrix(gInt, nrow=5, ncol=5, dimnames=list(letters[1:5],letters[4:8]))
##Create the interactome
cInt <- sample(c(0,1),30, TRUE)
interactome <- matrix(cInt, nrow=6, ncol=5,dimnames=list(letters[2:7],LETTERS[1:5]))
## Reduce the genetic interaction matrix to match the gene present in
## the interactome
reducediMat <- gi2Interactome(iMat, interactome)
## Get the interaction
prey <- letters[1:20]
myInteraction <- getInteraction(reducediMat, prey, interactome)
Run the code above in your browser using DataLab