Newcastle University Drylab/28 May 2008

Mark
Continued on with coding up the EA. Have completely finished the structure coded section, and am now working on a fitness funtion and mutation method that can be implemented to change the weights on these nodes. Also need to specify the boundaries for the double numbers to be incorporated into the double arrays. Thinking of between 0.1 and 10.

Have also done some biological research today concerning the Listeria monocytogenes organism and come up with a couple of signal transduction systems that have been defined that are not homologous to the agr signalling system. This might well make it easier and cleaner than having two agr signalling systems. The systems are the LisRK and the CesRK two-component systems.

Going to start coding up the next part of the EA tomorrow, the mutating method and adding more functionality.

Megan
Still looking at the JDBC tutorial, taking quite a while but is helping to give me an indiciation of how the problem can be tackled. Here is some of my understanding so far.

Outline of the structure of the database and information required Example of the two types of table that the database would consist of.

PART TYPE

TYPE e.g. Repressor This table would have other columns including nucleotide sequence.

It may seem strange only having two types of table however there is no need to break tables down into smaller tables as this would only lead to over complication of the database

End user requirements:

 * Nucleotide sequence
 * Part ID
 * Part name
 * Part model
 * Function
 * Type

(Basically all information that is stored within the database needs to be used-otherwise there is no point it being in the database)

All of the information stored in the database should be made available to an end user. However not all of this will be provided by this component of the project. For example the sequence is not required (this is part of project 4). The most important information is the model of the part that can be output to the genetic algorithm.

SQL query and Java outline idea
I am unsure whether the program would have some form of input, such as the type of part that is required, or whether all of the information should just be output in some way.

The outline of the SQL would be

SELECT model FROM repressor WHERE ((repressor.uniqueID)=……)       Already this gets confusing as prior knowledge is required, there need to be something predefined otherwise this cannot work.

Shall try working backwards from what the end user wants, then the java pseudocode for this hopefully the SQL will become clearer.

End user may require any of the information that is stored in the database, Basically any of the information that is stored on each individual part.

In the case of the iGEM project the end user will be the genetic algorithm (project 3). This algorithm will require the part unique identifier and the model. It will also need the model type, but maybe not to know this but to allow it to select a combination of the different parts. Also, the constraints database requires a list of all of the parts so that it can provide the relative constraints between them.

Java pseudo code….
A range of get methods will be required.

I think that each of these should work in a similar way just using a different SQL query. I think that I would be able to use an SQL query that will iterate around every entry in the table. For example if there is a table of 5 promoters then each number could have an entry number (e.g. 1-5) then some kind of while loop could be used, if it’s possible to do this in SQL-but haven’t managed to find out whether this is possible yet. The SQL can be involved in set methods that can then be retrieved by get methods.

I think that the code that I will be writing is using JDBC, this allows for java code and SQL to be implemented together.

Firstly I will need to install the latest version of java along with Netbeans, JDBC also requires a database management system (DBMS). The DBMS comes with a driver (this can be one of four different types).* think that the driver has something to do with a URL so maybe accessing information online.

SQL queries will be written to obtain whatever information is required by the end user. I am currently (still) unsure as to how the different parts are going to be selected however for the java code this is not important, the point is that there will be a set of queries that will output data from the database.

JAVA
The driver needs to be loaded (the class name of this will be provided by the driver documentation). Then this connects to the DBMS – not sure how this all works yet.

ResultSet is an interface that can be used for retrieving the output of SQL queries.
 * this seems perhaps slightly too straightforward, there is clearly going to be more to my program than just the generation of the product of the SQL query.

There are different types of ResultSet. I think that the type that I would use is:

TYPE_SCROLL_SENSITIVE, I think that this enables the ‘cursor’ to move backwards and forwards between the different rows.

Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,                                    ResultSet.CONCUR_READ_ONLY);//the results of the query cannot be altered by the user this can be set as updatable however for my program I do not want the results to be updatable. ResultSet srs = stmt.executeQuery("SELECT model FROM promoter");???

The query can direct the ‘cursor’ of the ResultSet method to the correct table. Using a scrolling object within ResultSet, different rows can be accessed

''so iterating through different parts within the same table in the database will be carried out by the java code, not using the SQL query. So the SQL will only direct to the table and column for desired information.''

So SQL could be …

SELECT model FROM promoter

The SQL is quite simple, this would select the model form the promoter table. Then the different rows can be chosen by the java code. There are options to make it select the ‘next’ row however I think that I will need to find a way for it to select rows at random.

The information required for each part can be retrieved using get methods. For example if the part unique ID was required could use something like this…..

while (srs.next) {      String ID = srs.getString(“UniqueID”); }

It is possible to select the row in the table using ‘absolute’ or ‘relative’ and declare either positive and negative integers to move around rows. Hopefully there is some way that these can be implemented to allow for random row selection, possibly by using a loop, however this may not really be very random, but then if the GA is creating random combinations my program might need to just select each bit of information on each part individually. Then declare an instance of ResultsSet to store the results that are given by the SQL query. These can then be accessed or given to the end user.


 * The parts do not need to be randomly selected, this is the job of the genetic algorithm. So which ever requested part will need to be retrieved. This makes things simpler as each

Very vague Pseudo code

 * import driver for JDBC and the database management system for this
 * ResultSet interface will be used to retrieve the information required.
 * Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY); this will allow the cursor to scroll along to the ‘next’ row and is read only so that the output cannot be modified
 * ResultSet will be initiated
 * ResultSet srs = stmt.executeQuery (“SELECT model FROM promoter”) or something along these lines that will direct the query to a particular table and select a certain column

This statement can be repeated for each of the parts tables, i.e. activator, repressor, polymerase, output etc… And within these tables set to determine which ever attributes are required, e.g. unique ID, model, function…

Within this class the getMethods can be implemented.

So, the program will follow the SQL query to the correct table and column, then a method need to be used to tell it which rows and format of information needs to be gained, this can use a while statement to go through each row.

while (srs.next) {	 String ID = srs.getString(“UniqueID”); }

Then an object of the ResultSet will need to be created in which to store the results

Morgan
Caught myself yesterday trying to streamline hardcoding. I don't think I was quite awake.

Found stupid new bug with legend. Argh.

I HAS VERY SUBTLE DIRECTED EDGES JA.



Uh yes. Pickled brains.

Meanwhile, I can now draw dotted edges, edges with arrows (one way or two ways) or ordinary lines. But those are boring. I took code from prefuse to rotate the arrow heads appropriately to the line direction.

I can also rename the elements in the drawing panel.

And now I have informative status bar messages, in the build panel at least.

Aha, now I can populate the drawing panel with stuff from a Circuit. I think that's enough for the day.