Use cases for the RegulonDB network.

  sample_graphs/regulondb.txt

################################################################
# Each example starts with an empty graph. This is achieved
# by using 'clear' as the first command.

1. Hide all nodes and edges.

clear


2. Display node 'nsrr'.

clear
[show=yes]
nsrr

clear
[show=yes]
n(name=nsrr)


3. Display all edges to/from node 'nsrr'.

clear
[show=yes]
.* nsrr .*

clear
[show=yes]
e(n(name=nsrr))


4. Display all edges to/from node 'nsrr' without displaying nodes.

Note that by default, when you display an edge its associated nodes
will also be shown. To suppress this, set [autonode=no]

clear
[show=yes]
[autonode=no]
.* nsrr .*

clear
[show=yes]
[autonode=no]
e(n(name=nsrr))


5. Display all edges to node 'fis'.

clear
[show=yes]
.* fis

clear
[show=yes]
e(n2(name=fis))


6. Display all edges from node 'fis'.

clear
[show=yes]
fis .*

clear
[show=yes]
e(n1(name=fis))


7. Display all edges to and from node 'crp'.

clear
[show=yes]
.* crp [color=red]
crp .* [color=blue]

clear
[show=yes]
e(n2(name=crp)) [color=red]
e(n1(name=crp)) [color=blue]

8. Display all edges from node 'crp', highlight node 'fis' and display all edges from node 'fis'.

clear
[show=yes]
crp .* [color=red]
fis [color=blue]
fis .* [color=green]

clear
[show=yes]
e(n1(name=crp)) [color=red]
n(name=fis) [color=blue]
e(n1(name=fis)) [color=green]

################################################################
# Each example starts with the full graph. 

9. Highlight all nodes of type 'manager'.

n(type=manager) [color=red]


10. Highlight all edges to/from nodes of type 'manager'.

e(n(type=manager)) [color=red;opacity=50]


11. Highlight all edges to and from nodes of type 'manager'.

e(n1(type=manager)) [color=red;opacity=50]
e(n2(type=manager)) [color=green;opacity=50]


12. Highlight all edges from nodes of type 'regulator' to 'workhorse'.

e(n1(type=regulator),n2(type=workhorse)) [color=blue]


13. Highlight all edges of type 'repressor' and 'activator'

e(type=repressor) [color=red]
e(type=activator) [color=orange]


14. Highlight node 'ihf' and distinguish edges from it by type.

n(name=ihf) [color=red]
e(n1(name=ihf),type=repressor) [color=orange]
e(n1(name=ihf),type=activator) [color=purple]


15. Highlight edges to node 'gada' and distinguish them by type of source nodes.

e(n1(type=regulator),n2(name=gada)) [color=red]
e(n1(type=manager),n2(name=gada)) [color=green]


16. Highlight nodes that start or terminate on edges of type 'dual'.

n(e(type=dual))


17. Highlight nodes that terminate on edges of type 'dual'.

n(e1(type=dual))


18. Emphasize edges of type 'unknown' and associated nodes.

e(type=unknown) [thickness=3;color=purple]
n(e(type=unknown)) [size=10;color=purple]


19. Highlight edges of type 'unknown' and associated nodes and hide all other edges.

.* .* [show=no]
[show=yes]
e(type=unknown) [thickness=3;color=purple]
n(e(type=unknown)) [size=10;color=purple]

e() [show=no]
[show=yes]
e(type=unknown) [thickness=3;color=purple]
n(e(type=unknown)) [size=10;color=purple]


20. Highlight edges based on multiple values of an attribute (e.g. a->b [attribute=1 attribute=2 attribute=3]

clear
[show=yes]
# edges that have evidence "aibscs"
e(evidence~aibscs) [color=orange]
# edges that have only evidence "aibscs" but nothing else
e(evidence=aibscs) [color=blue]

clear
[show=yes]
# edges that have both evidences "aibscs" and "bpp"
e(evidence~aibscs,bpp) [color=orange]
# edges that have both evidences "aibscs" and "bpp" but nothing else
e(evidence=aibscs,bpp) [color=blue]

clear
[show=yes]
# edges that have evidence "hibscs"
e(evidence~hibscs) [color=orange]
# edges that have evidence "hibscs" but not "gea"
e(evidence~hibscs,!gea) [color=blue]


21. n(e(my_att_name~!my_val))
# Select nodes having edges with attribute called "my_att_name" where the value is NOT "my_val"

n() [size=10;color=green] # give all nodes to this appearance
n(e(type~!dual)) [size=2;color=purple]


22. n(!e(my_att_name~my_val))
# Select nodes NOT having edges with attribute called "my_att_name" where the value is "my_val"

n() [size=10;color=green] # give all nodes to this appearance
n(!e(type~dual)) [size=2;color=purple]


23. adding labels of nodes

zur [label=true]
zrar [label=true]
adiy [label=true]


################################################################################
EOF
