DBNScoreStep1: First order dependence graph G(1) inference

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

Description

Given a time series dataset for p genes, this function infers a 1st order dependence score matrix S1 (p \times p) which contains the score of each edge of a Dynamic Bayesian Network (DAG G(1)) describing first order dependencies between successives variables. The smallest score points out the most significant edge for the 1st order dependence DAG G(1). The sets of both predictor and target genes can be reduced to different subsets of the p genes. DBNScoreStep1 is the first step of the estimation procedure described in the references. See function DBNScoreStep2 to perform the second step selection and infer a score matrix describing full order dependencies.

Usage

1
DBNScoreStep1(data,method='ls',predPosition=NULL,targetPosition=NULL)

Arguments

data

a matrix with n rows (=time points) and p columns (=genes) containing the gene expression time series.

method

currently M estimation with either LS, Tukey bisquare or Huber estimator:

c('ls','tukey','huber'), default='ls'.

predPosition

To be specified to reduce the set of possible predictor genes to a subset of d<p genes: an array included in [1,p] defining the position of the d predictor genes in the data matrix (n \times p), default=NULL.

targetPosition

To be specified to reduce the set of possible target genes to a subset of r<p genes: an array included in [1,p] defining the position of the r target genes in the data matrix (n \times p), default=NULL.

Value

A list with out$S1ls a matrix with \mathrm{min}(r,p) rows (=target genes) and \mathrm{min}(d,p) columns (=predictor genes) containing the scores S1 obtained with least square estimator, out$S1huber a matrix containing scores S1 obtained with Huber estimator, out$S1tukey a matrix containing scores S1 obtained with Tukey bisquare (or biweight) estimator.(out$S1ls[i,j] is the score for the edge j ≤ftarrow i pointing out from predictor j toward target i.)

Note

For a large number of target genes, it is of interest to parallel run the procedure DBNScoreStep1 for each target gene by running p the following jobs for i=1… p,

outi <- DBNScoreStep1(data, target=i).

Author(s)

Lebre Sophie (http://icube-bfo.unistra.fr/en/index.php/Sophie_Lebre),

Chiquet Julien (http://stat.genopole.cnrs.fr/~jchiquet).

References

Lebre, S. 2009. Inferring dynamic bayesian network with low order independencies, Statistical Applications in Genetics and Molecular Biology, 2009: Vol. 8: Iss. 1, Article 9.

See Also

DBNScoreStep2, BuildEdges, PRcurve.

Examples

 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
## load G1DBN Library
library(G1DBN)

data(arth800line)
data<-as.matrix(arth800line)
id<-c(60, 141, 260, 333, 365, 424, 441, 512, 521, 578, 789, 799)
names<-c("carbohydrate/sugar transporter","ATGPX2","putative integral
membrane prot" ,
"AT3G05900", "At3g27350", "At1g16720","ATISA3/ISA3","AT4G32190",
"catalase", "plasma membrane intrinsic prot", "At4g16146", "DPE2")

## compute score S1 
out<-DBNScoreStep1(data,method='ls', targetPosition=id,predPosition=id)
round(out$S1ls,2)


## Threshold for the selection of the edges after Step 1
alpha1=0.5
## Build the edges with id as label
edgesG1id<-BuildEdges(score=out$S1ls,threshold=alpha1,
                       targetNames=id,predNames=id,prec=6)
## Build the edges with names as label
edgesG1names<-BuildEdges(score=out$S1ls,threshold=alpha1,
                         targetNames=names,predNames=names,prec=6)
edgesG1id[1:15,]
edgesG1names[1:15,]


## compute score S2 from S1 
S2<-DBNScoreStep2(out$S1ls,data,method='ls',alpha1=alpha1,
                  predPosition=id,targetPosition=id)
S2

## Threshold for the selection of the edges after Step 2
alpha2=0.05
## Build the edges with id as label
edgesG2id<-BuildEdges(score=S2,threshold=alpha2,
                      targetNames=id,predNames=id,prec=6)
## Build the edges with names as label
edgesG2names<-BuildEdges(score=S2,threshold=alpha2,
                         targetNames=names,predNames=names,prec=6)
edgesG2id
edgesG2names


## As the number of genes is reduced to 10 here, this results slightly differ
## from the results obtained in the paper (Lebre, 2009) cited in References.


## ======================================
## PLOTTING THE RESULTS...
## ______________________________________
## Not run: 
## The Inferred Nets
## -----------------

## Nodes coordinates are calculated according to the global structure of the graph
all_parents=c(edgesG1id[,1], edgesG2id[,1])
all_targets=c(edgesG1id[,2], edgesG2id[,2])
posEdgesG1=1:dim(edgesG1id)[1]
posEdgesG2=(dim(edgesG1id)[1]+1):length(all_targets)

## Global network with all the edges
netAll = graph.edgelist(cbind(as.character(all_parents),as.character(all_targets )))

## Nodes coordinates
nodeCoord=layout.fruchterman.reingold(netAll)


split.screen(c(1,2))

# after Step 1
screen(1)
# set the edges list
netG1 = graph.edgelist(cbind(as.character(edgesG1id[,1]),as.character(edgesG1id[,2])))
# set the object for plotting the network with global coordinates of all nodes
G1toPlot=delete.edges(netAll, E(netAll)[posEdgesG2] )
# plot the network
plot(G1toPlot, layout=nodeCoord, vertex.label = 
get.vertex.attribute(G1toPlot , name="name"), edge.arrow.size = 0.2,
main="G1DBN Inferred network:\n Step 1")

# after Step 2
screen(2)
# set the edges list

netG2 = graph.edgelist(cbind(as.character(edgesG2id[,1]),as.character(edgesG2id[,2])))
# set the object for plotting the network with global coordinates of all nodes
G2toPlot=delete.edges(netAll, E(netAll)[posEdgesG1] )
# plot the network
plot(G2toPlot, layout=nodeCoord, vertex.label = 
get.vertex.attribute(G2toPlot , name="name"),edge.arrow.size = 0.2,
main="G1DBN Inferred network:\n Step 2")

close.screen(all = TRUE)

## End(Not run)

Example output

Loading required package: MASS
Loading required package: igraph

Attaching package: 'igraph'

The following objects are masked from 'package:stats':

    decompose, spectrum

The following object is masked from 'package:base':

    union

Treating 12 vertices:
10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 
      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [,11] [,12]
 [1,] 0.96 0.99 0.95 0.98 0.95 0.95 0.61 0.99 0.85  0.94  0.94     0
 [2,] 0.60 0.97 0.92 0.79 0.92 0.08 0.43 0.95 0.93  0.86  0.82     0
 [3,] 0.82 0.91 0.87 0.97 0.83 0.97 0.97 0.85 0.60  0.68  0.43     0
 [4,] 0.86 0.93 0.98 0.91 0.77 0.44 0.47 0.76 0.69  0.81  0.88     0
 [5,] 0.99 0.99 0.97 0.69 0.93 0.57 0.45 0.99 0.85  0.97  0.73     0
 [6,] 0.97 0.97 0.98 0.97 0.92 0.38 0.59 0.92 0.89  0.99  0.93     0
 [7,] 0.71 0.92 0.98 0.99 0.93 0.35 0.55 0.98 0.86  0.99  0.89     0
 [8,] 0.43 0.97 0.79 0.99 0.99 0.77 0.62 0.96 0.80  0.92  0.96     0
 [9,] 0.84 0.86 0.99 0.89 0.84 0.44 0.47 0.95 0.56  0.98  0.96     0
[10,] 0.89 0.91 0.95 0.80 0.94 0.31 0.36 0.96 0.95  0.93  0.86     0
[11,] 0.83 0.97 0.92 0.98 0.90 0.22 0.82 0.97 0.88  0.98  0.90     0
[12,] 0.95 0.87 0.96 0.75 0.98 0.24 0.60 0.99 0.70  0.99  0.84     0
      Pred Target    Score
 [1,]  799    441 0.000000
 [2,]  799    260 0.000000
 [3,]  799    424 0.000000
 [4,]  799    789 0.000000
 [5,]  799    333 0.000000
 [6,]  799    578 0.000002
 [7,]  799    365 0.000003
 [8,]  799    512 0.000004
 [9,]  799     60 0.000004
[10,]  799    521 0.000006
[11,]  799    141 0.000024
[12,]  799    799 0.000049
[13,]  424    141 0.080329
[14,]  424    789 0.223773
[15,]  424    799 0.237105
      Pred        Target                             Score     
 [1,] "DPE2"      "ATISA3/ISA3"                      "0"       
 [2,] "DPE2"      "putative integral\nmembrane prot" "0"       
 [3,] "DPE2"      "At1g16720"                        "0"       
 [4,] "DPE2"      "At4g16146"                        "0"       
 [5,] "DPE2"      "AT3G05900"                        "0"       
 [6,] "DPE2"      "plasma membrane intrinsic prot"   "2e-06"   
 [7,] "DPE2"      "At3g27350"                        "3e-06"   
 [8,] "DPE2"      "AT4G32190"                        "4e-06"   
 [9,] "DPE2"      "carbohydrate/sugar transporter"   "4e-06"   
[10,] "DPE2"      "catalase"                         "6e-06"   
[11,] "DPE2"      "ATGPX2"                           "2.4e-05" 
[12,] "DPE2"      "DPE2"                             "4.9e-05" 
[13,] "At1g16720" "ATGPX2"                           "0.080329"
[14,] "At1g16720" "At4g16146"                        "0.223773"
[15,] "At1g16720" "DPE2"                             "0.237105"
           [,1] [,2] [,3] [,4] [,5]        [,6]      [,7] [,8] [,9] [,10]
 [1,]        NA   NA   NA   NA   NA          NA        NA   NA   NA    NA
 [2,]        NA   NA   NA   NA   NA 0.057481250 0.4462198   NA   NA    NA
 [3,]        NA   NA   NA   NA   NA          NA        NA   NA   NA    NA
 [4,]        NA   NA   NA   NA   NA 0.834565939 0.1985818   NA   NA    NA
 [5,]        NA   NA   NA   NA   NA          NA 0.4472457   NA   NA    NA
 [6,]        NA   NA   NA   NA   NA 0.093391292        NA   NA   NA    NA
 [7,]        NA   NA   NA   NA   NA 0.087434598        NA   NA   NA    NA
 [8,] 0.2110705   NA   NA   NA   NA          NA        NA   NA   NA    NA
 [9,]        NA   NA   NA   NA   NA 0.762332106 0.8580382   NA   NA    NA
[10,]        NA   NA   NA   NA   NA 0.484504489 0.9807137   NA   NA    NA
[11,]        NA   NA   NA   NA   NA 0.172879975        NA   NA   NA    NA
[12,]        NA   NA   NA   NA   NA 0.008166515        NA   NA   NA    NA
          [,11]        [,12]
 [1,]        NA 1.471160e-10
 [2,]        NA 2.832079e-05
 [3,] 0.3826499 4.383087e-08
 [4,]        NA 5.583852e-07
 [5,]        NA 2.722249e-06
 [6,]        NA 2.229491e-07
 [7,]        NA 2.302728e-08
 [8,]        NA 6.436842e-08
 [9,]        NA 1.619752e-05
[10,]        NA 6.472977e-06
[11,]        NA 4.138759e-07
[12,]        NA 2.393478e-05
      Pred Target    Score
 [1,]  799     60 0.000000
 [2,]  799    441 0.000000
 [3,]  799    260 0.000000
 [4,]  799    512 0.000000
 [5,]  799    424 0.000000
 [6,]  799    789 0.000000
 [7,]  799    333 0.000001
 [8,]  799    365 0.000003
 [9,]  799    578 0.000006
[10,]  799    521 0.000016
[11,]  799    799 0.000024
[12,]  799    141 0.000028
[13,]  424    799 0.008167
      Pred        Target                             Score     
 [1,] "DPE2"      "carbohydrate/sugar transporter"   "0"       
 [2,] "DPE2"      "ATISA3/ISA3"                      "0"       
 [3,] "DPE2"      "putative integral\nmembrane prot" "0"       
 [4,] "DPE2"      "AT4G32190"                        "0"       
 [5,] "DPE2"      "At1g16720"                        "0"       
 [6,] "DPE2"      "At4g16146"                        "0"       
 [7,] "DPE2"      "AT3G05900"                        "1e-06"   
 [8,] "DPE2"      "At3g27350"                        "3e-06"   
 [9,] "DPE2"      "plasma membrane intrinsic prot"   "6e-06"   
[10,] "DPE2"      "catalase"                         "1.6e-05" 
[11,] "DPE2"      "DPE2"                             "2.4e-05" 
[12,] "DPE2"      "ATGPX2"                           "2.8e-05" 
[13,] "At1g16720" "DPE2"                             "0.008167"
[1] 1 2

G1DBN documentation built on May 2, 2019, 3:41 p.m.

Related to DBNScoreStep1 in G1DBN...