### Download

## Demo

- https://webswing.combio.org/gas/
- User: demo, password: demo

### Tutorial

#### Creating a new drawing area

To be able to draw a new graph you have to create a new drawing area. By clicking on the icon �in the toolbar or choosing �New Graph� in file menu, a new internal window will popup where it is possible to draw a graph.

#### Open graphs

For opening saved graphs you can click on the icon �in the toolbar or by clicking on �Open Graph� in file menu. A file dialog will appear and showing files ending with the suffix �gas� that is the format used by Gene Assembly Simulator.�

#### Save graphs

To save a graph you can click on the icon �in the toolbar or by clicking on �Save Graph� in the file menu. A save dialog will appear were you can choose where to save the graph and what name it should have. The graph is saved in gas format but you can also choose to save it in xml format.

#### Undo

To undo something you have done to the graph is done by clicking on the icon �or by clicking on �Undo� in edit menu.

#### Redo

To redo something you have undone to the graph is done by clicking on the icon �or by clicking on �Redo� in edit menu.

#### Tiling windows

It is possible to tile the internal windows by clicking on the icon �or by clicking on �Tile Windows� in window menu. The internal windows will be resized to fit inside the main window.

#### Align nodes

For aligning nodes you can click on the icon �or by clicking on �Align Nodes� in view menu and the nodes will be automatically aligned.

#### Zoom in

By clicking on the icon �or by clicking on �Zoom In� in view menu the graph in the selected frame will be enlarged.

#### Zoom out

By clicking on the icon �or by clicking on �Zoom Out� in view menu the graph in the selected frame will be reduced in size.

#### Solution

If a solution for reducing a graph is found using the �Parallel assembly�, that solution will be saved and you can check the solution by clicking on the icon �or by clicking on �Solution� in view menu. The solution for a graph will also be saved when a graph is saved. Smart to use when graphs are big and needs minutes or more for finding a solution, then using the solution button is a fast way to view the solution.

#### Adding nodes

By clicking on the icon �in the vertical toolbar you are able to draw nodes in the internal window. Left mouse click will create a negative node and a right click will create a positive node.

#### Adding edges

You can add an edge between two nodes by selecting the icon �in the vertical toolbar. Press down the left button on a node and drag the mouse to another node and release the mouse button.

#### Select

To select a node or an edge you have to select the iconin the vertical toolbar and then left click on a node or an edge and they will be selected.

#### Change node state

Changing the state of a node is done by first pushing the select buttonin the vertical toolbar and then making a right-click on the node.

#### Move node

It is possible to move a node by selecting theicon in the vertical toolbar and then dragging the desired node to its new location.

#### Move graph

By clicking on the iconin the vertical toolbar you are able to move all nodes and edges on the same time. Just click outside of a node or an edge in the window and drag to a new location.

#### Delete

To delete a node or an edge you have to select it as described and press delete on keyboard or by pressing icon �in the toolbar.

#### Gnr, gpr, gdr

To do a gnr or a gpr operation on the graph you first have to select one node and then press the �or �icon in the toolbar. For a gdr operation you have to select two nodes and then press the �icon in the toolbar.

#### Apply

In one parallel step it may be possible to do many gnr, gpr and gdr operations on the graph. If you think it is possible to do a gpr and a gdr operation on the graph in one parallel step, you can select all the nodes and click on the �icon in the toolbar. The program will try to assemble the selected nodes in one parallel step by trying different combinations of gnr, gpr and gdr operations.

#### Parallel assembly

You can do parallel assembly on a graph and get a solution by clicking on the �icon in the toolbar. By clicking on parallel assembly icon a new window will popup and asking how good a solution you want to find � give there the number of steps the desired parallel strategy should have. E.g., to find the best possible strategy, write 1. If it is not possible to find a solution in one step then it will print out the best solution it found.

By checking the �use full exhaustive search� check box the parallel assembly will use full exhaustive search for finding a solution for the graph. If you do not check the �use full exhaustive search� check box then the parallel assembly will use a maximal parallelism algorithm for finding a solution. The full exhaustive search is slower but it will go trough all possible solutions for the graph for finding the best one. Maximal parallelism algorithm is quicker because it always applies maximal number of operations possible in every parallel step, but in some cases it will not find the best solution. �

You can also view how the graph will look like after every parallel step. By pressing the button �show solution� one ore more windows will popup depending on the number of parallel steps, showing you the graph after every parallel step.

If you are searching for a solution for a big graph it can take many minutes or more for finding the solution. By clicking �Current best solution� button you will get the best solution so far found.

If you thinks it takes to long to calculate the solution for the graph you can stop it by pressing the stop button.

Figure 1

#### Save graph as� jpg

To save a graph as a jpg picture you only have to choose �Save Graph as Jpg� in file menu under submenu export and a save dialog will appear that makes it possible to specify where to save the jpg file.�

#### Save graph as postscript

Saving a graph as a postscript file is done by clicking on �Save Graph as ColorEPS� in file menu under submenu export and a save dialog will appear that makes it possible to specify where to save the postscript file.�

#### Save graph as gray scaled postscript

Saving a graph as a gray scaled postscript file is done by clicking on �Save Graph as GrayEPS� in file menu under submenu export and a save dialog will appear that makes it possible to specify where to save the postscript file.�

#### Change graph properties

You can change the graph properties by clicking on �Graph Properties� in edit menu.

In graph properties window you can change node colors, select color, edge color, label color, label size, node size and edge width.

�

Figure 2

#### Default settings

If you want to get the original fonts, colors and node size the program uses, you can click on �Get Default Settings� in view menu.

#### Exhaustive search

Exhaustive search is used for finding graphs that needs at least so many parallel steps that you have specified. For example, if you choose �Positive and negative nodes� in exhaustive search dialog, graphs that has positive and negative nodes will be generated. You can also specify how many nodes the generated graphs should have, for example ten. Then you put �Minimal parallel complexity� to two and press start. Exhaustive search will try to find a graph that has ten nodes that are positive and negative and needs at least two parallel steps to be solved. If a graph is found needing at least two parallel steps then a new window will appear showing you the graph. By checking �Trees only� check box, only graphs without cycles will be created.

You can use two types of search algorithms. Exhaustive search is a slower algorithm but will go trough all solutions for a graph and it guaranties that the solution for the graph is the one with smallest number of parallel steps. Maximal parallelism is more greedy and it always applies the maximal number of operations in every parallel steps. You can use maximal parallel algorithm for going through a large number of graphs fast and if a graph is found you can double check it with the exhaustive search algorithm.

A progress bar shows you that �Exhaustive search� is searching and the number of graphs that has been tested is shown. There is also the possibility to turn of the progress bar and this makes the exhaustive search a bit faster.

Figure 3

#### Graph from a legal string

You can create a graph from a double occurrence string (legal string) by clicking on �Create Graph From Legal String� in operations menu. Write your string in �Legal String� field and press �Create� button to create the graph.

Press Ctrl to switch between writing inverted integers (in red) and non-inverted integers (black). If your string is not legal, a message appears telling you that the string you entered is not legal.

Figure 4