Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/interventionalInference.R

This function performs exact Bayesian inference for dynamic Bayesian networks using microarray timecourse data. Several intervention models can be chosen to take into account the effect of inhibitors.

1 2 3 4 5 6 | ```
interventionalInference(y, X0, X1, Z, max.indeg,
g = NULL, Sigma = NULL, inferParents = NULL, allowSelfEdges = TRUE,
perfectOut = FALSE, fixedEffectOut = FALSE, mechanismChangeOut = FALSE,
perfectIn = FALSE, fixedEffectIn = FALSE, mechanismChangeIn = FALSE,
priorType = "uninformed", priorGraph = NULL, priorStrength = 3,
fittedValues = FALSE)
``` |

`y` |
an |

`X0` |
an |

`X1` |
an |

`Z` |
an |

`max.indeg` |
The maximum permitted in-degree for each node. |

`g` |
The constant |

`Sigma` |
an |

`inferParents` |
a vector of node indices specifying which nodes to infer parents for. If omitted, parents are inferred for all nodes. |

`allowSelfEdges` |
Should self-edges be allowed? |

`perfectOut` |
Apply perfect-out interventions? |

`fixedEffectOut` |
Apply fixed-effect-out interventions? |

`mechanismChangeOut` |
Apply mechanism-change-out interventions? Note: cannot be applied with perfect interventions. |

`perfectIn` |
Apply perfect-in interventions? |

`fixedEffectIn` |
Apply fixed-effect-in interventions? |

`mechanismChangeIn` |
Apply mechanism-change-in interventions? Note: cannot be applied with perfect interventions. |

`priorType` |
One of |

`priorGraph` |
A |

`priorStrength` |
The prior strength parameter. Ignored (but don't set it to NA) if |

`fittedValues` |
Perform a second pass to calculate the fitted values? |

This function performs interventional inference with both -in and -out forms of the interventions. The targets of the interventions are specified in the matrix `Z`

.
This assumes that each node is the target of only one intervention - if this is not the case, you must use the `interventionalInferenceAdvanced`

function.
Certain combinations of interventions do not work together, in particular mixtures of perfect and mechanism change interventions. Perfect-in and perfect-out can be used together.
Mechanism-change-in and mechanism-change-out could potentially be used together, but are not currently implemented.

`pep` |
A |

`MAP` |
A |

`parentSets` |
A |

`ll` |
A |

`lpost` |
A |

`MAPprob` |
A |

`MAPmodel` |
A |

`marginal.likelihood` |
A |

`ebPriorStrength` |
Value of |

`yhat` |
The posterior expected fitted values, if |

`inputs` |
A list containing the inputs to |

Simon Spencer

Spencer, S.E.F, Hill, S.M. and Mukherjee, S. (2012) Dynamic Bayesian networks for interventional data. CRiSM pre-print 12-24.

Mukherjee, S. and Speed, T.P. Network inference using informative priors. Proc. Nat. Acad. Sci. USA, 105, 14313-14318.

`interventionalDBN-package`

, `formatData`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | ```
library(interventionalDBN)
data(interventionalData)# loads interventionalData.
# Load your own data spreadsheet using myData<-read.csv("myDataFile.csv").
# Format the data for network inference
d<-formatData(interventionalData)
# Perform network inference without modelling interventions.
myNetwork0<-interventionalInference(d$y,d$X0,d$X1,max.indeg=3,fittedValues=TRUE)
# EGFRi is active in conditions 2 and 4, AKTi is active in conditions 3 and 4.
# Each condition has 8 timepoints.
Z<-matrix(0,32,15)
Z[9:16,1]<-1 # EGFR (node 1) is inhibited in condition 2
Z[25:32,1]<-1 # EGFR (node 1) is inhibited in condition 4
Z[17:24,8]<-1 # AKT (node 8) is inhibited in condition 3
Z[25:32,8]<-1 # AKT (node 8) is inhibited in condition 4
# Perform network inference with perfect-out and fixed-effect-out interventions.
myNetwork1<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
perfectOut=TRUE,fixedEffectOut=TRUE)
# Perform network inference on with mechanism-change-out interventions.
myNetwork2<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
mechanismChangeOut=TRUE)
# Perform network inference with Mukherjee Prior that prefers to omit self-edges.
myNetwork3<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
perfectOut=TRUE,fixedEffectOut=TRUE,
priorType="Mukherjee",priorGraph=matrix(1,15,15)-diag(rep(1,15)),priorStrength=2)
# Compare with self-edge peps with myNetwork1
diag(myNetwork1$pep)-diag(myNetwork3$pep)
# Perform network inference with Hamming Prior that prefers self-edges,
# and use Empirical Bayes to choose the priorStrength.
myNetwork4<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
perfectOut=TRUE,fixedEffectOut=TRUE,
priorType="Hamming",priorGraph=diag(rep(1,15)),priorStrength=0:10/2)
# You should always check to see if the Empirical Bayes appears to be working.
plotMaxML(myNetwork4)
# Now let's try using using the gradients as the response.
# Note that we have to tranfser Sigma this time, as it is no longer the identity.
d<-formatData(interventionalData,gradients=TRUE,initialIntercept=FALSE)
# There are now only 28 observations
Z<-Z[c(2:8,10:16,18:24,26:32),]
# Perform network inference on gradients with perfect-in interventions.
myNetwork5<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
Sigma=d$Sigma,perfectIn=TRUE,fittedValues=TRUE)
# Perform network inference on gradients with perfect-in and -out plus fixed-effect out.
myNetwork6<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
Sigma=d$Sigma,perfectIn=TRUE,perfectOut=TRUE)
``` |

```
n = 32
4 conditions:
Cell line 1 : 32 samples.
Inhibitor DMSO : 8 samples.
Inhibitor EGFRi : 8 samples.
Inhibitor AKTi : 8 samples.
Inhibitor EGFRi+AKTi : 8 samples.
Stimulus EGF : 32 samples.
Time 0 : 4 samples.
Time 1 : 4 samples.
Time 2 : 4 samples.
Time 3 : 4 samples.
Time 4 : 4 samples.
Time 5 : 4 samples.
Time 6 : 4 samples.
Time 7 : 4 samples.
n = 32 , nodes = 15
a = 2
Processing 576 models Thu Feb 15 19:00:21 2018
Estimated duration 0.006641853 minutes.
Actual duration 0.00287329 minutes.
Renormalising...
Calculating posterior edge probabilities...
Second pass to calculate fitted values.
Processing 576 models Thu Feb 15 19:00:21 2018
Estimated duration 0.001730164 minutes.
Actual duration 0.001817445 minutes.
There were 30 warnings (use warnings() to see them)
n = 32 , nodes = 15
a = 2
Processing 576 models Thu Feb 15 19:00:22 2018
Estimated duration 0.002505203 minutes.
Actual duration 0.002237006 minutes.
Renormalising...
Calculating posterior edge probabilities...
n = 32 , nodes = 15
a = 2
Processing 576 models Thu Feb 15 19:00:22 2018
Estimated duration 0.002322327 minutes.
Actual duration 0.00212299 minutes.
Renormalising...
Calculating posterior edge probabilities...
n = 32 , nodes = 15
a = 2
Calculating Mukherjee prior distances...
Processing 576 models Thu Feb 15 19:00:22 2018
Estimated duration 0.002428505 minutes.
Actual duration 0.00226171 minutes.
Renormalising...
Calculating posterior edge probabilities...
EGFR SRC STAT5 Mek MAPK p90RSK
0.0046655008 0.0321807546 0.0193949190 0.4521366353 0.1640169488 0.3428126799
PDK AKT GSK TSC2 BAD mTOR
0.0299131972 0.0002571015 0.0264121878 0.0419788332 0.0244489213 0.0214989373
p70S6K S6 FOXO3
0.0137144364 0.0287549737 0.0165578318
n = 32 , nodes = 15
a = 2
Calculating Hamming prior distances...
Processing 576 models Thu Feb 15 19:00:22 2018
Estimated duration 0.002620583 minutes.
Actual duration 0.002297449 minutes.
Renormalising...
Calculating posterior edge probabilities...
n = 28
4 conditions:
Cell line 1 : 28 samples.
Inhibitor DMSO : 7 samples.
Inhibitor EGFRi : 7 samples.
Inhibitor AKTi : 7 samples.
Inhibitor EGFRi+AKTi : 7 samples.
Stimulus EGF : 28 samples.
Time 1 : 4 samples.
Time 2 : 4 samples.
Time 3 : 4 samples.
Time 4 : 4 samples.
Time 5 : 4 samples.
Time 6 : 4 samples.
Time 7 : 4 samples.
n = 28 , nodes = 15
a = 1
Processing 576 models Thu Feb 15 19:00:22 2018
Estimated duration 0.005882149 minutes.
Actual duration 0.00575312 minutes.
Renormalising...
Calculating posterior edge probabilities...
Second pass to calculate fitted values.
Processing 576 models Thu Feb 15 19:00:23 2018
Estimated duration 0.005549492 minutes.
Actual duration 0.005937044 minutes.
n = 28 , nodes = 15
a = 1
Processing 576 models Thu Feb 15 19:00:23 2018
Estimated duration 0.007381874 minutes.
Actual duration 0.006840448 minutes.
Renormalising...
Calculating posterior edge probabilities...
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.