I am interested in learning more about both genomics and bioinformatics, with emphasis on genomics. I was told after taking an introductory course of genomics that the programming language "R" and "python" are widely used. However having asked about learning genomics before on this fourm, I was suggested alot of books for learning genomics with "Perl". I was also told anecdotally that "perl" is falling "out of favor" and "Python" and "R" are desired.

To give background on my coding skills, I flunked out of computer science due to poor coding skills and poor math skills. I still had an interest in the field and therefore started studying genomics and biology instead. I would categorize my self as a beginner in java and python in terms of skills.

I was also told anecdotally that the best way to learn coding is by having a project. But I feel incompetent in my coding skills to even attempt anything. I tried to learn Python via "Codecademy" and their 13 hour course for python. Having completed it I felt lost enough to make this post, looking for further guidance. I tried to read a bioinformatics book based in Python, but I missed the handholding and directed exercises that Codecademy gave me.

Should one interested in genomics learn the coding language, R or Perl? Also what would be the best ways to learn these for one who does "not excel" in coding?

If this post seems opinion based mods feel free to delete it or move it, I just was not sure how to phrase my concerns adequately.


closed as primarily opinion-based by AliceD, WYSIWYG Jul 8 '15 at 5:15

Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Which language do you prefer? Our lab uses fortran, bash/shell, python, perl, a bit of ruby, R, VBA (excel) etc. I've found python to be the most re-applicable language. These days it has 90% of the functionality of R too. I like discussions on this sort of thing, but it is off topic for the site. Perhaps browse around on the bioinformatics or biology subreddit. $\endgroup$ – James Jul 8 '15 at 1:24
  • 1
    $\begingroup$ Python bioinformatics learning opportunities that might be up your alley: rosalind.info/problems/locations $\endgroup$ – InactionPotential Jul 8 '15 at 1:35
  • $\begingroup$ Matlab! Nothing else ;-) $\endgroup$ – AliceD Jul 8 '15 at 1:44
  • $\begingroup$ @InactionPotential This sounds very cool !! Thanks. $\endgroup$ – Ro Siv Jul 8 '15 at 1:50
  • $\begingroup$ @GoodGravy I figured it was offtopic, but I cant resist the vast amounts of knowledgeable people on this site. To answer your question, I guess I am use to Java, but Python seems very strong and simple. $\endgroup$ – Ro Siv Jul 8 '15 at 1:51

I have found that this chapter by Lincoln Stein is a very easy, accessible, and useful introduction to writing a Perl script: Using Perl to facilitate biological analysis. It is Chapter 18 in "Bioinformatics: A Practical Guide to the Analysis of Genes and Proteins" 3rd edition, by Baxevanis and Ouellette. I use Perl and bash for almost everything, but most of my co-workers prefer Python. I only use R when I need to. One software engineer I know swears by Ruby. As long as your scripting language has lots of useful libraries I don't know if it makes a big difference which one you select.


Comparing some commonly used languages in bioinformatics

I think that indeed Perl is losing users but there are still quite a lot of people using it. Bash (or other shell) is essential. While one can replace Python with C or Java and eventually replace R by Python or Julia, I find Bash to be really necessary. To compare Python to R, Python is much faster. If you are a purist, you'll like Python much more than R. R is a weird language, I use it a lot but you always have to deal with very special kind of objects. The big advantage of R is its community; There are tons and tons of functions. Typically, for any task you you want to do and related to statistics or to phylogenetics, you'll find an already existing package that will do the job for you. C is nice and very popular. It is super fast but it is not super handy for most tasks. Moreover, C doesn't have an interpreter which is always kinda annoying when you're use to high level languages such as R typically. I know nobody who uses Ruby and I don't code in Ruby but it is an important language. Some may use it for bioinformatics and it is very much used in many other disciplines (unlike R, which only statisticians know).

What I personally use

Personally, I use mostly R, Python, C/C++ and Bash. Bash to organize stuff, modify files and manage processes on my machine and on remote machines. R for data analysis. Python when R is too slow (to analyze more data such as sequence data for example) and C/C++ to run individual based simulation. I happen to use some other languages for my work but not as often.

How to learn

Nobody excels at coding to start with. Actually, after my first class of programming I had in mind that programming was not meant for me. Now, I don't excel, I am just a biologist who codes a bit and not a computer scientist but I spend the majority of time coding and I love that. I learn a lot everyday but ever since I started to feel a bit confident, I found that I could do much with this knowledge. You'll probably realize after some time that few people are really good at coding and you can already do much with only a few days of training. Don't be afraid. I think that indeed one of the best way to learn a language is to use it for a project. Here are a bunch of things you could do:

  • Go on Dryad.com, get some data and analyze them. You can redo the analysis they did on the original paper for example. Or, better you could try to discover something by yourself by combining some existing data.

  • individual-based (OOP) simulations in population genetics

    • simulate genetic drift in populations. Try to estimate the probability of a new mutation to fix and the time it takes to get fixed.
    • Simulate the process of selective sweep with defining chromosomes.
    • You'd basically have to have a function that creates a list of objects of type individuals. Each individual has two objects called chromosomes. You have a function that simulate reproduction (without selection, recombination nor mutations to start with). And you need a function to print the statistics you need on a file. I think you could do a simple individual-based simulation in a few days only and then you'd feel more comfortable with the language and you would also have a better grasp on how one can numerically simulate a population through time.
  • $\begingroup$ I particularly like the idea of practicing on real datasets from Dryad. $\endgroup$ – James Jul 8 '15 at 2:18

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