Illustration of the time-varying DBN formalism. (A) Regulatory motif among three genes that we wish to model. Crucially, regulatory interactions do not persist over the whole time course considered here, but are turned "on" and "off" at different times. The labels on the edges indicate at what times an edge points to or influences the expression of the target gene.(B) Because Bayesian networks (BNs) are constrained to have a directed acyclic graph (DAG) structure, they cannot contain loops or cycles. Therefore the motif in (A) can only be imperfectly represented using a conventional BN formalism which does not take temporal ordering into account; if X3 is statistically independent of X1 provided X2 is known, we can construct two alternative representations, P(X1, X2, X3) = P(X3|X2).P(X2|X1).P(X1) and P(X1, X2, X3) = P(X3|X2).P(X1|X2).P(X2).(C) If time-course expression measurements are available we can unravel the feedback cycles and loops over time. Such dynamical Bayesian networks (DBN) represent the interactions by assuming that at each given time, all the parental nodes come from the previous time point. At the top of this panel we show the DBN constructed assuming a time-homogenous DBN; at the bottom of (C) we show the time-varying DBN constructed by the new algorithm. (D) Changepoint vectors for each of the three genes obtained for the time-varying DBN representation of the motif in (A). (E) The sets of regression models corresponding to the three nodes X1, X2 and X3 in the inferred phases. Vertical dotted lines correspond to changepoints separating distinct phases for each node. Compulsory changepoints at the start and the end of the process (i.e. at t = 2 and t = n + 1) are indicated by the black dotted lines; inferred changepoints for each gene are shown in blue, green and red, corresponding to the colours of the genes (as used in parts (A), (B) and (C) of this figure).