Thoughts on other programming languages

With respect to their potential for bioinformatics web applications:

Feature Python Ruby
Modern, clean syntax, object-oriented Yes Yes
Web framework Django (and others) Rails (and others)
Bio library BioPython BioRuby
Extensive Bio graphics library Not really – any more than this? Kind of – Bio::Graphics
Use with App Engine Yes Not yet
Well-regarded by scientific programmers Yes M. Wood, J. Badger, ??

To the novice, it looks like “much of a muchness”. Thoughts?

16 thoughts on “Thoughts on other programming languages

  1. In the end both Ruby and Python are viable. Ruby is a younger language, esp in the life science community, but Rails is more mature than Django (although still young). In the end it depends on personal preference. Definitely in the world I live in these days, Ruby seems to have much more penetration, but if I worked at Google, it would be the opposite.

  2. Paulo – I’m thinking of BioPerl’s Bio::Graphics, which is by far the most extensive Bio graphics library, so far as I can see.

  3. I’ve been digging into python because I was recommended to do so. I was a bit reluctant to use it because I couldn’t make quick web-ready scripts like I can with php. After getting into the grooves and looking at django for a while, I can see why it’s so popular.

  4. I tend to use Perl / BioPerl for everything, but my colleague tends to use Python and I am now evnvious due to the MatPlotLib library he can use!

    He rapidly codes cool, interactive diagrams and graphs. There is no equivalent in Perl or Ruby that I am aware of.

  5. I’m just too happy with Python to investigate Ruby thoroughly, although I did play with Rails a while back.

    It’s worth noting that the Python web framework world doesn’t end with Django … although it does seem to be the most popular and probably has more ‘real’ [high-ish traffic] sites in production. Turbogears is still clicking along nicely and has always seemed more intuitive to me, although I’ve no idea if the average Turbogears app would scale like a Twitter (ie badly). While I haven’t tried it yet, Pylons also looks interesting if you want to mix-n-match basic components (templating engines, SQLObject vs. SQLAlchemy, choose your favorite js AJAX library). That said, sometimes it’s nice to just have these choices made for you by default (which both Django and Turbogears do).

  6. I have a separate question (which might make for a good post). As someone with little programming experience and looking to get into bioinformatics, would you recommend learning Perl, Python, Ruby or something else? I guess the intentioin of learning one (or more) would be able to efficiently use BioPerl, BioRuby or BioPython. Any thoughts?

  7. I haven’t used BioPerl that much Neil, I will check the Bio::Graph package. In fact, I haven’t used BioPython that much either.

  8. Dave – this is always a tricky question, because people tend to answer based on what they like best. All three languages are used widely, all have good Bio libraries, all can be used to achieve wonderful things. Ultimately, I don’t think it matters provided that you can achieve the desired result. So don’t just dabble: design a small, simple project – for example to retrieve some sequences from a database and extract information from them. Figure out how to do that by reading a heap of tutorials and documentation. At some point, you’ll get a feel for which one best suits the way that you think.

    That said: if I were starting out today, rather than 8 years ago, I’d be very tempted by Python. Simply because it encourages clean code and good software design, which I’ve come to see as important aspects.

  9. Dave, while I code mostly in Perl I recommend Python to everyone. And it’s not really about clean code or true objects etc. – Python as far as I know has a largest number of scientific libraries available (for different fields, not only biology). BioPerl may have the biggest number of bio-oriented modules, but that’s not where biology/bioinformatics ends.

  10. @nsaunders,paulo:

    Being the one that created the ruby Bio::Graphics library, I might explain a bit. Basically, it’s an attempt to copy as much of the functionality as possible from Lincoln’s perl version: to visualize features on a chromosome.

    Charles Comstock (dgtized) has helped out a lot in creating Bio::Graphics as it is now.

    Of course, it’s not advanced as the perl version. One of the important things still missing is that only features with a start and stop can be drawn. No GC-content yet. No basepair view yet. No density of any kind.
    The trouble is that we just don’t have enough time to work on it. I myself don’t have to use it anymore, so development is low at the moment.

    However: it’s on github ( which means it’s easy to help developing it. Just fork and play around. Any help would be very much appreciated.

  11. Jan – thanks for the info. I don’t really know ruby/bioruby (yet), but I found your posts and other info about bio::graphics and was very impressed with the effort. Let’s hope others can contribute.

  12. Take a look at clojure – Its a meticulously engineered lisp running on top of a JVM (cudos to the architect – Rich Hickey). All the good features of a functional programming language, lisp (read macros), immutable data structures, with HotSpot JIT acceleration, so best of both worlds – elegance and performance. :-) I feel clojure will have a fair bit of a learning curve, but it should be well worth the effort.

Comments are closed.