# BFL: a node and edge betweenness based fast layout algorithm for large scale networks

- Tatsunori B Hashimoto†
^{1}, - Masao Nagasaki†
^{2}Email author, - Kaname Kojima
^{2}and - Satoru Miyano
^{2}

**10**:19

**DOI: **10.1186/1471-2105-10-19

© Hashimoto et al; licensee BioMed Central Ltd. 2009

**Received: **01 September 2008

**Accepted: **15 January 2009

**Published: **15 January 2009

## Abstract

### Background

Network visualization would serve as a useful first step for analysis. However, current graph layout algorithms for biological pathways are insensitive to biologically important information, e.g. subcellular localization, biological node and graph attributes, or/and not available for large scale networks, e.g. more than 10000 elements.

### Results

To overcome these problems, we propose the use of a biologically important graph metric, betweenness, a measure of network flow. This metric is highly correlated with many biological phenomena such as lethality and clusters. We devise a new fast parallel algorithm calculating betweenness to minimize the preprocessing cost. Using this metric, we also invent a node and edge betweenness based fast layout algorithm (BFL). BFL places the high-betweenness nodes to optimal positions and allows the low-betweenness nodes to reach suboptimal positions. Furthermore, BFL reduces the runtime by combining a sequential insertion algorim with betweenness. For a graph with *n* nodes, this approach reduces the expected runtime of the algorithm to *O*(*n*^{2}) when considering edge crossings, and to *O*(*n* log *n*) when considering only density and edge lengths.

### Conclusion

Our BFL algorithm is compared against fast graph layout algorithms and approaches requiring intensive optimizations. For gene networks, we show that our algorithm is faster than all layout algorithms tested while providing readability on par with intensive optimization algorithms. We achieve a 1.4 second runtime for a graph with 4000 nodes and 12000 edges on a standard desktop computer.

## Background

Advances in biotechnology have made it possible to collect vast amounts of genetic data. Although extensive research has been done on numerical and statistical methods to infer the relationship among genes, which we call gene networks, methods for analyzing such data visualizing large gene networks has received less attention.

There exists significant former literature on general graph layout algorithms such as orthogonal drawing, planar embedding, force-directed layout [1]. Similarly, metabolic networks with relatively small numbers of nodes (<100) have received significant attention, with notable algorithms being proposed by Karp [2], and [3]. However, these algorithms are designed with fundamentally different goals than those for gene networks. Well known fast graph-theoretic algorithms such as Sugiyama [4], radial tree [5] are capable of drawing large graphs, but give degenerate results for large and dense graphs. On the other hand, force based algorithms such as spring embedder [6] are able to produce symmetric and aesthetic results, but become intractable in the case of large datasets, and fail to represent biological datasets. Former work in incorporating biologically information [7, 8] applies simple positional constraints, but do not scale well to large networks. It has also been noted that such algorithms fail to produce compact layouts [9].

Optimizing algorithms rely on minimizing an underlying metric, and have been used to great success. Grid-layout [3, 9, 10] has been used in cellular circuits to incorporate complex constraints, while multidimensional scaling [11] along with planar subgraph extraction [12], which maps an artificial metric to Euclidean space, has been used to create fast algorithms incorporating biological attributes.

All of the above approaches have their drawbacks; they either fail to reflect biological relationships in the layout or fail to scale for large problems. This problem arises because utilizing biological facts is a computationally expensive operation [9, 10] which most algorithms are not designed for. Grid layout [13] for example, requires satisfying biologically meaningful component placements.

This paper introduces a fast, biologically relevant layout algorithm using the concept called betweenness.

Betweenness is most commonly used as a way of analyzing social networks [14, 15]. This metric was first proposed by Freeman *et al*. [14] as a way to characterize sparsely connected graphs. Betweenness centrality for certain types of flow is known as an indicator of traffic through a certain node or edge [14, 16, 17]. The index has previously been used in ranking websites and clustering in social networks [15].

Biologically, betweenness is useful when the digraph relationship correspond to information flow. In this case modules from betweenness represents informationally isolated modules while the high betweenness nodes and edges are hubs and links with high betweenenss.

BFL is of interest in large gene, and protein networks. Protein and gene networks allow for a straightforward attack with BFL, in that a straightforward weighted layout will produce biologically relevant results, as they represent interaction networks. Metabolic networks on the other hand should first be analyzed with modularity analysis [11]. This is because the genes of interest are often not those with the highest information content (which would be common ATP, NADH pathways) but rather those which function uniquely.

Specifically, given *σ*_{
st
}defined as the number of shortest paths between nodes *s* and *t*, and *σ*_{
st
}(*v*) defined as the number of shortest paths passing through *v* (and *s, t* ≠ *v*), betweenness is defined as the sum of *σ*_{
st
}(*v*)/*σ*_{
st
}for all nodes *s* and *t* in the graph. In other words, betweenness is the sum of the probabilities of *v* being in the shortest path between any two nodes. This definition of node betweenness has been extended to edges by Newman *et al*. as a way to extract community structures [15]. Edge betweenness is similarly defined as above by taking the sum of *σ*_{
st
}(*e*)/*σ*_{
st
}, where *σ*_{
st
}(*e*) is defined as the number of shortest paths between *s* and *t* passing through edge *e*.

Recently, betweenness has become of interest in bioinformatics because of its biological importance in gene and protein networks. Specifically, it has been shown that betweenness values correctly identify bridge proteins [18], protein modules [11, 16, 19], and essential proteins [20].

Although there are other measures which fulfill the above measures, such as random walk betweenness [19] and eigenvector centrality [19], these measures have a higher runtime complexity and produce similar values. In some isolated cases, such as an extremely dense graph, these measures may result in better layout, although we consider that in general the runtime trade-off is unnecessary.

These results imply first that clusters generated with Girvan-Newman's algorithm [15] using edge betweenness accurately represent clusters in protein function [11]. Second, high betweenness value nodes are biologically important to the function of the gene network. Finally, betweenness based layout correctly identifies bridges, which is valuable to graph layout techniques. We attach a standard biological dataset by Luo *et al*. [21] to show these properties.

The remainder is organized as follows. In the methods section, we first define betweenness and then we demonstrate an efficient parallel algorithm for calculating betweenness. We then present a new node and edge betweenness based fast layout algorithm (BFL) and the specific score methods. Lastly, we present the expected runtime of the layout methods. In the results and discussion section, we show the effects of graph size and confirm the effectiveness of our approach on runtime. We then compare the run-times and outputs of various networks with other layout algorithms, and also show that betweenness is crucial to our algorithm.

## Methods

### Definition of betweenness

We will use the same notation originally developed by Brandes [17] to describe node and edge betweenness calculations. First, let *G* = (*V, E*) be a connected directed graph. We define *σ*_{
ab
}to be the number of shortest paths between nodes *a* and *b* in *G*. We then define *σ*_{
ab
}(*n*) as the number of shortest paths between *a* and *b* which go through *n* ∈ *V*. In this paper, for each edge *e* ∈ *E*, we denote *e*_{
p
}and *e*_{
c
}to be the originating and destination nodes respectively.

*v*is defined as

*e*is defined as

- (i)
If the graph is a TSP, following property is satisfied for

*a, b*∈*V*with*a*as an ascendant of*b*.

*σ*

_{ ab }(

*n*) =

*σ*

_{ an }·

*σ*

_{ nb }. (3)

- (ii)Similarly for each edge
*e*∈*E*, we define the sigma operator*σ*_{ ab }(*e*) to be the number of paths from*a*to*b*which pass through edge*e*. In a TSP, we have${\sigma}_{ab}(e)={\sigma}_{a{e}_{p}}\cdot {\sigma}_{{e}_{c}b}.$(4)

We propose a new forward algorithm where we start at the root node and propagate downwards. This allows us to parallelize the operations in a much more straightforward way compared to the backwards algorithm as in the next section.

### Parallelized betweenness calculation

Brandes [17] previously showed an implementation for calculating edge betweenness values. We show that the forward algorithm operates upon the same principle while allowing for parallelism.

Given a graph *G*, we start by running Dijkstra's algorithm on each node *v* and storing all shortest paths from node *v* to all other nodes. This gives us a TSP *T* comprises of shortest paths from *v*.

Our algorithm attempts to break down the betweenness calculation for shortest paths starting at each node *v* in a recurrent relation.

*v*) for a node

*v*∈

*V*consists of the internal sum and the external sum (see Equation 1). Given the TSP

*T*containing the shortest paths from

*v*∈

*V*, we can obtain the internal sum of the node betweenness, i.e. $\sum}_{{v}_{j}\in V/\left\{v\right\}}\frac{{\sigma}_{{v}_{i}{v}_{j}}(v)}{{\sigma}_{{v}_{i}{v}_{j}}$. For this node

*v*, we can derive a recursive relation for ${\sigma}_{{v}_{i}{v}_{j}}(v)$ in terms of the number of paths through its destination

*k*as,

The first term can be seen as the additional contribution made from the new edge between *v* and *k*. The latter term can be seen as the contributions of all nodes downstream of *k*. A proof of the correctness of the backwards form of this equation is given in [17].

*e*as:

*v*in the previous derivation equal to

*e*

_{ p }and

*k*equal to

*e*

_{ c }, we have that

This equation implies that the operations involved in calculating node betweenness can be used for edge betweenness values.

This algorithm can be parallelized for each *v* ∈ *V* since the operations from each TSP *T* are independent. Therefore, this is a more efficient algorithm than many of the current methods, which depend on calculating node betweenness before edge betweenness.

The method presented in [17] relied upon this approach, but started at *v*_{
j
}rather than *v*_{
i
}. This is an obstacle for parallelization since the values of some *v*_{
j
}cannot be fixed unlike those for *v*_{
i
}.

For large networks, betweenness values become extremely large for central nodes, while terminal nodes with no children have zero centrality. In order to make this metric more suited for layout, we take the log centrality for both edge and betweenness (we add value one to the original betweenness value in order to avoid log(0)).

### Edge and node betweenness based fast layout algorithm BFL

*edge and node betweenness based fast layout algorithm*(BFL) is executed as in Tables 1 and 2.

Variable legend and overall layout algorithm

Global Variables | ||
---|---|---|

Type | Name | Detail |

Priority Queue |
| Queue of nodes with largest node betweenness first |

Array |
| Betweenness values for node |

2D Array |
| Edge betweenness from |

Set |
| Empty set (contains nodes already placed) |

Map |
| Empty multi-value map (Key – node, Value – orphans with |

Tree |
| Tree contains a quadtree containing nodes in Table 4 |

Constants | ||

double |
| controls how far from the parent nodes are initially placed |

double |
| lower values force tighter convergence constraints |

double |
| controls how far nodes are moved each iteration |

integer |
| controls when to cut off simulated annealing loops |

double |
| controls how much density is used in score calculation |

double |
| controls how much edge lengths are used |

double |
| controls how important edge crossings are |

int |
| sets how large each bucket can be in the quadtree |

Fast Edge and Node Betweenness Based Layout Algorithm

1: procedure LAYOUT |
---|

2: Deque |

3: Set |

4: Push |

5: |

6: Deque |

7: |

8: PlaceNode( |

9: |

10: |

11: Put ( |

12: |

13: |

14: |

15: |

16: |

17: Set |

18: Anneal( |

19: Push |

20: Get |

21: |

22: PlaceNode( |

23: |

24: |

As described in introduction section, for the BFL layout algorithm, we mainly care following two points; (i) the important elements (high betweenness nodes and edges) should be emphasized in the resulting layout, (ii) the layout algorithm should run in real-time for large scale gene networks (around 10000 elements).

A naïve implementation of betweenness would scale scores as part of an optimizing algorithm. Such a naïve method was initially investigated, but incorporating betweenness in a global optimization algorithm caused significant slowdowns (conflicting with (ii)). The global optimization incurred a large penalty because the scaling forced high-betweenness nodes with strict tolerances to be optimized in a sea of lower-betweenness nodes.

For the above reason, instead of using a global optimization approach in BFL, we created a local optimization procedure which took advantage of the properties of betweenness and minimized the loss of quality. BFL places one node at a time in order of descending betweenness instead of placing all nodes at once (see lines 5 to 14 in Table 2). In BFL, simulated annealing is used to place the inserted node by minimizing the score function (the detail of this function is defined in the next section).

The execution steps of BFL in Tables 1 and 2 is summarized as follows. Initially, BFL stores all nodes to the priority queue *Q*, in which each node is prioritized with the node betweenness value (highest value is at the head) and creates an empty set *S* that is used to store the already placed nodes. In the first step, dequeue the top node in *Q*, put the node to *S*, and set the position of the node to (0,0). In the main recursive loop (lines 5 to 14), dequeue the current head node *v* in *Q* and check whether or not *S* contains a neighbor of *v*. (i) If *S* does not contain a neighbor, all edges connected to *v* are inserted into a map *H* (lines 9–13) and is not added the *v* to *S*. (ii) If *S* contains a neighbor of *v* (lines 7–9), the *v* is inserted to *S* (line 19) and one node *v'* in *S* is with the highest edge betweenness is selected and placed the *v* at the initial coordinate randomly drawn from a Gaussian centered at *v* with variance *c*_{1}·*NodeBC*[*v*]^{2} (line 17). The initial coordinate is optimized by using the annealing method described in the next section (line 18). In (ii), all nodes connected to *v* in *H* are also placed in the same manner (line 21). We separate execution branches (i) and (ii) in order to resolve orphan nodes. Since insertion order depends only on betweenness, there are some nodes which are disconnected from the currently placed graph *S*. In this case we put this node on a dependency queue, and place the node as soon as the dependency is fulfilled.

This significantly speeds up BFL layout since only nodes directly connected to the newly inserted node is needed to calculate the score function in each insertion step, i.e. pairwise effects elsewhere on the graph do not need to be calculated at all.

BFL runtime is further shorten by using following two properties. In the beginning phase, few nodes are already placed and score calculation proceeds quickly. Later, on the other hand, the inserted nodes will have few edges (since the value of betweenness is low), leading to much looser score tolerances and fewer children to process (the effectiveness of those properties are confirmed in later section with simulation test).

### Simulated annealing with betweenness based score function

*v*

_{ i }∈

*V*by optimizing the following score function (which is referred to as EnergeOf in Table 3)

Score functions.

1: procedure ENERGY OF( |
---|

2: Add |

3: Add |

4: Add |

5: Return |

6: |

7: |

8: |

9: Add |

10: |

12: |

13: |

14: Return |

15: |

16: |

17: |

18: Add |

19: |

20: Return |

21: |

22: |

23: |

24: Add |

25: |

26: Return |

27: |

where ${E}_{{v}_{i}}$ is the connected edges to the node *v*_{
i
}, ${{G}^{\prime}}_{i}=({{V}^{\prime}}_{i},{{E}^{\prime}}_{i})$ is the subgraph before inserting node *v*_{
i
}, and *k*_{1} + *k*_{2} + *k*_{3} = 1 (NodeDensity, EdgeLength and EdgeCross are defined later).

Similar metrics have been used in [22] and there have been aesthetic justifications for their use. Simulated annealing is even more suited in this case because of its robustness and single-point performance. While there are very efficient algorithms such as genetic, particle swarm, or ant colony optimization for parallel optimization procedures, BFL reduces global optimization to a series of local optimization problems, which removes the need for parallel optimization. In this case, nearly all stochastic optimization problems become a variant of simulated annealing. On the other hand, hill climbing and BFGS based numerical optimization procedures are not robust enough for this problem. The optimization landscape is extremely multimodal (as each vertex becomes a local mode) and therefore the chance of local minima are extremely high.

In our score function, values of node and edge betweennesses are effectively used to ensure that high betweenness nodes are given more emphasis than low-betweenness ones with low calculation cost.

#### Node density function

*v*

_{ i }into a set of already placed nodes ${{V}^{\prime}}_{i}$

where $\text{NB}(v)={\displaystyle \sum _{{v}_{i}\in V}{\displaystyle \sum _{{v}_{j}\in V\backslash \left\{{v}_{i}\right\}}\frac{{\sigma}_{{v}_{i}{v}_{j}}(v)}{{\sigma}_{{v}_{i}{v}_{j}}}}}$ is the Euclidean distance of nodes *v*_{
i
}and ${{v}^{\prime}}_{i}$.

The density function will create a multi-scale layout; high betweenness nodes are separately positioned as core nodes and low-betweenness nodes are positioned around them.

*i*nodes, we can query a bucket in log(

*i*) amortized runtime. [23]

Fast density modifications

1: procedure FAST DENSITY( |
---|

2: Set |

3: |

4: |

5: |

6: Set |

7: |

8: |

9: |

10: |

11: Set |

12: |

13: |

14: |

15: |

16: |

17: Add |

18: |

19: Return ∞ |

20: |

21: |

22: Return |

23: |

24: |

25: Set |

26: Anneal( |

27: Push |

28: InsertNode(v) ▹ Node insertion to tree added |

29: Get set of |

30: |

31: PlaceNode( |

32: |

33: |

34: |

35: Set |

36: |

37: |

38: |

39: Set |

40: |

41: |

42: |

43: |

44: Set |

45: |

46: |

47: |

48: |

49: |

50: |

51: Set |

52: Set |

53: Set |

54: Set |

55: |

56: |

#### Edge length function

In [22], the average edge length is used to counterbalance the density and prevent a space-inefficient layout. In BFL, each edge length is scaled by its betweenness score, which forces nodes to shorten high betweenness edges over low betweenness ones. Edge lengths therefore as a aesthetic measure of the contribution of an edge to the node betweenness.

*v*

_{ i },

where $\left|\right|{e}_{{v}_{i}}\left|\right|$ is the Euclidean length of the edge ${e}_{{v}_{i}}$.

#### Edge crossing function

where $\delta ({e}_{{v}_{i}},{{e}^{\prime}}_{i})$ is an indicator function which returns 1 if $\text{EdgeCross}({E}_{{v}_{i}},{{E}^{\prime}}_{i})={\displaystyle \sum _{{e}_{{v}_{i}}\in {E}_{{v}_{i}}}{\displaystyle \sum _{{{e}^{\prime}}_{i}\in {{E}^{\prime}}_{i}\backslash \left\{{e}_{{v}_{i}}\right\}}\delta ({e}_{{v}_{i}},{{e}^{\prime}}_{i})\cdot \text{EB}({{e}^{\prime}}_{i}\text{)}\cdot \text{EB}({e}_{{v}_{i}})\phantom{\rule{0.5em}{0ex}}(\text{correspondtoTable}3,\text{lines}22\text{-}24),}}$ and ${{e}^{\prime}}_{i}$ cross and otherwise returns 0. In order to calculate the number of crossings, we use the efficient ray shooting algorithm proposed by [24].

For our simulated annealing loop, a polynomial cooling scheme is specified by defining the temperature *t* as

*t* = (*k*_{
max
}- *k*)^{
n
},

*k*

_{ max }is the maximum iteration count and

*k*is the current loop (correspond to Table 5, lines 24–33). Former literature [22] and our tests suggested that

*n*= 3 was reasonable for most cases.

Annealing and optimization algorithm

1: procedure ANNEAL( |
---|

2: Set |

3: Set |

4: Set |

5: Set |

6: Set |

7: |

8: Set |

9: Set |

10: |

11: Set |

12: Set |

13: |

14: |

15: Set |

16: Set |

17: |

18: |

19: Set |

20: |

21: |

22: Return Gaussian centered at |

23: |

24: |

25: Set |

26: Set |

27: Set |

28: |

29: Return true |

30: |

31: Return false |

32: |

33: |

### Layout algorithm runtime analysis

Since the betweenness calculation can be cached into the network file for repeated uses, we only consider the runtime of the layout algorithm itself. The runtime of the layout is dominated by evaluation of the scoring function which is called |*V*| times.

*f*be the runtime of scoring function. The total runtime is given as

*O*(log(|${{V}^{\prime}}_{i}$|)) since the quad-tree based density calculation method takes

*O*(log(|${{V}^{\prime}}_{i}$|)) time to query the bucket and sum all the nodes [23]. The second term EdgeLength takes

*O*(|${E}_{{v}_{i}}$|) time to query all new edges. The last term EdgeCross is a ray-shooting problem which can be solved in $O(\sqrt{\left|{{E}^{\prime}}_{i}\right|}\mathrm{log}\phantom{\rule{0.5em}{0ex}}{(|{{E}^{\prime}}_{i}|)}^{2})$ time [24]. Thus, the expected total runtime in Equation 5 can be given as:

**E**(log(|${{V}^{\prime}}_{i}$|) is log(

*i*), we remove the expectation of the first term to get,

*d*of graph

*G*since

**E**(|${E}_{{v}_{i}}$|) is the expected number of edges, which the newly inserted node

*v*

_{ i }brings. This leaves the expectation of $\sqrt{\left|{{E}^{\prime}}_{i}\right|}$. Since $\sqrt{\left|{{E}^{\prime}}_{i}\right|}$ is concave, by Jensen's inequality and

**E**(|${{E}^{\prime}}_{i}$|) =

*di*we have,

where *ζ*^{(x,y)}is the 2nd derivative of generalized Zeta function with respect to *x*.

*Proof of claim*. The generalized Zeta function is given by

*x*,

*x*= -1/2,

*ζ*

^{(2,1)}(-1/2, |

*V*|) is zero,

Which shows that, the runtime grows slower than *d* log(*d*) with respect to degree *d* and slower than |*V*|^{2} for node size |*V*|, or in little o notation,

*ζ*^{(2,0)}(-1/2, |*V*|) = *O*(|*V*|^{2}).

The estimated result *O*(|*V*|^{2}) implies that our algorithm has an asymptotic complexity better than many fast optimizing algorithms with respect to node size. Edge crossing calculation can be ignored in many cases leading to an even faster runtime log(Gamma(|*V*| + 1)) if degree is constant, which is asymptotically equal to |*V*|log(|*V*|) and is the current standard for the fastest layout algorithms.

This speedup would not be possible without the sequential layout from the betweenness algorithm.

## Results and discussion

### Methods and datasets

The algorithm was implemented in Java with files stored in Cell System Markup Language (CSML) format [25]. A Fibonacci heap was used for the priority queue, all other data structures used library implementations available in the JDK.

Runtime tests were done on a 8-core Intel Xeon 4800 X5450 3 GHz machine with 16 GBs RAM, with random graphs generated by methods given by Rodionov *et al*. [26]. Comparisons to other programs were made on one sparse graph (2000 nodes and 7000 edges), two dense graphs (2000 nodes and 11000/47000 edges) and one estimated gene regulatory network (1897 nodes and 2849 edges) on an Athlon X2 3.3 GHz machine with 4 GBs RAM running on Windows XP. For the last gene regulatory network (calls UO Analysis), the microarray data of the ultradian oscillation (UO) clock in mouse presomitic mesoderm cells by Dequeant *et al* [27] is used. We generated graphs in CSML, GML, NET, and TLP files for various programs and used the same graph to compare run-times and outputs. These graph data files used in our simulation are available in the additional file 1.

For all tests, cached costs were not calculated (including loading, preprocessing, and betweenness calculations), as we are concerned with the time to layout.

### BFL runtime dependency on node size

*n*

^{2}. We also note that the error bars grow, which is to be expected as the larger graphs have high variability with respect to graph structure and therefore can have highly unbalanced graphs, leading to longer run-times.

### BFL runtime dependency on betweenness

### BFL runtime dependency on graph density

*m*(

*m*is around 10% to the total node

*n*). For a random graph with 2000 nodes (=

*n*) and 7000 edges, we have created two graphs by adding (i) 4000 edges to 10% nodes (i.e. 200 nodes around degree 20 (=

*m*)) and (ii) 40000 edges to 10% nodes (i.e. 200 nodes around degree 200 (=

*m*)). For those graphs as in Table 6, the runtimes are reasonable as (i) 0.05 s and (ii) 3.7 s.

Runtime Comparisons

Runtime Comparisons Between Algorithms | |||||
---|---|---|---|---|---|

Dataset Number of Node/Edge | Random Graph 2000/7000 | Random Graph 4000/12000 | UO Analysis 1897/2849 | Dense Graph 2000/11000 | Dense Graph 2000/47000 |

Betweenness | .4s | 1.4s | .8s | .05s | 3.7s |

Kamada-Kawai (Pajek) | 17.9s | 40.3s | 22.2s | 14.16s | 32.64s |

Fruchterman Reingold (Pajek) | 30s | 34s | 31s | 33.20s | 42.06s |

GEM (Tulip) | 485s | 1800s+ | 665s | 394.95s | 475s |

RSFDP (InterViewer) | 1.8s | 2.1s | 2.1 s | 31.22s | 40.46s |

### BFL compared to existing algorithms

Table 6 shows the various run-times of our algorithm against those of four other competing algorithms. Force-directed and optimization algorithms similar to our own were chosen from possible candidates. By this criterion we compared against Kamada-Kawai [29] and Fruchterman Reingold [30] energy based algorithms in Pajek [31], GEM (Generalized Expectation-Maximization) based optimization in Tulip [32], and the RSDFP layout algorithm in InterViewer [33]. It is worth noting that our algorithm is implemented in Java while the competing algorithms are native applications. Thus, if our application were implemented efficiently in C, we would be able to achieve even faster run-times with even more drastic results. A future goal is to implement K-K, FR or GEM algorithms using the sequential insertion and betweenness weight functions used in the BFL algorithm. We hope to be able to get true force-directed algorithms which can produce better results with no increase in runtime.

### Resulting Layout of BFL compared to those of others

We also note that the runtime of this set was significantly lower (800 ms) for the betweenness algorithm compared to the others. The betweenness algorithm performs drastically better than others with sparse and multiscale datasets, while the competing algorithms have similar performance in randomly generated graphs.

### Betweenness is critical to BFL layout structure

## Conclusion

Our BFL layout algorithm mainly achieved following two points: (i) the important elements (high betweenness nodes and edges) are emphasized in the resulting layout, (ii) the layout algorithm runs in real-time for large scale gene networks (around 10000 elements). For a graph with *n* nodes, this approach reduces the expected runtime of the algorithm to *O*(*n*^{2}) when considering edge crossings, and to *O*(*n* log *n*) when considering only density and edge lengths. We also compared against fast graph layout algorithms and approaches requiring intensive optimizations. For gene networks, our algorithm was faster than all layout algorithms tested while providing readability on par with intensive optimization algorithms. We achieve a 1.4 second runtime for a graph with 4000 nodes and 12000 edges on a standard desktop computer. We will develop an effective tuning method for scaling parameters automatically in response to change in graph degree and optimize the algorithm further. We also intend to show that the layout algorithm provides a rough metric of functional relations, where betweenness separates functionally unrelated units and identifies hub genes.

## Notes

## Declarations

### Acknowledgements

Computation time was provided by the Super Computer System, Human Genome Center, Institute of Medical Science, University of Tokyo.

## Authors’ Affiliations

## References

- Battista GD, Eades P, Tamassia R, Tollis I: Algorithms for drawing graphs: an annotated bibliography. Computational Geometry: Theory and Applications. 1994, 4 (5): 235-282.View ArticleGoogle Scholar
- Karp PD, Paley S: Automated Drawing of Metabolic Pathways. Proceedings of the Third International Conference on Bioinformatics and Genome Research. 1994, 225-238.Google Scholar
- Becker MY, Rojas I: A graph layout algorithm for drawing metabolic pathways. Bioinformatics. 2001, 17 (5): 461-467. 10.1093/bioinformatics/17.5.461.View ArticlePubMedGoogle Scholar
- Sugiyama K, Tagawa S, Toda M: Methods for visual understanding of hierarchical system structures. IEEE Transactions on Systems, Man and Cybernetics. 1981, 11: 109-125. 10.1109/TSMC.1981.4308636.View ArticleGoogle Scholar
- Battista GD, Eades P, Tamassia R, Tollis IG: Graph Drawing: Algorithms for the Visualization of Graphs. 1998, Upper Saddle River, NJ: Prentice Hall PTRGoogle Scholar
- Eades P: A heuristic for graph drawing. Congressus Numerantium. 1984, 42: 149-160.Google Scholar
- Dogrusoz U, Gral E, Cetintas A, Civril A, Demir E: A compound graph layout algorithm for biological pathways. Graph Drawing 2004. 2004, 442-447.Google Scholar
- Genc B, Dogrusoz U: A constrained, force-directed layout algorithm for biological pathways. Graph Drawing 2003. 2003, 314-319.Google Scholar
- Li W, Kurata H: A grid layout algorithm for automatic drawing of biochemical networks. Bioinformatics. 2005, 21 (9): 2036-2042. 10.1093/bioinformatics/bti290.View ArticlePubMedGoogle Scholar
- Kojima K, Nagasaki M, Euna J, Miyano S: An efficient grid layout algorithm for biological networks utilizing various biological attributes. BMC Bioinformatics. 2007, 8 (76):
- Yoon J, Blumer A, Lee K: An Algorithm for Modularity Analysis of Directed and Weighted Biological Networks Based on Edge-Betweenness Centrality. Bioinformatics. 2006, 22: 3106-3108. 10.1093/bioinformatics/btl533.View ArticlePubMedGoogle Scholar
- Chiba N, Nishioka I, Shirakawa I: An Algorithm of Maximal Planarization of Graphs. Proceedings of IEEE International Symposium on Circuits and Systems. 1979, Inesc ID – Lisboa, 649-652.Google Scholar
- Kojima K, Nagasaki M, Miyano S: Fast grid layout algorithm for biological networks with sweep calculation. Bioinformatics. 2008, 24: 1433-41. 10.1093/bioinformatics/btn196.View ArticlePubMedGoogle Scholar
- Freeman LC, Borgatti SP, White DR: Centrality in valued graphs: A measure of betweenness based on network flow. Social Networks. 1991, 13: 141-154. 10.1016/0378-8733(91)90017-N.View ArticleGoogle Scholar
- Girvan M, Newman MEJ: Community structure in social and biological networks. PNAS. 2002, 99: 7821-7826. 10.1073/pnas.122653799.PubMed CentralView ArticlePubMedGoogle Scholar
- Dunn R, Dudbridge F, Sanderson CM: The Use of Edge-Betweenness Clustering to Investigate Biological Function in Protein Interaction Networks. BMC Bioinformatics. 2005, 6: 39-10.1186/1471-2105-6-39.PubMed CentralView ArticlePubMedGoogle Scholar
- Brandes U: A Faster Algorithm for Betweenness Centrality. Journal of Mathematical Soctology. 2001, 25: 163-177.View ArticleGoogle Scholar
- Joy MP, Brock A, Ingber DE, Huang S: High-Betweenness Proteins in the Yeast protein Interaction Network. Journal of Biomedicine and Biotechnology. 2005, 2: 96-103. 10.1155/JBB.2005.96.View ArticleGoogle Scholar
- Koschutzki D, Schreiber F: Comparison of Centrality for Biological Networks. Proceedings German conference for bioinformatics. Edited by: Stoye GJ. 2004, Bioinformatics Center Gatersleben-Halle, 199-206.Google Scholar
- Jeong H, Mason SP, Barabasi AL, Oltvai ZN: Lethality and Centrality in Protein Networks. Nature. 2001, 411: 41-42. 10.1038/35075138.View ArticlePubMedGoogle Scholar
- Luo F, Yang Y, Chen CF, Change R, Zhou J: Modular organization of protein interaction networks. Bioinformatics. 2002, 23: 207-214. 10.1093/bioinformatics/btl562.View ArticleGoogle Scholar
- Davidson R, Harel D: Drawing Graphs Nicely Using Simulated Annealing. ACM Transactions on Graphics. 1996, 15: 301-331. 10.1145/234535.234538.View ArticleGoogle Scholar
- Samet H: The Quadtree and Related Heiarchical Data Structures. ACM Computing Surveys. 1984, 16: 187-260. 10.1145/356924.356930.View ArticleGoogle Scholar
- Andrews D, Snoeyink J, Boritz J, Chan T, Denham G, Harrison J, Zhu C: Further comparisons of algorithms for geometric intersection problems. Proceedings 6th International Symposium on Spatial Data Handling, University British Columbia. 1994Google Scholar
- CSML webiste. [http://www.csml.org]
- Rodionov AS, Choo H: On Generating Random Network Structures: Connected Graphs. Proceeding of the 2004 International Conference on Information Networking. Edited by: Khang HK, Goto S. 2004, Inesc ID – Lisboa, 483-491.Google Scholar
- Deque'ant ML, Glynn E, Gaudenz K, Wahl M, Chen J, Mushegian A, Pourquie' O: A complex oscillating network of signaling genes underlies the mouse segmentation clock. Science. 2006, 314: 1595-1598. 10.1126/science.1133141.View ArticleGoogle Scholar
- Albert R, Barabasi AL: Statistical mechanics of complex networks. Reviews of Modern Physics. 2002, 74: 47-97. 10.1103/RevModPhys.74.47.View ArticleGoogle Scholar
- Kamada T, Kawai S: An algorithm for drawing general undirected graphs. Information Processing Letters. 1989, 31: 7-15. 10.1016/0020-0190(89)90102-6.View ArticleGoogle Scholar
- Fruchterman TMJ, Reingold EM: Graph drawing by force-directed placement. Software – Practice and Experience. 1991, 21: 1129-1164. 10.1002/spe.4380211102.View ArticleGoogle Scholar
- Batagelj V, Mrvar A: Pajek – program for large network analysis. Connections. 1998, 21: 47-57.Google Scholar
- David A: Tulip. Lecture Notes Computer Science. 2001, 2265: 435-437.View ArticleGoogle Scholar
- Han K, Ju B: A fast layout algorithm for protein interaction networks. Bioinformatics. 2003, 19: 1882-1888. 10.1093/bioinformatics/btg346.View ArticlePubMedGoogle Scholar
- Nagasaki M, Doi A, Matsuno H, Miyano S: Genomic Object Net: I. A platform for modeling and simulating biopathways. Applied Bioinformatics. 2003, 2: 181-184.PubMedGoogle Scholar
- Cell Illustrator website. [http://www.cellillustrator.com]

## Copyright

This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/2.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.