End of Summer

Hi everyone!

Summer of Code is finally coming to an end. The official “pencils down” date is the 29th, so a great deal of the work I’ve been doing this past week has been testing my code and creating documentation. You can find my final project at https://github.com/BoyDun/IBW_SBML_SBOL_Export. The Repressilator SBML model produces a nicely oscillating graph when simulated in iBioSim, and you can run it for yourself with the converted file I included in the “Example Conversions” folder. My repository contains every file in IBW that I’ve created or modified, but since Infobiotics Workbench will be open-source pending publication, my code isn’t runnable by itself. However, I’ve included a link to the IBW executable in the README, where you can run the compiled program and look for my feature under File->Export->SBML/SBOL.

The logical next step in a hypothetical extension to this project would be to allow for the import and conversion of SBOL and SBML models into IBL documents, but that would require implementing a function that can convert the Eclipse Modeling Framework IBL model back into a document. Another challenge would be to properly handle missing information from either the SBOL or SBML side since neither standard captures every aspect of IBL.

As for me, I’m hoping to present my work at COMBINE, an annual conference coordinating the development of systems biology standards. Additionally, after discussing with my mentors, I’m happy to say I will be continuing my work with the Infobiotics Workbench, although at a much reduced pace due to academic obligations during the school year.

And I think that about sums up my experience this summer – if you want to reach out for whatever reason, feel free to do so at bodun@stanford.edu. Other than that, see you maybe next summer 🙂


Tidying Up Pt. 2

Hi everyone,

Today marks the penultimate week of GSoC, which means I’m wrapping things up. Aside from one small issue with SBML rate units, I’ve finished constructing my export functions and their corresponding user interface. My SBML cell molecules now properly replace their corresponding molecules in device input/output lists instead of the other way around, and I’ve included the proper unit-base Kinds in their corresponding unit definitions. I’ve also updated my JSBML package to the most recent snapshot, built straight from source. Although it may not be as well-supported at this point as their most recent stable release, it contains a bug patch that eliminates many of my SBML document validation errors regarding correctly set Port IDs.

The most challenging issue I worked on this week was setting up correct KineticLaws for my SBML Reactions. There isn’t much documentation describing how the string representation of the KineticLaw should be constructed, but I made it work through a mixture of looking through supporting code, guessing-and-checking, and asking my mentors. The forward and reverse rates must be added as LocalParameters before being referenced by their parameter IDs, whereas the reactants and products didn’t need to be added since they were already included in the Reaction as SpeciesReferences.

Finally, I added comment blocks documenting every function I wrote in IBW and a few additional in-line comments. Next steps include testing my functions with a variety of IBL models to ensure they are robust and creating any other documentation that is necessary.


Tidying Up

Hi all!

This week I mainly focused on updating and patching bugs in my UI implementation and interface between the UI and actual conversion function. I extended the export wizards to request a name to save the converted model to and automatically append the proper file extension when necessary. Within SBML specifically, I included the option of flattening the exported model – this is achieved by first flattening the EMF model before parsing it with my SBML export function.

Finally, one persistent bug I had was a null-pointer exception in IblResource, an object that I needed to fetch the EMF model. The object initialized as null upon startup and only acquired a value after the user clicked on the proper frame in IBW. To resolve this issue, I manually fetch the resource from the active frame if the user chooses to export to SBOL or SBML. Now, the user can immediately export from an IBL document upon first launching IBW.

In my export functions, I fixed my SBML ports and SBOL maptos that link cell components (compartment, species) to device components. Currently, I’m working on updating my SBML package to the most recent snapshot and fixing my unit definitions.

Until next week,

Google Summer of Code Final Phase!

Hi everyone!

This week marks the beginning of the final phase of Google Summer of Code. While I’m putting the finishing touches on my SBOL and SBML export functionalities, I’ve also constructed the UI interface for an export wizard started by another IBW contributor. By going to file→export→SBOL or file→export→SBML, the user can now explicitly choose to export his IBL model as SBOL or SBML without having to first biocompile his model. The SBOL interface lets the user choose to export a biocompiled or non-biocompiled model, and it also prompts for a namespace and a directory path. The SBML interface is a bit simpler and only requires a directory path.

Hooking the export functionalities into the wizard, which is located in a different package, generated a circular dependency that I resolved by eliminating my function’s call to the Biocompiler class. I now skip over device ruleLists and moleculeLists during SBOL export in order to produce a cleaner visualization, and I’ve integrated SBML export into IBW. Current issues I’m working on include fetching the correct Ibl resource to export without having to explicitly click on it and resolving my last few SBML design errors.



Further Updates on SBOL Export in IBW

Hi everyone!

I spent most of this week polishing up my SBOL export functionality in IBW. I also made a small tweak to the bypassGUI.xtend file to run on libSBOLj 2.1 and implemented sequence fetching from SynBioHub. This will allow users to include parts from SynBioHub’s virtual repository in their IBL document. I am currently attempting to fetch the hierarchical EMF model to export rather than the flattened model, which doesn’t allow me to access information such as the input and output molecules of devices.

The export function now takes in both the EMF model and an optional Biocompiler model since both contain relevant information that can populate the final SBOL model. On the frontend, users will have the option of choosing to export the SBOL model pre- or post-biocompilation, which dictates if the Biocompiler model will be included.

The user is now prompted for a namespace to use to generate the SBOL model rather than the default placeholder “file://dummy.org”. I model cell and device rules as interactions, and I include their reactants and products as participants. Finally, I restructured the way the IBL model is iterated through so that instead of using MapTos between DNA component definitions declared in the cell and device partList, I now define the DNA part in the cell and instantiate it in the device that declares it or the cell itself if no device declares it. I also account for the possibility that the DNA part is mentioned in a cell rule, in which case an error is thrown since that should not happen.

To fix my naming scheme, I first modified my check for uniqueness to match URIs rather than names, which can be duplicated in an IBL document. If a molecule’s URI is not matched or it doesn’t have a URI, I make the assumption that the molecule is unique and create a new component definition for it. My uniqification procedure includes attempting to fetch that molecule’s component definition by ID and incrementing a counter that I append to the end of the ID until I create a unique ID that doesn’t return a fetched component definition. To account for display IDs consisting of URLs, I only use the part of the ID after the last delimiter, which I consider to be “/”, “#”, or “:”.

Finally, I found and fixed a variety of bugs introduced into my code from my updates. For example, I realized that only DNA components declared at the cell level contain a URI; components at the device part list level do not. In addition, SBO URIs must be included from identifiers.org and cannot be from any other domain. That about sums up my work!

Until next week,


In-Environment Development

Hi all!

I spent most of my week debugging my SBOL export functionality to comply with the Infobiotics Workbench Eclipse environment. My mentors and I realized that the EMF model and compiled Biocompiler Model both store different information necessary for a complete SBOL model, which is why I’ve also begun extending my export function to optionally handle both models instead of just one. This will allow the user to convert just the hierarchical information from the pre-compilation EMF model or also obtain information post-compilation about sequences, ribosome binding sites, etc.

A few issues I faced this week included figuring out how to import an external dependency (SBOL) into an Eclipse RCP application and modeling components with missing IDs and other information in SBOL. The resulting SBOL document I created from an existing IBL toggle_switch example appears as expected when visualized in iBioSim, though there might be a better way to implement the placeholder names I designed for components that lacked IDs. My next step is to implement better names for objects that lack unique IDs, improve the way I iterate over DNA parts, and hash molecules with URL IDs correctly. I will test my final product with a suite of IBL documents and ensure that they are all modeled correctly.


Windows -> Linux

Hi everyone!

This week I shifted my entire workflow to Ubuntu so I can make use of better-supported software. I successfully converted my test SBOL model to SBML via the Linux version of iBioSim, and the Windows version is also now completely functional. The converted SBML document captured an approximate semblance of my original SBOL model, including compartments for the cells and separate models for each cell and device. However, the DNA sequences themselves could not be captured due to the nature of SBML, and the individual device parts were given some strange names. A list of parameters were created and populated by default, which is something I’ll have to consider in my own implementation.

I again extended my SBOL export code, this time to handle the existence of Regions and alternative methods of populating the Biocompiler Model. Regions are objects that store multiple cells each, and the overall model must store only regions, only cells, only devices, or only molecules. Delving further in, regions may store molecules instead of cells, and cells may store molecules and not devices.

I also reattempted the installation of IBW in my Linux environment, which proved successful. Aside from a few compiler warnings and null-pointer exceptions, the Linux version of IBW works perfectly fine for me. I’ve ported my SBOL export framework over to the IBW source code and solved most of the compatibility issues that arose. Next steps include solving the rest of the issues and porting my SBML code over too.

Until next week!


Phase 2!

And we’re now in the second phase!

I passed my first evaluation with helpful feedback from my mentors, so I’ll be continuing my project. This week, aside from a few small tweaks to version specifications and model hierarchy, I updated the SBOL export function to handle mapTos between different references to the same molecule in different components.

I installed iBioSim to convert my test SBOL document into SBML and get a sense of what the exported SBML structure should look like. Due to unforeseen circular dependencies, building iBioSim from source required manual installation of several jar files and a few tweaks to the source code, but I eventually managed to run it successfully and convert my SBOL model.

The big project of the week was implementing the meat of my SBML export functionality, which has posed an interesting challenge. Partly due to my expectation that the SBML API would correspond syntactically to that of SBOL, I was thrown off a few times by aspects that differed. For example, SBML divides its API into a core and several extension packages. One that I’m applying to my project, comp, uses two plugin classes that are instantiated as objects that must be added as extensions to the core API document and model objects. These two packages integrated syntactically in ways I didn’t expect.

An interesting concept I learned from working with SBML is that of the port, ReplacedBy, and ReplacedElement objects. They are analogous to mapTos in SBOL, and the port serves as a marker for the component of interest that the Replace elements can then reference. It’s a different implementation of a similar concept, and it was neat to see how both compared.

Next week, I plan on polishing up my SBML export code and start thinking about importing an SBOL model. Till then!

SBOL/SBML Exporting Fun

Hi again!

My mentors and I spent a productive meeting last week discussing how I would go about extending the SBOL export functionality. We realized that the original code was designed for SBOL version 1, and now that libSBOLj 2.0 exists, so much more information from the Biocompiler model can be captured in a SBOL document. I spent a good chunk of this week rewriting the code, and now I have distinction between separate devices and device DNA. I also capture the molecules, inputs, and outputs of the Biocompiler model with additional component definitions instantiated as functional components of top-level module definitions. I validated my unit test once again with SBOL Validator to ensure that I comply with best practices.

In preparation for implementing SBML export, I read through a few papers Chris and Harold sent me regarding interconversion between SBOL and SBML and the ATGC directive, a tool used by IBW. I actually think the SBOL -> SBML paper, “Generating Systems Biology Markup Language Models from the Synthetic Biology Open Language”, has some very informative pseudocode that could probably inform the way I implement IBL -> SBML conversion. I’ve written the code for about a third of my intended SBML export functionality, and I hope to lock down the rest of my design and implement and validate it by next week.

Finally, the topic I talk about every week… I’ve managed to isolate my development environment’s bug down to a single issue – the RBS calculator. Its file path is incorrect, but unfortunately the problem is rooted deeply enough that I was hoping to discuss it with my mentor. This will hopefully be done at our next meeting and I can spend next week integrating my code with the actual IBW source code.

Until next time,


Back to Work!

Hi all!

This post marks a week after I began work on my GSoC project full-time. I took my last final exam on the 13th, and I spent all of the 14th flying back home. But I managed to spend some quality time working on IBW after that, and I highlight some of my progress below.

I finished porting IBW to libSBOLj 2.0, and I constructed an additional unit test to verify my code. I wrote code to handle import of DNA sequences from external SBOL models and updated my old code to conform to best-practice guidelines. I also ran several test cases in SBOL Designer to verify my constructions visually.

There’s still a lot more I’m planning to do with extending SBOL functionalities in IBW, though. Currently the SBOL conversion loses a lot of the original model’s information, including rules, parameters, input/output molecules, and components that are not nucleic acids. The conversion also does not distinguish between distinct devices and parts in each cell. I’m hoping to extend the export functionality to capture all this information in the SBOL model over the next few weeks and create a corresponding import feature that can read in this information from a compatible SBOL document.

I’ve also begun structuring out another feature I want to implement – export of the Biocompiler model to SBML code. Like I mentioned in my proposal, SBML has an additional functional dimension that can more accurately capture the Infobiotics Language rules and parameters.

My biggest challenge this week, however, has once again been with setting up the IBW source code in Eclipse. I figured out that most of my errors stemmed from using a later version of Eclipse than the one that the installation guide uses, and after reinstalling the requisite dependencies on an older version of Eclipse, I managed to launch IBW. But I’m still getting quite a few NullPointerExceptions when I navigate to different panels and attempt to compile IBL code. Hopefully I’ll resolve this issue by my next meeting with my mentors.

And that about sums up my week! I’ll see you guys again next week.