Monday, August 22, 2016

Final Report

Hello everyone,

As the GSoC come to an end, I would like to sum up what I have done for the past 4 months. For my GSoC project, I have been working on the Interconvertible Layout program for CellDesigner. This project implements a converter that turns CellDesigner annotation into SBML Layout package and vice versa, preserving the biochemical network layouts when handling the model in different softwares.

Here is a link to this project's repository.
https://github.com/funasoul/celldesigner-parser


For my last result, I will present the conversion of influenza model (Matsuoka,Y. BMC systems biology 7.1 (2013): 1.) and Core metabolism model of E.coli (http://escher.github.io/) converted with EscherConverter.

CellDesigner to SBML Layout

Influenza model original

Influenza model converted


SBML Layout to CellDesigner

E.coli model original

E.coli model converted


Finally, I would like to thank Google Summer of Code, NRNB, and SBML team for giving me this opportunity and my mentors Dr. Dräger and Dr. Funahashi for their support.

Wednesday, August 17, 2016

Final week (week 16)

Hi all,

Only few more days are left until I submit my work. And last week, I left off with some unfinished tasks. Here are the todo list from last week. Darker blue means for the conversion from SBML Layout to CellDesigner Annotation and lighter blue means  for the conversion from CellDesigner Annotation to SBML Layout.




For this week, I have mainly worked on 1st, 3rd, and 4th tasks. As for the conversion of bezier curve,  I have converted the bezier curve into line segments, since CellDesigner does not allow a bezier curve with the reaction with one reactant and one product.


Bezier original

Bezier converted

For the 3rd task, I have added conversion for reaction with modifiers with branches.


Modifier with branches original

Modifier with branches converted

Also, for the 4th task, adjusting the arrowhead, I have moved the end point of the line segment to go to the boundary of the glyph.


arrowhead before

arrowhead after


Additionally, I have fixed the conversion for FBC package. I have added the conversion for reaction with boolean logic operators.


boolean model







boolean model converted 


So for the next few days, I have to work on the 2nd task and wrap up the project.

Wednesday, August 10, 2016

week 15

Hello everyone,

Last week, I left off with the following tasks. So, this week I have been working on these. In particular, I have been working on the 1st, 2nd, 3rd, 5th, and 6th tasks from the top.

 

For the first three tasks, it is still in progress.  I am struggling with the conversion of edit points. But I managed to complete the conversion for some of the reaction.



heterodimer association


heterodimer association converted

For the 5th task (adjusting text glyph), the text for the reaction is adjusted to go in the center of reaction. The previous implementation laid the text glyph near a reactant, but now I have changed that to go into center of the reaction




before adjustment            after adjustment


For the 6th task, I have added the conversion of gene on CellDesigner Annotation to the SBML fbc package.


fbc converted model



Here is the diagram of how much of the conversion is covered. Blue means it's completed, red means it's not yet completed, green means it's unconvertable.



Next week is going to be the last week of Google Summer of Code. Below is the tasks that I still need to work on. I am hoping to complete at least the top 5 tasks before the deadline.




Wednesday, August 3, 2016

Week 14

Hello everyone,

This week, I have been working on reactions with branches. I was able to convert the branched reactions only with the one that have single reactant and product. For the reaction with multiple reactants/products,  the conversion for connecting point is a bit off. I assume there is something wrong in the algorithm.



So far, for the conversion from SBML Layout to CellDesigner annotation, I have completed the following shown in the chart below. Blue is completed, red is incomplete, and green is inconvertable.




Also, the remaining tasks for this project is as below.  The dark blue is for conversion from SBML Layout to CellDesigner annotation, and the light blue if for conversion from CellDesigner annotation to SBML Layout. For next week, I will be working on the tasks on the top. 

Wednesday, July 27, 2016

Week 13

Hello everyone,


This week I have been working on the reaction conversion from SBML Layout to CellDesigner annotation. Last week, I have completed converting reactions with 1 reactant and 1 product with 1 modifier.  For this week, I have completed converting reactions with multiple reactants/ products and with bezier curve.


While working on these conversions, I encountered two problems. First is defining bezier curve with one reactant and one product. Currently, I can only convert bezier curves only when there are multiple reactants and products like the second model above. I could not figure out a way to define a bezier curve in this situation. The second problem arises when the reaction contains the same species in both reactant and product. Every glyph is mapped to a unique SpeciesAnnotation. When working on the this kind of reaction both reactant and product were referencing the same species annotation. As a result, the output model would turn out as like the model below. To solve the second problem, I had to change up the main algorithm for conversion from SBML Layout to CellDesigner.


Model with same species as reactant and product


So, here is the chart for converting SBML Layout to CellDesigner Annotation. Blue means it's completed, red means it's not yet completed, green means it's unconvertable.




Since there is only 3 weeks left for GSoC, I have created a brief todo list.  Each tasks are ordered in priority levels, where the highest priority task coming up top. From now on, I will be mostly following this list.



Tuesday, July 19, 2016

Week 12

Hi all,

This week,  I have been a bit busy but I was able to start on converting the reactions. So far,  the converter is able to convert simple reactions without any bending with modifiers.



The progress so far for converting the SBML Layout to CellDesigner is listed below. For next week, I will be starting on more complex reactions such as those with bezier curves or multiple line segments.

Wednesday, July 13, 2016

Week 11

Hi all,

For the previous 2 weeks, I have been trying to get the CellDesigner to read the converted model from SBML layout. This week, I have finally got some visual result. I can now open the converted model with CellDesigner.

Species original

Species converted

Here are the diagram on how much the conversion is completed. Blue means it's completed, red means it's not yet completed, green means it's unconvertable. After I convert the catalyzed reaction on species, I will start on the reaction conversion.





Also, last week I found out that the math equation was converted incompletely when unmarshaled with JAXB. When converting SBML Layout to CellDesigner Annotation,  the output model will be generated using JAXB having incomplete math equation. To overcome this problem, the converter will copy the math equations once the model is outputted with JAXB. The chart below shows the overview of the converter.


Wednesday, July 6, 2016

Week 10

Hello all,

This week, I have been working on the actual conversion from SBML Layout to CellDesigner Annotation.  I have started the conversions for species and compartment using the informations from their glyphs. The chart below shows how much I have covered so far for conversion. Blue means it's completed, red means it's not yet completed, green means it's unconvertable.




Another thing I have been doing is that I have been creating a command line interface.

git clone https://github.com/funasoul/celldesigner-parser
mvn install
java -jar celldesigner-parser-0.0.1-SNAPSHOT-jar-with-dependencies.jar  input.xml [output.xml] [CD2Layout / Layout2CD]

First create the runnable jar file with maven. Then run the jar with arguments input file, path to output (optional), and which direction CellDesigner to Layout or Layout to CellDesigner (optional).


Also, I tried to provide a visual aid on the progress I have made, however CellDesigner can't read my converted model yet. Currently something is wrong with the Species Alias and throws an exception. For next week, my first goal is to get some graphical output on the converted model.

Here are the result I get for my current implementation.

Layout model

CellDesigner Annotation Model



One last thing. I have noticed an error when unmarshaling the SBML file.  In the kinetic law, the math equation is converted in the wrong form.

Original Model is written like on the below.
    <mathml:math>
                        <mathml:apply>
                            <mathml:times/>
                            <mathml:ci> k1 </mathml:ci>
                            <mathml:ci> s1 </mathml:ci>
                        </mathml:apply>
                    </mathml:math>

When unmarshaled, the duplicating ci attribute is removed.
   <mathml:math>
                        <mathml:apply>
                            <mathml:ci> k1 </mathml:ci>
                            <mathml:times/>
                        </mathml:apply>
                    </mathml:math>


So whenever I convert the model to SBML Layout to CellDesigner Annotation, it changes the equation.  I presume something might be wrong with the MathML schema (sbml-mathml.xsd). 

Tuesday, June 28, 2016

First week for converting Layout to CellDesigner Annotation

Hello all,

Last week, I  have mentioned that there are still few attributes in the CellDesigner annotation to be converted. Before working the conversion for the other direction, I have implemented the conversions for links and bezier curves.



As for the conversion of SBML Layout to CellDesigner Annotation,  I have been working on the APIs for SBML objects such as Species and for inputs/outputs. The basic algorithm for the conversions with be as follow.

  1. Read model with JSBML
  2. Downgrade 1. to Level 2 Version 4
  3. Unmarshal 2. as string
  4. From 1. convert the Layout attributes to 3.
So far, I have created the basic algorithms above and have created model with empty CellDesigner annotation. Below are the progress I have made so far. For next week, I will be starting on converting each type of glyphs.




Wednesday, June 22, 2016

Half way through

Hello all,

This week is midterm evaluation week. Which means that I am half way through the GSoC program. This week, I have been working on the conversion of complex species and edit points for branched reactions.



Since it's midterm week, I have created a diagram to show how much of the conversion from CellDesigner Annotation to SBML layout has been completed. All items in blue are the ones that have been covered and are able to convert. Items in red are annotations that have not yet been implemented.  From this diagram, you can tell that I still need to work with reactant / product links, residues, beziers, and boolean. 



For my initial plan, I had my midterm goal set as completing the conversion of CellDesigner Annotation to SBML Layout.  The converter still have some missing features, but I have roughly accomplished my goal.  As for my next goal, I will be working on the conversion from SBML Layout to CellDesigner Annotation and will have a converter that converts both ways.