R and Python. For Python, the machine learning library I often use is Scikit-Learn. For machine learning in R, there are a whole bunch - it depends on what you want to do.
EDIT: I meant to add a listing of R machine learning packages from CRAN, which you can find here.
Another benefit of Python is the NumPy/SciPy libraries. Those can be linked to BLAS/MKL and should perform at C/Fortran speeds. They will also implicitly use threads for parallelism in any vector/matrix operation. Pretty shweet.
I wouldn't necessarily recommend using scikit-learn for batch normalization in RNAseq analysis. You should use one of the more sophisticated normalization tools like DESeq2 (which is in R).
I have never personally worked on analyzing RNA-seq data, so I'm probably not the best person to answer this. From what I understand, there are R packages to handle batch effect normalization (maybe you already knew that). If you want to use Python, I'm going to guess that Scikit-learn is not the best way to go (here's what they have regarding "Dataset transformations") and that using a statistics-based package like Statsmodels or looking for Python implementations from papers are better options.
Regardless of how much I hate R and love Python. I would recommend you learn these three with this order:
R
Bash (will make it easy to learn perl in the future)
Python
Other languages.
It also depends on what tools your lab(or future one) is using so might as well ask them. This last paragraph might not be relevant to you but might be to other readers).
I'd recommend getting familiar with Python, R, most Unix shell utilities like sed, awk, grep, head, tail, sort, and cut, and the bash shell itself. Awk is powerful, in spite of its rather unique syntax. Perl might come handy occasionally. If you're involved with your local compbio lab or you're interested in working in another one, ask around and find out what most people use there. Usually the languages and tools you'll end up using depend on which lab you'll join.
“C/C++” is not a thing. Modern C and C++ are vastly different languages with merely superficial similarities.
If you refer to them as C/C++ then chances are that you didn’t learn either very well. I’m not blaming you — most teaching material (especially for C++) is terribly outdated or just plain bad. This is a shame because, properly applied, modern C++ is the best language to write bioinformatics tools in.
That said, C++ is badly suited for everyday use. Use either R or Python (but learn a bit of both) for your analysis and don’t be afraid of shell scripts and Makefiles to combine your analysis into a reproducible pipeline.
Well I would only partially agree. While I am not an expert on the topic, to a large extent C is just a subset of C++ regarding basic functionality/standard library. I literally changed a C program to C++ by editing the file endings (and having the compiler settings be changed automatically). Now I have integrated lots of C++ features (learning the C++ ways of doing things), but I am relatively sure that I could start writing another program in C without having much difficulties.
I invite you to follow the link in my original comment (and to follow up those links as well) to read a more thorough discussion of the topic.
Briefly, while C and C++ have some similarities, well-written C code and well-written C++ code will generally be very distinct, and follow different paradigms. You can sometimes change C code trivially into C++ code but the result will never be good C++ code. Virtually all C++ experts (certainly everybody who is working on the C++ standard, compilers and standard libraries) would agree with this assessment.
This argument always comes down to what you mean by "the same language" and is therefore not very fruitful. At the very least, it seems clear that being good at C will not give you any particular insight into writing good C++, or the reverse, so I suppose in that sense they're dissimilar languages that shouldn't be grouped together. That said, people do write in C/C++ - that is, write code that uses language features from C and C++, in the same code - so it's definitely a thing. It may not be a very good thing (or it may be a great thing, where you solve problems elegantly and correctly using the features of those languages best suited to a clear statement of the answer.)
I remember us having this discussion before without reaching a agreement so I won’t try again. Suffice to say that the set of good C code and the set of good C++ code are disjoint sets.
people do write in C/C++ - that is, write code that uses language features from C and C++, in the same code
Yes, but virtually every expert of either C or C++ would agree that the result is not good code by any sensible standard of code quality. Talking about C/C++ is symptomatic of talking about bad code. In fact, pick a question — any question — on Stack Overflow that mentions “C/C++” and I can guarantee you that the person asking the question is either a misguided beginner or a bad programmer.
Good advice here, if somewhat pedantic. My recommendation would be slightly different. Maybe it makes sense to focus on a specific problem and learn what you need for that. It sounds like you already have an interest. You might consider finding a lab that does something close to what you are interested, and find a way to help them out. No lab like that in the neighborhood? Then find an open source project near to your interests and make a contribution. Fix a bug, or add a feature.
If you start by working on a problem that other people care about, you don't have to worry about the best answer to a highly generic question. What language to learn? The language that your lab uses, or the tool that you are helping out with. I think that if you frame it in terms of how you can help someone with a current problem in a way that addresses your own interests, you'll find a lot more doors opening up for you, and a lot of the mechanical questions go away.
Thank you very much for all the response! Is C/C++ not a good choice for the computational biology and machine learning? My main strength is in those languages but I did not see a lot of libraries based on them.
C/C++ is great for code that has to be fast and for which you want great control over memory/cpu. Most people coding for biology applications care much less about wringing as much efficiency out of their computer than actually solving the problem they're working on.
If you go into molecular modelling, you'll find a lot of C, or if you're in a lab in the computer science department. If you're in a lab that's in a biology based department, you tend to find languages that are more high-level; Python, Java, etc.
R is very common in bioinformatics, mainly with the people who are doing data analysis. People who are developing algorithms tend to work more in python. Python is the new perl... as perl is slowly becoming less relevant. Whereas in the 90's perl probably made up 70-80% of new bioinformatics code being developed, I'd guess you'd probably find it's closer to 15-20% now. Not sure what fraction of new bioinformatics code is R or Python, though... maybe we could mine github for that.
Personally, I've always avoided R since it's brutally inefficient as a language, but its massive library of tools makes it useful for people who want to do bioinformatics without writing any of their own code.
Python hits most of the sweet spots for me: It's fast to develop, very readable for new people to pick up your code and understand it, and reasonably efficient. It's also VERY good for interacting with JSON, which is starting to dominate in big data (eg. interfacing with mongodb).
However, All of that goes out the window if you end up in a lab that only uses one language. Being the only person developing in a single language in a larger lab is really a bad idea.... I've done it a few times and it rarely works out well.
Dear apfejes, Thank you very much for the detailed advice! If I am going to formulate ML algorithms (i.e. an algorithm that constructs the probabilistic graph of protein-gene interaction), do I need to pick Python first? Which language makes it easier to develop my own library of statistical testing? My project involves a lot of mathematics too which must be incorporated to the algorithms and testing..
If you refer to it as C/C++ you might not be up to date. Modern C++ (C++11/14) is a very different beast. If you think C++ is C with classes, or find yourself calling "new", it's a good time to catch up.
you already know a high performance language, so you don't need the performance of Java
Python can do the vast majority what R can do, but there are vast areas of things Python can do that R can't (at least, not well). The only exception is if you want to go really hard core into stats.
Python is a very useful skill outside of computational biology or even any kind of ML / Data science discipline. It's just a "good language to know".
21
u/wired-in Jan 27 '16 edited Jan 27 '16
R and Python. For Python, the machine learning library I often use is Scikit-Learn. For machine learning in R, there are a whole bunch - it depends on what you want to do.
EDIT: I meant to add a listing of R machine learning packages from CRAN, which you can find here.
6
u/[deleted] Jan 27 '16
Regardless of how much I hate R and love Python. I would recommend you learn these three with this order:
R
Bash (will make it easy to learn perl in the future)
Python
Other languages.
It also depends on what tools your lab(or future one) is using so might as well ask them. This last paragraph might not be relevant to you but might be to other readers).
3
u/baconschmacon Jan 27 '16
I'd recommend getting familiar with Python, R, most Unix shell utilities like sed, awk, grep, head, tail, sort, and cut, and the bash shell itself. Awk is powerful, in spite of its rather unique syntax. Perl might come handy occasionally. If you're involved with your local compbio lab or you're interested in working in another one, ask around and find out what most people use there. Usually the languages and tools you'll end up using depend on which lab you'll join.
3
u/guepier PhD | Industry Jan 27 '16 edited Jan 27 '16
“C/C++” is not a thing. Modern C and C++ are vastly different languages with merely superficial similarities.
If you refer to them as C/C++ then chances are that you didn’t learn either very well. I’m not blaming you — most teaching material (especially for C++) is terribly outdated or just plain bad. This is a shame because, properly applied, modern C++ is the best language to write bioinformatics tools in.
That said, C++ is badly suited for everyday use. Use either R or Python (but learn a bit of both) for your analysis and don’t be afraid of shell scripts and Makefiles to combine your analysis into a reproducible pipeline.
2
u/[deleted] Jan 27 '16
Good advice here, if somewhat pedantic. My recommendation would be slightly different. Maybe it makes sense to focus on a specific problem and learn what you need for that. It sounds like you already have an interest. You might consider finding a lab that does something close to what you are interested, and find a way to help them out. No lab like that in the neighborhood? Then find an open source project near to your interests and make a contribution. Fix a bug, or add a feature.
If you start by working on a problem that other people care about, you don't have to worry about the best answer to a highly generic question. What language to learn? The language that your lab uses, or the tool that you are helping out with. I think that if you frame it in terms of how you can help someone with a current problem in a way that addresses your own interests, you'll find a lot more doors opening up for you, and a lot of the mechanical questions go away.
4
u/rincevent Jan 27 '16
R and Python - definetely - Julia is trending atm
3
u/Darwinmate Jan 27 '16
Echoing what everyone is saying, but also wanted to add in that Perl might be useful and also a good knowledge of Bash/linux.
2
u/[deleted] Jan 27 '16
Thank you very much for all the response! Is C/C++ not a good choice for the computational biology and machine learning? My main strength is in those languages but I did not see a lot of libraries based on them.
Should I learn both R and Python?
1
u/redditrasberry Jan 28 '16
Based on your description I'd say Python:
0
u/[deleted] Jan 27 '16
[deleted] — view deleted comment