Skip to contents

This function runs the MONSTER algorithm. Biological states are characterized by distinct patterns of gene expression that reflect each phenotype's active cellular processes. Driving these phenotypes are gene regulatory networks in which transcriptions factors control when and to what degree individual genes are expressed. Phenotypic transitions, such as those that occur when disease arises from healthy tissue, are associated with changes in these networks. MONSTER is an approach to understanding these transitions. MONSTER models phenotypic-specific regulatory networks and then estimates a "transition matrix" that converts one state to another. By examining the properties of the transition matrix, we can gain insight into regulatory changes associated with phenotypic state transition. Important note: the direct regulatory network observed from gene expression is currently implemented as a regular correlation as opposed to the partial correlation described in the paper. Citation: Schlauch, Daniel, et al. "Estimating drivers of cell state transitions using gene regulatory network models." BMC systems biology 11.1 (2017): 139.


  nullPerms = 100,
  ni_method = "BERE",
  ni.coefficient.cutoff = NA,
  numMaxCores = 1,
  outputDir = NA,
  alphaw = 0.5,
  mode = "buildNet"



Gene Expression dataset, can be matrix or data.frame of expression values or ExpressionSet.


Binary vector indicating case control partition. 1 for case and 0 for control.


Regulatory data.frame consisting of three columns. For each row, a transcription factor (column 1) regulates a gene (column 2) with a defined strength (column 3), usually taken to be 0 or 1


number of random permutations to run (default 100). Set to 0 to only calculate observed transition matrix. When mode is is 'buildNet' it randomly permutes the case and control expression samples, if mode is 'regNet' it will randomly permute the case and control networks.


String to indicate algorithm method. Must be one of "bere","pearson","cd","lda", or "wcd". Default is "bere"


numeric to specify a p-value cutoff at the network inference step. Default is NA, indicating inclusion of all coefficients.


requires doParallel, foreach. Runs MONSTER in parallel computing environment. Set to 1 to avoid parallelization, NA will take the default parallel pool in the computer.


character vector specifying a directory or path in which which to save MONSTER results, default is NA and results are not saved.


A weight parameter between 0 and 1 specifying proportion of weight to give to indirect compared to direct evidence. The default is 0.5 to give an equal weight to direct and indirect evidence.


A parameter telling whether to build the regulatory networks ('buildNet') or to use provided regulatory networks ('regNet'). If set to 'regNet', then the parameters motif, ni_method, ni.coefficient.cutoff, and alphaw will be set to NA.


An object of class "monsterAnalysis" containing results


# Example with the network reconstruction step
design <- c(rep(0,20),rep(NA,10),rep(1,20))
yeast$[$] <- mean(as.matrix(yeast$,na.rm=TRUE)
#monsterRes <- monster(yeast$[1:500,], design, yeast$motif, nullPerms=10, numMaxCores=1)
# Example with provided networks
# \donttest{
pandaResult <- panda(pandaToyData$motif, pandaToyData$expression, pandaToyData$ppi)
control=matrix(rexp(nelemReg, rate=.1), ncol=nGenes)
colnames(control) = colnames(case)
rownames(control) = rownames(case) 
expr =,case))
design=c(rep(0,nGenes),rep(1, nGenes))
monsterRes <- monster(expr, design, motif=NA, nullPerms=10, numMaxCores=1, mode='regNet')
# }