Hi,

I have made pretty good changes in the validation of an SBML task. If you refer my  blog post which I have written earlier, clicking on the validation button displays the errors in an unembellished way if there are any errors in the selected file. There was no user friendly message if the selected file has no errors in it. So my main task was to make the UI look good as well as to display user friendly error messages.

So, I have implemented the SBMLError class to validate the selected sbml file. That was a very easy task. But I had some problems while displaying them in the output pane of the validation dialog box. Earlier, I implemented textArea which has a setText and append functions on it. So, it was very  simple to display the errors using the textArea. But the problem arose when I got to know that textArea doesn’t have support for styling the font with colors and I found that textPane has an awesome support which enables us to style the text in it.

When I was ready to implement the textPane, I found that there was no append function on textPane. Hence I wrote a separate append function to display the data in the textPane. Refer append function in ValidatePanel.java

The following screen shots depicts the working of validation of sbml file.

1st screen- On clicking validate button

Figure 1: Clicking on Validate button on the main panel displays this dialog.

2nd screen -Choosing a sbml file-without errors

Figure 2: Choosing a valid SBML file from the directory. Here, the BIOMD0000000001.xml doesn’t have any errors.

3rd screen-output

Figure 3: Displays the output in the output pane.

4th screen- choosing a file with errors

Figure 4: Choosing a file with errors. Here, I have removed some three lines in the algebraicrules.xml which makes the file an invalid sbml file.

5th screen- errors shown on the pane

Figure 5: Displays all the errors with the severity level, line number and the error message.

6th screen-extension of 5th

Figure 6: Extension of the figure 5.

 

Note: The sbml files are taken from http://www.ebi.ac.uk/biomodels-main/BIOMD0000000001

and      http://svn.bigcat.unimaas.nl/pvplugins/SBML/trunk/testdata/level-2/algebraicrules.xml

I have completed this task in the last week. I am very sorry for posting it so late.

Cheers,

Sri Harsha.P

 

Hi,

I have been working on this task during this week. The task was to just to display the important nodes of the sbml document tree. Previously, when an sbml document is imported, all the nodes like list of compartments, XML tokens, annotations,list of parameters,list of species and list of reactions are shown. Refer: previous post

The important nodes to be shown in the side pane are the Model Name, Reactions, Compartments and Species. I thought it was a piece of cake but it was not. Because, earlier I simply passed the imported document to a JTree and  added a JScrollpane which made the entire nodes to appear without any customization.Refer: earlier commit

Now to accomplish the task, I tried many workarounds on the JTree but was unsuccessful. Then I wrote a separate java file called NavigationTree.java in which I used DefaultTreeModel and the DefaultMutableTreeNode to retrieve the list of contents[compartments, reactions and species] of the imported document and  added them to the TreeModel. Refer: NavigationTree.java and DocumentPanel.java

Now when an sbml model is imported the elements in the side panel look like the following:

customizedelementstree

Note: The sbml file is taken from http://www.ebi.ac.uk/biomodels-main/BIOMD0000000005

Cheers,

Sri Harsha.P

Hello,

Until the third week of the coding period, I managed to complete all the three tasks in which the validation of the imported sbml file is done partially. Right now, the preliminary validation is completed. If we recall from the previous post regarding the validation, I was showing the results of the validation in the console of eclipse. Now, the output is shown on the gui in the output pane as below.

prelimnaryvalidation

The outputs shows you the error with all the details such as the missing element in the model, line and column number and the species details. Right now it is a mere error message.

There are several other plans to beautify this validation task by adding more features to it in the later period.

Cheers,

Sri Harsha.P

The third task is adding a side tab to view the elements of the SBML model. This helps us to view all the elements of the imported sbml file in the form of a tree.

This task involves the addition of the side tab pane named SBML and adding the functionality to show the elements under the side tab pane of currently imported sbml file.

Refer: DocumentPanel.java and SBMLPlugin.java

The following images depicts the functionality:

view1

sbmltabview

elementssbml

Note: The sbml file is taken http://www.ebi.ac.uk/biomodels-main/BIOMD0000000002

Cheers,

Sri Harsha.P

The second week of coding period is completed and I have successfully completed two tasks in this week.

The task for the second week is Validation of the SBML file:

In simple words, successful completion of this task helps us to validate an imported sbml file and gives us the information such as warnings and errors occurred in that particular sbml file. This validation gives us a detailed analysis as to which particular elements in the model are not diagrammed according to the sbml standard.

The task involves adding an Validate button to the main pane of the PathVisio editor. When ever the validate button is pressed, a validate dialog box containing button pane [open and validate file buttons] and output pane is opened. The open button is equipped with the file chooser action, hence when the open button is pressed the file chooser event is invoked which allows us to select the sbml file. Here the file chooser is written such that it even filters the files which can be chosen (here .sbml and .xml ).

The status bar in the dialog box shows which file is chosen. When the “validate the file” button is clicked ,the validate method is invoked and  the output is showed. Currently the output is shown in the console of the eclipse, but it should be shown in the output pane of the dialog box. Refer: ValidatePanel.java

The following figures depicts the functionality:

validation

validateclick selected file outputonconsole

Note: The sbml file is taken from http://www.ebi.ac.uk/biomodels-main/BIOMD0000000002

The next blog post depicts the third task.

 

Cheers,

Sri Harsha.P