I have a pathway database in the biopax.owl format. I want to incorporate this pathway in my website (built in web2py) and display as a pathway diagram just like it is in KEGG/Reactome/BioCyc. I also want to give the user options to search/highlight any entity in the diagram. This format is new to me and I am not sure what all I can do with this. Any suggestion will be greatly appreciated
Maybe you did already. But you could start with the paper. Which is very readable. It is here.
The thing is that BioPAX is a format that describes the pathway logic only. It does not have any information about how to visually represent that. No coordinates essentially. So you will need some way to make these up. Now there would basically be two approaches for that (apart from writing your own tool and doing years of work from scratch):
- You could use a tool that expects only that pathway logic and interprets the pathway as a network, keeping the actual layout flexible. Cytoscape can do that, and there are apps for Cytoscape that allow you to import BioPAX. Since there are also apps that map data to network notes and apps that visualize the data that should solve your problem.
- You could use a dedicated pathway analysis tool, like PathVisio. Then you would have to import BioPAX into that and the importer will make up some basic layout for you. You could either use a direct importer or go through Cytoscape. At this moment I am not sure which of those import approaches would work best for PathVisio since both haven't been used for a while. The BioPAX importer plugin is in beta and can be found here. Importers and converters tend to break after a while since tools and formats develop.
I would definitely advise you to use one of these approaches and not write your own tool. Even if that means you might still need to do some coding work to update an importer or to modify an analysis plugin.
Update... After reading @B. Arman Aksoy's answer. That does not yet get it to the web. For PathVisio you can export results to html using the html export plugin. That does only gives you static results though. If you want to allow the user to do dynamic analysis you could use PathVisioRPC to call it from Python and then use the html export plugin through that (that specific plugin is available in through PathVisioRPC).
There are no web-based BioPAX visualizers available right now. Since you specifically asked for this, I will skip installable softwares such as ChiBE, Cytoscape 3.0 and PathVisio, all of which can visualize BioPAX pathways and allow you export static images.
One workaround this problem is to convert the BioPAX model to SBGN, which you can do by Paxtools console application and then visualize it using this *really new* SBGNViz.js library, which is a cytoscape.js extension. If you do that, then you can put together a web2py application and let the user interact with the network via cytoscape.js API.
But be aware that the SBGN visualizer is currently in development and is not that stable for now, but it is a start.
You might also be able to pull this trick by using PathVisio to open your pathway and then export it in a pathvisio.js-compatible format -- so that you get WikiPathways-like visualization on your website. I am not that knowledgable about this approach, though.