Description Details Author(s) See Also Examples
This package allows a dynamic Bayesian network to be inferred from microarray timecourse data with interventions (inhibitors).
Package: | interventionalDBN |
Type: | Package |
Version: | 1.2.2 |
Date: | 2014-01-03 |
License: | GPL version 2 or newer |
LazyLoad: | yes |
Includes functions for formating the data (formatData
), estimating the effects of an intervention (interventionEffects
) and
performing network inference (interventionalInference
).
Simon Spencer
Maintainer: Simon Spencer <s.e.f.spencer@warwick.ac.uk>
interventionalInferenceAdvanced
, countGraphs
, interventionalData
, linesROC
, nxt
, trueMatrix
, warshall
.
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 | library(interventionalDBN)
data(interventionalData)# loads interventionalData.
# Load your own data spreadsheet using myData<-read.csv("myDataFile.csv").
# Estimate nodes downstream of intervention.
egfriEffects<-interventionEffects(interventionalData,1,"DMSO","EGFRi")
aktiEffects <-interventionEffects(interventionalData,1,"DMSO","AKTi")
# Format the data for network inference
d<-formatData(interventionalData)
# 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
myNetwork<-interventionalInference(d$y,d$X0,d$X1,Z,max.indeg=3,
perfectOut=TRUE,fixedEffectOut=TRUE)
# Make ROC curve, to see how well we have done.
data(trueMatrix)
plot(0:1,0:1,t="l",col="grey",xlab="False positive rate",ylab="False negative rate",
main="ROC curve showing network inference performance.")
redArea<-linesROC(trueMatrix,myNetwork$pep) # ROC area is also sent to the console.
# More realistically, the true edge matrix is unknown.
# We can use descendancy to get (a much coarser) ROC,
# which is based only on nodes that are downstream of the inhibitors.
pap<-warshall(myNetwork$pep)
effectMatrix<-matrix(NA,15,15)
effectMatrix[1,]<-1*(egfriEffects$p.values<=0.1)
effectMatrix[8,]<-1*( aktiEffects$p.values<=0.1)
blueArea<-linesROC(effectMatrix,myNetwork$pep,col="blue")
legend("bottomright",c("Edge matrix known","Descendancy ROC"),col=c("red","blue"),lty=1)
|
Stimulus EGF : 8 / 8 baseline observations used.
Stimulus EGF : 8 / 8 inhibited observations used.
Stimulus EGF : 8 / 8 baseline observations used.
Stimulus EGF : 8 / 8 inhibited observations used.
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 Tue Jan 29 07:52:44 2019
Estimated duration 0.002873474 minutes.
Actual duration 0.002172311 minutes.
Renormalising...
Calculating posterior edge probabilities...
red ROC area = 0.7266314
blue ROC area = 0.8888889
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.