Tuesday 12 June 2012

Week 3: June 4 -10 & 11 -12

Week 3 Report:

1. Finished Xref comparison of DataNodes using BidgeDB IDMapperStack. This IDMapperStack is made available to the comparison plugin through SwingEngine.getGdbManager().getCurrentGdb();. The IdMapperStack stacks all the available IDMappers and provides a common handle for Id mappping. The comparison now requires the user to first select a biological database (Data->Select Gene/Metabolite Database), so that the IDMapperStack has got atleast one IDMapper to start with.

2. Yet to finish Line comparison.

3. UI layout for "Results Pane" modified to accommodate DataNode-comparison results and Line-comparison results in their own separate JTables. For ow the results under Line-comparison would be the same as DataNode-comparison results as Line-comparison is still in  progress.

4. The pathway loading and comparing now happen inside a separate background thread using the SwingWorker class. Hence a progress dialog would pop-up during the loading period. Followed the example from SwingEngine.openPathway().

5. Fixed bugs related to highlighting PathwayElements, window re-size events, KeyListener events for the "results" Panel's JTables' rows.

6. Documented most of the source code and refactored code. I will be doing this on a regular basis as mentioned in the previous blog post.

7. Need to discuss:
     a. what would be next after finishing Line comparison.
     b. Is "comparison pop-up window" the way forward or showing pathway comparison inside PathVisio's main panel better ?

Please feel free to put down any comments regarding the plugin or its code.


Below are the screenshots of Pathway-comparison plug-in:

Progress Dialog pops up when "Compare" is clicked


Comparing two different pathways and no match is found. Note: Line Comparison is not yet ready


Comparing the same pathway for lack of two similar pathways. Hence all the DataNodes with Xrefs are highlighted in both the pathways.


Highlighting a match ( PathwayElement i.e DataNode found in both of the pathways) by clicking on a row in the  results. Each row corresponds to a match


regards,
Praveen Kumar

Monday 4 June 2012

Week 2: (May 28 - June 3)

Summary in brief:
introduced Results Pane inside the comparsion pop-up window; learning to use BridgeDB; begun Xref and Line comparison; "load two pathways" issue solved; modified UI layout of the plugin's "Compare" tab; Code Refactor and Documentation


Summary :
This week I started out with creating a panel "Comparison Results" in the comparison pop-up window.
This panel shows the matching entities (similar Datanodes and similar interactions) in the two pathways being compared inside a JTable. Right now, it shows only the matching Datanodes' graphIds as a series of rows under two columns "Pathway1" and "Pathway2".  I will soon change this to show Datanode's label or its xref  instead of GraphId as per the requirement.
The result rows are clickable and clicking on a row highlights the respective matching entities in both the pathways. This is done using the GraphId of the matching entities.

Next, I learnt about the usage of BridgeDB framework, tested out the cases which could be useful in our plugin and got clarifications from the mentors on how I would use BridgeDB IdMappers in our plugin to compare the Datanodes' based on Xrefs. After discussing it with the mentors , it was concluded that optionA below would be better than option B.

option A : Creating an array of DataSources from the Xrefs (since Xref is composed of an Id and DataSource) defined in Pathway#2 and using this DataSource list to translate the Xrefs in Pathway#1 and then compare the translated Xrefs in Pathway#1 with the direct* Xrefs in Pathway#2.
*direct Xref = Xref node found in the pathway (without any mapping/transformation)

option B: Using one DataSource (a common DataSource) and translate the Xrefs in both the pathways to this DataSource and then compare the Xrefs (in Pathway#1 and Pathway#2) based on these translated Xref mapings.

I have started on BridgeDB Xref comparison and I will try to finish it this week. I have also started on line comparison. And I need to figure out a way to compare the lines when there are anchors.

2. With help from Dr. Martijn's, I am now able to load 2 pathways inside the comparison pop-up window. This required custom loading of Pathway and VPathway objects since PathVisio allows for only one usable/active VPathway object at a time.

3. I modified the UI layout for the plugin's "Compare" tab based on  PathVisio's" Search" tab's layout. Here's how it looks now:



4. I also worked on optimizing/refactoring the code so that its robust, clean and well documented from the start. And I think that I should be doing this regularly like setting aside a day or a half in a particular week or doing it soon after a module is finished. This would definitely help in the long run though it could be a little time consuming now.