What'S Easy Framework For Writing Gui Tools In Bioinformatics
3
1
Entering edit mode
10.5 years ago
Chen Sun ★ 1.1k

I have tried QT/C++ for writing a multi-platform visualizaition tools in last project, but QT/C++ is not what they said "write once, run everywhere", as it is really a nightmare for deploying Qt application in Linux and Mac.

Is there any better framework for writing visualization tools(multi-platform will be a better choice), and what kind of framework do most visualization tools use?

visualization • 4.5k views
ADD COMMENT
10
Entering edit mode
10.5 years ago

I have been using jQuery and d3.js for web-based UI and web service development. The web seems like a decent way to do cross-platform work, in my opinion. Mostly because other APIs that claim to be cross-platform are really just written either for Windows or Linux, with OS X support that seems like an afterthought (at least from looking at the quality of the widgets). The build and distribution process with C++/Java/Tk apps can be a lot more work.

In addition to easy deployment, with enough effort, web tools can also be beautiful and functional, looking and behaving mostly the same across web-standard browsers like Safari and Chrome. Note here that IE and to a lesser extent Firefox/Mozilla are off in their own worlds where it comes to web standards, though Firefox/Mozilla less so than IE. So account for your audience — if you need to support a lot of government or pharma-corp clients forced to use Microsoft then adjust expectations accordingly.

But the best answer, if there is one, will depend largely on what kinds of tools you are making and how much work you are able to put in. The d3.js platform is pretty barebones — you get SVG primitives, but it's up to you to set them up to make larger widgets and manage events, for the most part. More established frameworks do a lot of this heavy lifting, so that you don't have to. Also, APIs that are native to a platform will usually make apps that run faster than web apps, unless the computation is server-side.

ADD COMMENT
1
Entering edit mode

+1 Javascript is a great way to go for visualizations. D3.js in particular. I wrote a tool for visualizing domain structure a while back: http://www.nextgenetics.net/tools/anno_view/annotator.html

ADD REPLY
0
Entering edit mode

+1 " if there is one, will depend largely on what kinds of tools you are making and how much work you are able to put in"

ADD REPLY
0
Entering edit mode

Yep, +1.

But then again, it depends on what you want to visualise.

ADD REPLY
3
Entering edit mode
10.5 years ago
lh3 33k

I like Javascript+HTML5 a lot and highly recommend the technology where it fits. However, javascript is limited on local file I/O. The security layer imposed by the browser (e.g. cross-domain ajax and accessing local files) and the incompatibility between browsers are frustrating when you have to deal with them. The traditional C++/Java applications are still irreplaceable in some areas.

Most cross-platform GUI tools are written in Java. However, personally I would not use Java simply because I am unhappy with slight delays. In the C/C++ world, I recommend two solutions. If all you need is a canvas, openGL could be a good choice. My colleague developed maqview using openGL. It is by far the most responsive alignment viewer I have used. OpenGL does not implement widgets (i.e. buttons, input boxes, scroll bars etc.). If you need to implement a complex dialog, I would recommend FLTK. FLTK is a very small cross-platform library, in no way comparable to Qt or even wxWidget, but it has most basic and right elements you need. Because it is very small, you can afford to statically link your program to the library. You don't need users to install the library first. This to me is a huge win. An example is fltreebest. It was compiled 6 years ago and still runs on the latest mac/linux without requiring users to install any 3rd-party libraries. FLTK is rarely seen in bioinformatic applications, though.

ADD COMMENT
1
Entering edit mode

I agree with the IO limitations. Having no streaming options or file write options greatly handicaps the application. However, there is something to be said about the accessibility javascript/html offers. Being able to just tell the user to go to an address or download a browser is pretty great.

Javascript/HTML is well suited for non-data intensive operations like visualizing features, graphs, and such. However, I do think there might be some case for visualizing large amounts of data in the future as browser technology gets better. It's also about how efficient you get your data structures to be. I wrote a client-side only toy genome browser that displays every gene of human chromosome 1 a few months ago: http://www.nextgenetics.net/tools/browser/browser.html

ADD REPLY
0
Entering edit mode

Javascript can be used on large data set. JBrowse is an example. I was also trying to persuade someone to write a high-quality javascript based alignment viewer. That said, I feel necessary to comment on the down side of javascript. There are things you can do much better with the traditional GUI programming. In addition, OP was asking about C++, so I provided a C++ answer.

ADD REPLY
0
Entering edit mode

Doesn't the new HTML5 I/O API make the local file access hindrance obsolete for Javascript? With an HTML5 compatible browser like chrome, you can use the API to grab local files and read them into variables for Javascript to play with. I've found this very helpful!

ADD REPLY
1
Entering edit mode

I know you can read local files with javascript, but it lacks streaming, buffering and other functionality that are available in most other languages. Loading the entire file to RAM is at times the last thing we want to do. In addition, javascript cannot access files not specified by the users (due to the security layer), which also adds complications. That is why I said "javascript is limited on file I/O" - I did not say it cannot read local files.

ADD REPLY
0
Entering edit mode

Unless the application is data heavy, a "lazy-load" approach can load data through smaller web requests. The security model does present some issues — it is easy to pull data out from or via a web service, but not as easy (convenient) to load in from a local file.

ADD REPLY
2
Entering edit mode
10.5 years ago
Ido Tamir 5.2k

I don't know what most "visualization tools" use, but many use java. Its easy to write, cross platform, highly performant and you have a vast supply of third party libraries from machine learning to bio-file-format parsing. Deployment with webstart is also easy, although for some periods OSX refused webstart.

Examples: IGV, IGB many other java based web browsers, SeqMiner, Weka, Jalview, Bioclipse, Cytoscape

ADD COMMENT

Login before adding your answer.

Traffic: 3285 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6