Biol Sistemas 1 Redes
Biol Sistemas 1 Redes
Biol Sistemas 1 Redes
Alberto J. Martin
[email protected]
Königsberg’s bridges (L. Euler, 1736):
1
Graph representation of complex systems
G = (V , E);
I V is a set of nodes (vertices)
V := {1, 2, 3, 4}
I E is a set of edges
n o
E := {1, 2}, {1, 2}0 , {1, 4}, {1, 4}0 , {1, 3}, {2, 3}, {4, 3}
2
Network types:
3
Network types:
Regular graphs
4
Network types: trees
6
Network types: adjacency list
7
Network types: weighted networks
8
Network types: directed networks
9
Network types: directed acyclic networks (DAGs)
10
Paths
(2) Pn
Nij = k=1 Aik Akj = [A2 ]ij
11
Geodesic Paths
A)
A B C
B)
A B E
C D
A) path A to C? B to C?
B) path A to C?
path A to E? E to C?
would it be much different with directed networks?
13
Eulerian and Hamiltonian paths:
14
Geodesic (Shortest) paths:
A)
A B C
B)
A B E
C D
Eulerian? Hamiltonian?
15
Geodesic (Shortest) paths:
A)
A B C
B)
A B E
C D
Eulerian? Hamiltonian?
16
Network Components:
17
Components in Directed Networks:
19
Degree centrality:
20
Maximum edges and connectance:
21
Maximum edges and connectance:
A B C
A 0 1 1
B 1 0 0
C 1 0 0
I m?
I c?
I ρ?
22
Maximum edges and connectance:
A B C
A 0 1 1
B 1 0 0
C 1 0 0
I m=2
I c?
I ρ?
23
Maximum edges and connectance:
A B C
A 0 1 1
B 1 0 0
C 1 0 0
I m=2
I c= 2×2
3
I ρ?
24
Maximum edges and connectance:
A B C
A 0 1 1
B 1 0 0
C 1 0 0
I m=2
I c= 2×2
3
I ρ 2
=3
25
Degree in directed graphs
26
Closeness centrality
27
Betweenness centrality
28
Transitivity and clustering coefficient
I Transitivity:
Perfect transitivity: The friend of my friend is my friend
Partial transitivity: The friend of my friend can be my friend
I If three nodes, u, v and w are connected by a path forming a
clique (complete graph), they are a closed triad
I Clustering coefficient is the fraction of path length 2 in a
network that are closed
N
C = N cp ;
pl2
Ncp is the number of closed paths; Npl2 is the number of
closed paths of length two
I For undirected graphs Ci = 2ei , where ki is the number
ki (ki −1)
of neighbors of i and ei is the number of connected
neighbors of i; for directed Ci = k (k2e−1) ; Cavg = n1 ni=1 Ci ;
i
P
i i
I C = 1 reflects perfect transitivity, ie all network components
are cliques; C = 0 → no closed triads 29
Eigenvector centrality
30
Centralities
Examples of A) Betweenness centrality, B) Closeness centrality, C) Eigenvector centrality, D) Degree centrality of the
same graph.
32
Network visualization and Analysis
Cytoscape
Centrifuge, Commetrix (dynamic nets), Gephi,. . .
33
Cytoscape
http : //www.cytoscape.org/
34
Network file formats: Simple interaction file (.sif)
http://wiki.cytoscape.org/Cytoscape_User_Manual/Network_Formats
35
sif node and edge attributes
edges.tsv
edge color thickness
interaction type1 red 0.5
interaction type2 green 0.3
interaction type3 red 1.5
36
Network file formats: XGMML (eXtensible Graph Markup
and Modeling Language)
37
Network attributes
38
graphics attributes
<graphics >
<att name="NETWORK_WIDTH" value="1451.0" type="string" cy:type="String"/>
<att name=" NETWORK_CENTER_Y_LOCATION " value=" -1597.8129075260113" type="string"
cy:type="String"/>
<att name=" NETWORK_CENTER_Z_LOCATION " value="0.0" type="string" cy:type="String"/
>
<att name="NETWORK_DEPTH" value="0.0" type="string" cy:type="String"/>
<att name=" NETWORK_CENTER_X_LOCATION " value=" 872.8819677113453 " type="string" cy:
type="String"/>
<att name="NETWORK_TITLE" value="" type="string" cy:type="String"/>
<att name=" NETWORK_BACKGROUND_PAINT " value="#FFFFFF" type="string" cy:type="
String"/>
<att name=" NETWORK_EDGE_SELECTION " value="true" type="string" cy:type="String"/>
<att name=" NETWORK_HEIGHT" value="626.0" type="string" cy:type="String"/>
<att name=" NETWORK_SCALE_FACTOR " value=" 0.27021982416519186 " type="string" cy:
type="String"/>
<att name=" NETWORK_NODE_SELECTION " value="true" type="string" cy:type="String"/>
</graphics >
39
node attributes
<node id="18861" label="nhr -2">
<att name="shared name" value="nhr -2" type="string" cy:type="String"/>
<att name="name" value="nhr -2" type="string" cy:type="String"/>
<att name="selected" value="0" type="boolean" cy:type="Boolean"/>
<att name="Node_type" value="NTF" type="string" cy:type="String"/>
<att name="Node_color" value="#FFFFFF" type="string" cy:type="String"/>
<graphics w="75.0" h="35.0" width="2.0" x=" 265.03131103515625 " type="
ROUND_RECTANGLE " fill="#FFFFFF" outline="#000000" z="0.0" y="
8.277727127075195 ">
<att name=" NODE_TRANSPARENCY " value="255" type="string" cy:type="String"/>
<att name="NODE_SELECTED" value="false" type="string" cy:type="String"/>
<att name=" NODE_LABEL_TRANSPARENCY " value="255" type="string" cy:type="String"/
>
<att name="NODE_DEPTH" value="0.0" type="string" cy:type="String"/>
<att name=" NODE_LABEL_COLOR" value="#000000" type="string" cy:type="String"/>
<att name="NODE_TOOLTIP" value="" type="string" cy:type="String"/>
<att name=" NODE_BORDER_TRANSPARENCY " value="255" type="string" cy:type="String"
/>
<att name=" NODE_SELECTED_PAINT " value="#FFFF00" type="string" cy:type="String"/
>
<att name=" NODE_LABEL_POSITION " value="C,C,c ,0.00 ,0.00" type="string" cy:type="
String"/>
<att name=" NODE_CUSTOMGRAPHICS_SIZE_3 " value="35.0" type="string" cy:type="
String"/>
<att name=" NODE_BORDER_STROKE " value="SOLID" type="string" cy:type="String"/>
<att name=" COMPOUND_NODE_PADDING " value="10.0" type="string" cy:type="String"/>
<att name=" COMPOUND_NODE_SHAPE " value=" ROUND_RECTANGLE " type="string" cy:type="
String"/>
<att name=" NODE_LABEL_FONT_SIZE " value="12" type="string" cy:type="String"/>
<att name=" NODE_LABEL_FONT_FACE " value="SansSerif.plain ,plain ,12" type="string"
cy:type="String"/>
<att name=" NODE_LABEL_WIDTH" value="200.0" type="string" cy:type="String"/>
<att name="NODE_VISIBLE" value="true" type="string" cy:type="String"/>
</graphics > 40
</node >
edge attributes
<edge id="19" label="cog1 -mir70" source="187" target="189" cy:directed="1">
<att name="shared name" value="cog1 -mir70" type="string" cy:type="String"/>
<att name="shared interaction" value="TF -gene" type="string" cy:type="String"/>
<att name="name" value="cog1 -mir70" type="string" cy:type="String"/>
<att name="selected" value="0" type="boolean" cy:type="Boolean"/>
<att name="interaction" value="TF -gene" type="string" cy:type="String"/>
<att name="Color" value="#3399 FF" type="string" cy:type="String"/>
<att name="Color2" value="grey" type="string" cy:type="String"/>
<graphics fill="#CCCCCC" width="2.0">
<att name=" EDGE_STROKE_SELECTED_PAINT " value="#FF0000" type="string" cy:type="
String"/>
<att name="EDGE_SELECTED" value="false" type="string" cy:type="String"/>
<att name=" EDGE_LABEL_COLOR" value="#000000" type="string" cy:type="String"/>
<att name=" EDGE_LABEL_WIDTH" value="200.0" type="string" cy:type="String"/>
<att name=" EDGE_TRANSPARENCY " value="255" type="string" cy:type="String"/>
<att name=" EDGE_SOURCE_ARROW_UNSELECTED_PAINT " value="#3399 FF" type="string" cy
:type="String"/>
<att name=" EDGE_LINE_TYPE" value="SOLID" type="string" cy:type="String"/>
<att name="EDGE_BEND" value="" type="string" cy:type="String"/>
<att name=" EDGE_TARGET_ARROW_UNSELECTED_PAINT " value="#CCCCCC" type="string" cy
:type="String"/>
<att name=" EDGE_LABEL_TRANSPARENCY " value="255" type="string" cy:type="String"/
>
<att name="EDGE_LABEL" value="" type="string" cy:type="String"/>
<att name=" EDGE_SOURCE_ARROW_SELECTED_PAINT " value="#FFFF00" type="string" cy:
type="String"/>
<att name="EDGE_TOOLTIP" value="" type="string" cy:type="String"/>
<att name="EDGE_CURVED" value="true" type="string" cy:type="String"/>
<att name=" EDGE_LABEL_FONT_SIZE " value="10" type="string" cy:type="String"/>
<att name=" EDGE_TARGET_ARROW_SHAPE " value="ARROW" type="string" cy:type="String
"/>
<att name=" EDGE_LABEL_FONT_FACE " value="Dialog.plain ,plain ,10" type="string" cy
:type="String"/>
<att name=" EDGE_SOURCE_ARROW_SHAPE " value="NONE" type="string" cy:type="String" 41
/>
Example: adjacency matrix
A B E
C D
42
Example: adjacency matrix
A B C D E
A B A
E
B
C
C D
D
E
42
Node centralities
43
Global properties of networks
44
Small-world networks
45
The large scale structure of networks
n is the number of nodes; m is the number of edges; z is mean degree; l is mean geodesic distance; α is exponent of
degree distribution if it follows power law; C (1) is clustering coefficient; C (2) is clustering coefficient; r degree
correlation coefficient. From Newman “The structure and function of complex networks” (2010) 46
Degree distribution
47
Degree distribution
49
Error and attack tolerance in complex networks
50
Self similarity of scale-free networks
51
Null models
I Random graphs
networks generated by a random process
I used to answer questions about networks
motifs/graphlets
- same global properties of real networks
- is this feature random?
I several types depending on how they are made
also different properties. . .
52
Erdös–Rényi model [1]
[1] Erdös, P. & Rényi, A. Publications of the Mathematical Institute of the Hungarian Academy of Sciences, 5: 17–61
(1960) 53
Barabási–Albert model [1]
[1] Réka, A. & AL, Barabási, Reviews of Modern Physics. 74 (1): 47–97 (2002)
54
Watts–Strogatz model [1]
[1] Watts, DJ & Strogatz, SH, Nature. 393 (6684): 440–442 (1998)
55
I traditional null models reproduce global properties of real
nets
I you might be interested on reproducing local proporties
56
Local properties:
57
Network graphlets
58
Network graphlets in undirected networks
59
Graphlet based metrics
[1] Przulj et al. Bioinformatics. 20(18), (2004); [2] Milenković & Przulj. Cancer Informatics 6, (2008); [3] Yaveroğlu
60
Graphlet based metrics: directed networks
[1] Singh R et al. PNAS 105(35) (2008); [2] Gaiteri et al. Genes, brain, and behavior. 13(1) (2014); [3] de la Fuente
63
Alignment based
64
Alignment based methods
65
Alignment free
66
Directed Networks
67
Realizations of the same network
68