vote up 3 vote down
star

This is also a very classic question, however, it can be a very useful discussion for novices which are wishing to work in the bioinformatics field, and have to decide how to organize their time. I have seen some surveys on this, for example on bioinformatics.org and on bioinformaticszen, but none of these cases were open discussions.

Which is your favorite programming language in bioinformatics? I actually use very much of Python and R, and hate Perl :-)

flag
which answer should I choose? All of them are good. – giovanni Mar 4 at 15:03

10 Answers

vote up 2 vote down
check

Unix, Perl and MySQL are programming skills that you need to master (I can think of people who would also say Java, Javascript, CSS, etc.). The best way to master the art of programming is to spend as much time as possible reading and writing source code. Some people think Perl is doomed. This is not true in the bioinformatics world. In part due to legacy and in part to the flexibility it provides, Perl is still the language of choice for many biohackers. Perl is used to construct 1) the back end of web applications, 2) pipelines and workflows and 3) quick and dirty scripts for parsing and calling other programs.

You will also need to be familiar with projects like R and Bioconductor, since a lot of the work will involve providing the computational infrastructure for analyzing data. In addition, you’ll need to know about data formats (fasta, sbml, mmcif…), software toolkits and libraries (Paup, Phylip, EMBOSS, BioPerl…), databases (Ensembl, InterPro, PDB, KEGG…), webservers and portals (Pubmed, ISCB).

Finally keep in mind best practices (like refraining from reinventing the wheel), but above all, give yourself the time to enjoy the learning process. Getting to the top usually takes longer than staying at the top; so what’s the point if you haven’t enjoyed the trip?

link|flag
vote up 6 vote down

The choice of a programming language is purely subjective, but when a student asks you which programming language he should start with, you have to make an answer, or at least provide some informations.

I think that a bioinformatician who studies R and at least two or three libraries (lattice/ggplot2, plyr) early can have an advantage, because he will be able to represent his data properly and obtain good results without too much effort. If your supervisor is not a computer scientist, he will be a lot more impressed by plots and charts than by programs, even if they are well written, with unittests etc.

Python is a good programming language to learn as a general purpose tool. Its bigger advantages are its easy to read syntax, and its paradigm 'there is only one way to do it', so the number of language keywords is reduced to the minimum, and two programs with the same function written by different people will be very similar (which is what doesn't happen with perl). The negative points of python are that its CSV files reading/plotting interface is not ready yet (the best is pylab), so you must rely on R to produce nice plots.

Honestly I don't like perl, because I think it can induce to many bad-behaviours in novel programmers. For example, in perl there are many similar constructs to accomplish the same objective: so, it is very difficult to understand a program written by someone else, because you have to known all the possible constructs and hope there are enough comments. It is already very difficult to reproduce a bioinformatician experiment, if you write your code in a difficult language it is a lot worst. Moreover, I know of many people who have been using perl for years, but that don't even use functions, because it looks too complicated. How can it be? It looks very inefficient. The only good point of perl is its repositories, bioperl and CPAN; however, I know of people using perl that don't even know of the existence of these, so I don't understand why they keep going with perl.

Apart from programming language, is it very useful to learn the basic usage of gnu-make, or of a derivate. This program is very useful when you have lot of different scripts, as it allows you to define a pipeline in order to run them. Some basic bash commands may also be very useful if you work with a lot of flat files (head, sed, gawk, grep, ...)

link|flag
vote up 3 vote down

I think the emphasis should be more on the way we optimize our program rather than language which we use. I personally use languages based on the kind of problem I am answering.

This was an interesting paper which I came across some time back although some of the information mentioned in here might sound redundant to some of you but still it's worth a read.

A Quick Guide for Developing Effective Bioinformatics Programming Skills

link|flag
vote up 2 vote down

Perl can be quite lovely if you choose to write it well. If you find yourself in need of writing some perl, I'd highly recommend getting the Perl Best Practices book and going through it to learn how to make your perl code not suck. Essential tools for helping with that are perlcritic and perltidy, both of which I have bound to quick keystrokes in my emacs cperl-mode so as to make sure my code is in reasonably good shape. There's lots of blog articles out there about writing "Modern Perl" or "Enlightened Perl" that help make the language not just bearable but actually quite nice for a certain type of brain.

One thing that Perl does very well that no other language does is quick text processing on the command line. If you want to do some simple processing of a text file (which is pretty standard in this business), perl is a fantastic package to do so. Stringing together a set of UNIX utilities on a Linux system will usually have you running for a half dozen manpages looking for conflicting and unique switches, where with perl I find that there's far less I have to remember to get the same effect. The book Minimal Perl goes in to this sort of thing in detail (perl as a better awk/sed/grep/etc) and I highly recommend having a look. At the very least, I've found that using perl in this fashion filled a hole in my toolkit that I didn't even realize was there. R and Python can, of course, do this sort of thing too, but not nearly so well as Perl.

link|flag
vote up 2 vote down

I have found useful: Perl, MySQL, Unix commands and shell scripts, R, and knowing some web stuff (HTML/php).

It's good to be familiar with a variety of tools, so you can choose the right one for the problem (and not force a tool to do something it's not really designed for, just because you don't know how to do it any other way).

If I was starting out, I might consider something like ruby or python instead of perl, but maybe not. There's a lot of code out there already written in perl.

link|flag
vote up 2 vote down

I find that a healthy knowledge of R & Bioconductor tools has been the most helpful. In my work I also write a large amount of Python code. Beyond those, having a strong Unix background - complete with scripts and tools such as sed & awk have been very valuable. Knowledge of HTML (don't need to be a javascript wiz, just the ability to make basic tables & such) and SQL are also plusses.

link|flag
vote up 2 vote down

Just my two cents and since nobody mentioned yet, I'm using MATLAB. Yes, it's commercial and expensive. It might be behind R/Bioconductor in amount of contributed algorithms (this is why I sometime have to use R as well). But the environment is very friendly for fast development, figures are great, and making GUIs is pretty easy. Many useful for bioinformatician toolboxes, like Statistics, Bioinformatics, Optimization. Someone may find SimBiology cool (although I haven't used it). As others mentioned Perl is still rules for text processing and workflows, although I agree with giovanni on its problems.

link|flag
vote up 1 vote down

It is important to be considerate and not characterize one particular approach negatively. My favorite quote is:

Programming is pure thought.

Hopefully everyone is able to pick an approach that matches their individual way of thinking. While I myself do not program in Perl, I consider it to be one of the most popular and powerful platforms for doing bioinformatics analysis.

link|flag
vote up 1 vote down

Any programming language is good as long you know what you're doing.

link|flag
vote up 1 vote down

I use a combination of things for different purposes, including C, R, Perl and Delphi. For anything to run on windows, whether command-line or with a nice-to-use UI for less technical users, Delphi still rocks.

link|flag

Your Answer

Get an OpenID
or

Not the answer you're looking for? Browse other questions tagged or ask your own question.