R or Python for Bioinformatics?

submited by
Style Pass
2024-06-07 00:00:09

If you need to pick Python or R for bioinformatics, which one should you choose? This is a decades-old question from many beginners.

I started learning Unix Commands 12 years ago (See an example of how powerful Unix commands can be). I then picked up Python using “Python for absolute beginners”. It was a great book, however…

I did my first print("hello world") and learned the syntax of the language.. It is not that practical in terms of solving practical bioinformatics problems that I had. why?

I had a lot of tables/spreadsheets to analyze during that time, and learning pandas in Python was just not that smooth. Then, I found R..

R is perfect for rectangular tables and has built-in support for dataframes. With the more recent tidyverse, it is so much easier to do complex data wrangling with a few lines of code. ggplot2 made figures are still better than in Python.

Moreover, R has the Bioconductor ecosystem which contains thousands of packages for bioinformatics. You can simply search “xxx data analysis, Bioconductor” and find packages.

Leave a Comment