Mdraw User Manual
Mdraw User Manual
Mdraw User Manual
INTRODUCTION 3
GETTING STARTED 4
USER INTERFACE 13
BASE WINDOW 14
FILE MENU 15
15 Load From
15 Save As…
1
15 Run
15 Print
15 Exit
SETTINGS MENU 16
16 Layout parameters
16 Network Type
LAYOUT MENU 16
16 Network
16 Color Map
TOOLS MENU 16
17 Mfinder
17 Motifs
17 Focus
17 Goto
VIEW MENU 17
17 Labels
17 Network Stat
18 Algorithm Stat
18 Tutorial
18 Updates
18 About
POPUP MENUS 18
18 Move
19 Goto
19 Reset
19 ZoomIn
19 Zoom Back
19 ZoomOut
19 Set Layers
20 DragVtx
20 Focusing
20 Switch Windows
20 Undo Goto
DIALOGS 21
21 Mfinder
22 Motifs
22 Focus
23 Color - Map
24 Layers
24 Network Type
25 Network
26 Layout Parameters
26 Advanced Layout Parameters
2
Introduction
Networks are frequently used entities that represent objects and relationships between
them. They are used to describe complex systems in many types of fields such as:
biology, engineering, computer science and sociology.
Networks were found to display network motifs, patterns that appear in the network
significantly more than in random networks.
The minimal hardware requirement for fast working with mDraw on medium to large
networks ( 100 – 10000 nodes )are workstation with a performance comparable to a Intel
Pentium 4 Processors .
Installation
Instructions:
3
2. Install mDraw by double clicking the MdrawSetup.exe
3. source code is also available at
http://www.weizmann.ac.il/mcb/UriAlon/NetworkMotifsSW/MdrawSrc.zip
Installation folders:
• Networks – this folder holds the sample networks that come with mDraw, it is
recommended that all the networks used by the user will be stored in this
directory.
• Outputs - all outputs file that are generated by Mfinder and mDraw are stored in
this directory.
• Bitmaps - all bitmaps that are being saved by the user are saved by default to
this directory.
• Mfinder – directory that hold the mfinder.exe.
• Manual - hold the user manual in .PDF and .Doc formats.
Getting started
4
Loading a Network from File
After starting mDraw, an empty base window will appear (click here to get an image and
more information’s about the base window). In the upper part of the window, you have
pull down menus where you have access to all functions. The icons underneath the pull
down menus are buttons for direct access to frequently used menu operations. We will
come to this later.
Now we will load a network for visualization. Networks are simply text files with three
numbers in each line, separated by space or tab. First number represents the source
vertex, second number represents the target vertex and the 3’rd number represents the
edge Wight. This format only defines the structure of a network, but has no layout
information’s such as the coordinate of a particular node... To load a network, you need
the file browser for selecting a file name. You can get a browser by selecting menu
File/Load network... (I.e. move the mouse pointer to the File pull down menu and press
the left mouse button which will show the File menu. Then move the mouse pointer to the
Load network... menu entry by still pressing the left mouse button and finally release the
mouse button when you are over the Load... menu entry). This will pop up file browser
for opening a network.
The other way to load network is by simply clicking the folder icon to open the file
browser.
When the mouse pointer is over this button, a message is displayed in the footer area with
a short explanation of the button's function. Pressing this button on the icon bar is the
same as selecting menu File/Load network...
The file browser will automatically open on the folder “Networks “in this folder you have
a file name”coli1_1_transcription.txt”, click it and than click open.
You can execute a layout algorithm by selecting menu File/Run or by the Run icon.
5
Saving the Layout of a Network
You might wish to store the current layout of the network in a file. As stated above, a
network file does not contain layout information’s, so this way your modifications will be
lost in a later session. To store the network information about the current layout (node
coordinates), you can choose mDraw's alternative network storage format, called layout.
Again, you need a file browser to save the current layout to a status file. One way to do so
is by selecting menu File/Save as File. .
The other way to save status is by simply clicking the Save icon.
The browser usually suggests a name for the file you want to save. The filename of the
network you have loaded before is "coli1_1_transcription.txt", so the suggested filename
is coli1_1_transcription_LAYOUT.txt, all status files have the same suffix of
"_LAYOUT.txt", so it would be easy to identify them later.
Note : saving the network status can save a lot of time in drawings large networks .
Now we will load a Layout of a network. To load a layout, you need to have a network
loaded, load the coli1_1_transcription.txt as shown above and than load
"coli1_1_transcription_LAYOUT.txt" from the file browser." You can get a browser by
selecting menu File/Load Layout.
The file browser will automatically open on the folder “Outputs “in this folder select the
coli1_1_transcription_Layout.txt that you made, click it and than click open.
The network will be drawn in the network area with the saved node coordinates.
Again, you need a file browser to save the current layout to an Image file. One way to do
so is by selecting menu File/Save as Image.
The other way to save network current layout as image is by simply clicking the Save as
Image icon.
The browser usually suggests a name for the file you want to save. The filename of the
network you have loaded before is coli1_1_transcription.txt, so the suggested filename is
6
"coli1_1_transcription.bmp", all image are being saved as bitmaps. Here is an example
Note: it is much more preferable to save image to bitmap and than print the bitmap.
End of section 1
7
distribution again (refer to section 1). Afterwards, start the network layout parameters
with menu Settings /layout parameters.
Now we will modify the parameters of the current network visualization. This can be
done with the layout parameters dialog, available after selecting menu Settings/ layout
parameters.
1. Repulsive Force – here you can adjust the repulsive force between nodes.
2. Attractive Force – this field represent the force of attraction between neighboring
nodes.
3. Attraction of Motif nodes – this field represent the attraction force between
neighboring nodes in the same motif.
Play with the values in these fields than press Ok and Run to see changes take effect on
the network layout.
The layout parameters dialog also contains 3 buttons , OK, Cancel, and Advanced , the
advance button opens another dialog the next section will explain how to set the
parameters in this dialog .
In the dialog you can find at the top right six radio buttons to set the current layout
algorithm , the button near the MinLa( that is the default layout algorithm) is checked that
will be the current layout algorithm ( it usually produces the best results, but you can
choose any other layout algorithm). Underneath the radio buttons you will find a check
box name "No correlation" leave it checked. Now let's move to the SECOND PHASE,
you can see that the check box “Fruchterman-Reingold” is checked, uncheck it presses
the OK button, and than push the Run icon in the toolbar to see the changes take effect.
Now go back to the layout parameters dialog and check “Fruchterman-Reingold” again,
this is a layout algorithm that is being executed after the FIRST PHASE algorithm, and
usually improve the layout, the parameter Range is set to 10, this is the grid size u allow
the nodes to find place for themselves, u can change this parameter, but take in
consideration that the larger the range is – the longer the algorithm running time will be.
Next parameter Negative Grid defines the grid size of negative force nodes induce on
each other, increasing this parameters would produce a layout that nodes push each other
further, the K_r parameter is the repulsive force and the K parameter is the spring force
which defines the positive force between neighbor vertex’s, play with this parameters
until you are pleased with the network visualization. The Init temp, Final temp and
Temp.decrease rate are all algorithm running time and usually produces good results and
should not be tempered with . At this time the network visualization is still the same,
because the modification will take effect only after pressing the Run push button of the
dialog. So press this button now. In the footer area of the base window you can see a
message when the new font is loaded. This may take some time. Afterwards the dialog
window disappears and the network is redrawn by using the new font size.
8
First thing load a network from a file load the coli1_1_transcription.txt, now open the
Network Type dialog, available after selecting menu Settings /Network Type.
Now check the radio box Transcription, now check the check box SIM under the
Transcription Layout now push the OK button. You can see that the network
visualization is different , beside the regular nodes , you can notice some hollow rectangle
with number in them , those are the SIM structures that have been converted to this one
odd looking vertex, this has been done to make the network visualization more readable ,
when clicking with Right mouse button on the SIM node, the Secondary popup menu
will appear , select the Expand menu entry , the SIM node will expand back to the
original number of nodes that assembled the SIM node, to assemble the SIM node back to
its initial mode, choose the parent of one of the nodes that assemble the SIM node , click
with Right mouse button , select the Collapse menu entry , that will assemble the SIM
node back together .
You must be wondering now what the automatically option means, well it just orders the
layers with the default number with out asking your permeation ;-).
Note: in some cases you will notice that there are more layers than you have asked for, it
happens because nodes are not allowed to point at others nodes in the same levels, so
some of those nodes go a lower level to prevent this from happening.
End of section 2
Important Note: only basic operations with Mfinder will be discussed in this section,
click here to learn more about the mighty Mfinder.
9
Setting Mfinder parameters
First thing you need is the Mfinder dialog , get it by either clicking Right mouse button
on the Mfinder icon in the toolbar, or by selecting Tool/Mfinder .
First thing you need is to load an mfinder.exe file , that is being done automatically by the
application , you can see the path in the MFinder Executable edit box is already set , if
the path is incorrect you can use the browse button to create the path to the mfinder.exe
yourself .
Now we need a network, will use coli1_1_transcription.txt, and get it by clicking the
browse button near the Input File Name edit box, notice that by filling this edit box the
Output File Name was filled as well.
Next we need to set the Motif Size Low, and Motif Size high fields, these parameters set
the size of motifs to look for (read more in here), they are set as default to 3 and 4
respectively. If you want only High motifs to be displayed (only motifs size 4), just delete
3 from Motif Size Low edit box, the same can be done if you only looking for
Smaller motifs (delete 4 from Motif Size high), also different sizes of motifs can be asked
for, but take in consideration that finding motifs of size larger than 4 takes time.
That's it we are ready to run mfinder, click the RUN button and move to next section to
figure out how to select and draw motifs.
Important note: once you run mfinder on a network, member's files are created, so the
next time you will use mfinder on that network, the motifs dialog will appear
immediately.
Choosing motifs
You don’t need to do anything to open the motifs dialog , it will be opened automatically
after the mfinder run.
In the motifs dialog you will notice number of sub networks in two sizes (number of
nodes in network) 3 in the Low Motifs section and 4 at the High Motifs section , all you
need to do is to check the check box's near the motifs you want to display, its that simple
! . you can see each motif relevant information written under the window the motif is
drawn in , lets pick 2 motifs, motif Id: 38 from the Low Motifs section, and motif Id: 204
from the High Motifs section, now click the OK button in see the network motifs that
you have checked appear on the network it should look like this :
10
Now let's say you want to see a different motif, you don’t need to run mfinder again just
open the motifs dialog by clicking Tools/motifs, and choose a new set of motifs, click
OK, and it's on!!!
Important note: after running mfinder and selecting motifs for a network, you can
continue using all other features of mDraw, like changing the layout algorithm, settings
Network Type, settings layers, and all other operations just like you would in the regular
network.
End of section 3
11
First will draw only the motifs in the network, do that by checking the check box Show
Only Motifs in the Network Dialog , click the OK button. now is a good time to play
with edges colors, open the ColorMap dialog by selecting Layout/ColorMap entry, the
ColorMap dialog will open, in the Change Color line choose one of the colors appear in
the network (only one color can be change at a time), and than select a different color in
the To Color line, push the OK button to change color.
Go back to the Network Dialog , and uncheck the Show Only Motifs check box, than
check the Use Full Window check box, and click the OK button, the network
visualization should use the whole network area .
Last operation that will do with the Network Dialog , will be Use Doubling check the
appropriate check box, click the OK button, and than click the Run icon. Changes have
been taking effect, in order to see those changes, click the View/Labels menu entry, an
open dialog box will appear, click the cancel button, you will notice that every node is
label by a number now, if you will look closer you will see that the node labeled “66”,
and the node labeled “143”, appears twice in the network, those 2 nodes were doubled in
order of avoiding very long edges in the network. Move to next chapter to learn how to do
more cool things with the network representation.
End of section 4
Note: that’s the end of the getting stated tutorial; to deepen your familiarity with
mDraw move on to read the User Interface guide.
12
User Interface
This chapter covers information about the mDraw user interface. The following subtitles
are available:
The Drag operation is carried out by clicking on a node in the network area with Right
mouse button and hold down this mouse button. Then move the mouse by still pressing
Right mouse button. You can see the node moving with the curser. After releasing the
mouse button, the selected node will be placed where you released the mouse button.
The Focus operation is carried out by clicking on a node in the network area with Right
mouse button.
The Zoom operation is carried out by clicking on any part of the network area with Right
mouse button and hold down this mouse button. Then move the mouse by still pressing
Right mouse button. You can see a moving rectangular area on the screen (rubber-band).
After releasing the mouse button, all nodes are selected that lie completely inside this
rectangle, and will be represented in a larger scale.
The Pan operation is carried out by clicking Right mouse button on any part of the
network area and hold down this mouse button. Then move the mouse by still pressing
Right mouse button. You can see a the hole network drawing moving with the curser.
13
Right Mouse Button
In Window applications, this mouse button is used for the pop up menus. With right
mouse button, the user is able to open up the pop up menus of mDraw.
Base Window
The base window is the central place where networks are visualized.
After loading a network from file, it will be displayed in the network area of the base
window. mDraw can draw very large networks in fairly small rectangle, so scrollbars
aren't implemented.
The pull down menus is used to start operations in mDraw. Menus can either be selected
with the mouse. The following menus are available in mDraw V1.0:
• File Menu
• Settings Menu
• Layout Menu
• Tools Menu
• View Menu
14
• Help Menu
File Menu
Load From
Loading a network, or a network layout from a file .After selecting this entry from the file
menu an Open Dialog Box will appear, in it you can select your network. Loading
network status can be done only after you have opened a network.
Save As…
Image - This option stores the network image as a bitmap, a Save Dialog Box will appear,
with the name of the network with a .BMP extension to it, you can select the path for the
saved image.
File – This option stores the network coordinates to a file, a Save Dialog will appear, with
the name of the network and an extension of "_LAYOUT.txt", this is the network
coordinates that can be loaded later for drawing the network without using layout
algorithm, in-order of saving time.
Run
This option operates a selected layout algorithm for the network; any algorithm
parameters that whore chosen will take effect after this entry.
Print
Sending the current network in PostScript format to a printer or storing it in a PostScript
file. After selecting this menu entry, a print dialog window will appear to specify the
parameters.
Exit
Exiting an mDraw session. Note: The user is not asked to confirm before quitting, so be
sure to save the status for all networks if you want to keep the layout for a later session.
15
Settings Menu
Layout parameters
Used to set the parameters for controlling the network layout algorithm and fine tuning.
After selecting this menu entry, a layout parameters dialog window will appear to specify
the options.
Network Type
Used to set the parameters for the type of network to be drawn and his settings. After
selecting this menu entry, a Network Type dialog window will appear to specify the
options.
Layout menu
Network
Used to set drawing options for the selected network. After selecting this menu entry, a
Network Style dialog window will appear to specify the options.
Color Map
Used to set color options for the selected network edges. After selecting this menu entry,
a Color Map dialog window will appear to specify the options.
Tools Menu
16
Mfinder
Used to set the parameters and path to network for executing the Mfinder application.
After selecting this menu entry, an Mfinder dialog window will appear to specify the
options.
Motifs
Used to pick motifs in network , this can be done only after running the mfinder. After
selecting this menu entry, a Motif dialog window will appear to specify the options.
Focus
Used for opening the Focus window and Info window . After selecting this menu entry, a
Focus window will appear to specify the options, and show the Focus window and Info
window.
Goto
Used for marking a specified node in the network, and drawing the network around the
node.
View Menu
Labels
Used to draw labels for nodes . After selecting this menu entry, an Open dialog window
will appear to specify the path for labels file , if no file was selected all nodes would be
labeled with there input integers .
Network Stat
After selecting this menu entry, a message box window with info about the network.
17
Algorithm Stat
After selecting this menu entry, a message box window with info about algorithm running
time .
Help
Tutorial
Open user manual from application.
Updates
Open mDraw home page for update checking.
About
About the application creators.
Popup menus
Move
Used to move the whole network, After selecting this popup menu entry, be aware that
mouse handle in the network area will be change to a "cross", then drag the mouse to
move the whole network. Note : until releasing this entry by clicking it again , or
18
choosing a different popup menu entry, all Right mouse button operations are dedicated to
Move .
Goto
See Goto
Reset
Used to draw network back to its initial layout .
ZoomIn
To zoom in the detail of the network, the user can draw a rectangular over the interested
region as shown in the following .
Figure:
Zoom Back
Allows unlimited zoom back of each steps of zoom in activities .
ZoomOut
Enables quick zoom out by pre-determent steps .
Set Layers
Manually
Used for quantization of the layers in network. After selecting this menu entry, a Layers
dialog window with the number of layers in network (topologically) , the user can keep
this number , or choose different number of layers for network .
Automatically
Used for automatically quantizes layers in network .
19
DragVtx
The DragVtx operation is carried out by clicking on a node in the network area with Right
mouse button and hold down this mouse button. Then move the mouse by still pressing
Right mouse button. Note : until releasing this entry by clicking it again , or choosing a
different popup menu entry, all Right mouse button operations are dedicated to DragVtx.
Focusing
Used for getting the selected node close selected neighbors and node info, all will be
displayed in the Focus Window, after selecting this menu entry, just click the selected
node by pressing Right mouse button. Note: until releasing this entry by clicking it again,
or choosing a different popup menu entry, all Right mouse button operations are dedicated
to Focusing.
Switch Windows
This option is enabled only after focusing has been made. Used for switching the image
that is being displayed in the focus window, with the image being displayed in the main
drawing area. Note: after switching windows focusing is disabled (until closing and
opening the focus window again).
Undo Goto
This option is enabled only after Goto operation has been made. Clear the Goto operation
.
Note: this menu is available only in transcription and signal-transaction network types.
Expand
Used for the reveling of all nodes that were "hidden" in a coarse structure, The Expand
operation is carried out by clicking on a coarse structure in the network area with Right
mouse button after selecting Expand.
Collapse
Used for creating a coarse structure, The Collapse operation is carried out by clicking on
a node that can be a part of coarse structure PARENT in the network area with Right
mouse button after selecting Collapse.
20
Focus
Used for reveling all of the nodes that were "hidden" in a coarse structure within the
Focus Window, The Focus operation is carried out by clicking on a coarse structure in the
network area with Right mouse button after selecting Focus.
Dialogs
Mfinder
Opened by : Tool bar run mfinder ,or by Tools / Mfinder .
21
• Motif Size High : Use to determent the size of smaller motifs to look for . Default
set to 4 .
• Number of random networks to generate: Use to determent the number of random
networks mfinder should create while running . Default set to 10 .
• Network Type : choose directed or non-directed . Default set to Directed . Note :
These parameters do not affect the layout ,and are used only for the mfinder .
• Input File Format : : Use to determent whether the network nodes have source to
target relations ,or target to source relations , Default set to source to target .
• Additional Flags: additional flags for the mfinder
• Run : execute mfinder .
Motifs
Opened by : Tools / motifs or automatically after the mfinder run .
• MEMBERS File: browse for members created by mfinder . Note : this edit box if
filled by the application .
• Ok : draws selected motifs .
Focus
Opened by : Tools / Focus or by Tool bar / Focus .
22
• Vertices Info : window that present vertices info .
• Focused network : window that present vertices and its neighbors .
• Neighbors Level : : Use to determent the level of neighbors that would be drawn
in the focused network . for example if the level is one , only neighbors that have
only one edge between them and the selected node would appear in network .
• Decrease Neighbors Level : clicking the minus icon the decrease the level of
neighbors that are being drawn in the focused network.
• Increase Neighbors Level : clicking the plus icon the increase the level of
neighbors that are being drawn in the focused network.
Note : to close this window simply click Tools / Focus , or Tool bar / Focus again .
Goto
Opened by popup menu / goto , or by Tools / goto
• Label by number : write the nodes label number in the edit box and click ok.
• Label by name : write the nodes label name in the edit box and click ok .
Color - Map
Opened by popup Layout / ColorMap .
23
• Change color – pick the edge color to change .
• To Color – pick the color to change edge color to .
Note : only one color can be changed each time .
Layers
Opened by clicking BMenu / SetLayers Manually .
Network Type
Opened by Settings/ Network Type.
• Network type – choose what kind of network you to draw, default are regular.
24
• SIM – create coarse structure of SIM .(only in transcription network)
• Multi-fan– create coarse structure of Multi-fan .(only in transcription network)
• FFL – create coarse structure of FFL .(only in transcription network)
• DORS – divide network into DORS parts.
Note: all network type option is available even after loading network, but than you should
click Run to execute changes.
Network
Opened by Layout/ Network .
• Full Network – draw the whole net , ( by default only the network largest
component is being drawn ).
• Motifs Only – draw only edges and vertex that are in a Motif .
• Doubling – double vertex with a large number of out-edges .
• Use Full Window – uses all of the network area to draw network .( by default the
network is being drawn in a square).
• Scale – scale to draw the network.
25
Opened by Layout/Vertices and Edge Style.
Layout Parameters
Opened by Settings/Layout Parameters.
26
X-coordinates
• First phase – choose layout algorithm, default is MinLa .
• Second phase – use Fruchterman-Reingold , default – Use .
Fruchterman-Reingold
• K_r – decide on the repulsive power between nodes.
• K – Decide the strength of the spring connected neighbor's nodes.
• Init temp, final temp and Temp decrease rate are all parameters to decide on
the length of algorithm running time.
Linear arrangement
• M.S Iterations – number of Iterations in the MinLa algorithm.
• K1 and K2 – forces that are being used in MinLa algorithm.
Reset of the parameters in the Advanced Algorithm Parameters is not to be played with.
27
END
28