\name{runSimulators}
\alias{runSimulators}

\title{Function that sets up the ISI et al to run the simulations}
\description{
  The runSimulators function is the primary function for the simulation tool. It first takes in an in the incidence matrix of the silico interactome's (ISI)
  bipartite graph representation. Since not all the proteins are documented in the
  ISI, it also appends all proteins found in the organism to the
  ISI. From there, we derive the Protein-Protein
  Co-Membership (PPCM) matrix. We then only take the rows indexed by
  baits, and apply all the simulated errors to this matrix. The result
  is an error model simulation of an AP-MS experiment.
}
\usage{
runSimulators(TSNMat, vBaits, vDeform, vStky, rateFP, rateFN, rateD, rateS, missedProt, seedIn)
}

\arguments{
  \item{TSNMat}{Incidence Matrix of ISI's bipartite graph representation}
  \item{vBaits}{ The vector of baits used in the simulated AP-MS experiment}
  \item{vDeform}{ The vector of deformed baits }
  \item{vStky}{ The vector of sticky baits }
  \item{rateFP}{ Rate at which AP-MS returns FP's }
  \item{rateFN}{ Rate at which AP-MS returns FN's }
  \item{rateD}{ Rate(s) at which the deformed baits return FN's }
  \item{rateS}{ Rate(s) at which the sticky baits return FP's }
  \item{missedProt}{ The vector of proteins that have trivial co-membership and not recorded by the ISI}
  \item{seedIn}{ Seed used in the random generator which allows the user
  to set the seed for reproducible experiments}
}
\details{
 The details of the function are as follows. TSNMat and vBaits have been described. The vStky and vDeformed are baits that account for systematic errors called sticky protein errors and deformed protein error, and the rateS and rateD are the rates for the respective systematic errors. The missedProt are those who are in no protein complex and thus not recorded in the ISI, but needed for simulation.
}
\value{
  The return value for this function is a rectangular matrix with rows
  indexed by the baits and the columns indexed by all proteins in the
  organism. This matrix will differ from the PPCM matrix in that it
  will have FN/FP's embedded from the simulated error functions.
}

\author{ Tony Chiang }

\seealso{\code{\link{simulator}}}
\examples{
data(simEX)
data(vBaits)
data(missedProtEX)
runSimulators(simEX, vBaits[2:4], vBaits[2], vBaits[3], 0.05, 0.1, 0, 0, missedProtEX, 357)
}
\keyword{misc}