R or Python for Bioinformatics?
divingintogeneticsandgenomics.com
divingintogeneticsandgenomics.com
What are the R packages and what is available in Python? Are the Python or R packages just calling a C library after all, then does memory or single threading matter?
What about Julia, can you better express your thoughts and equations in Julia and that’s most important for your project?
Do you want to work in notebooks or build ‘production’ code?
Do you need to put your work on the web?
For Example: One of the most common technical concern points to bring to a new engineer is the Global Interpreter Lock (GIL) that restricts Python to execute in one thread only.
Research on PL design is alive and well in 2024, and Python is nowhere near the cutting edge. I never said it didn't get the job done, or that people shouldn't learn or use it.
It's just not as elegant or simple of a PL design as people sometimes seem to think it is. It's hard to look at something like Clojure or Haskell next to Python and to come to the conclusion that python is particularly elegant.
I think my main point got lost on people who took offense to my dislike for python: my main point is that you should also learn languages that are very different / that are in an altogether different branch.
Stroustrup was spot on about two types of programming languages.
Parent: yeah, but R and python are shit tools; learn how to use better tools too.
You: are you paid to learn how to use better tools, or are you paid to solve problems with shit tools?
You: If these tools are not ideal, what is a better tool?
Parent: I won't tell you. I just simply criticize online and provide no technical guidance, instead I gatekeep my definition of quality tooling. I think being a good senior expert does not include showing best practices I have developed through my years of experience.
You: Oh. Then I don't want to listen to you because I'm more interested in making personal progress on my professional journey than listening to uninitiated opinions provided without context.
I am sure there's the word rust in there somewhere ;-) After all, HN has been raving about polars.
I don't know about that. There's certainly no "perfect" language, but to claim that python is brilliant or elegant language design is to not know a whole log about PL design.
I think I'm mainly getting downvoted because Python is popular, and people think that means it must be inherently good.
Things like security and TLS support are afterthoughts.
If you're planning on scaling up, or working with confidential data then get as much of your pipeline into Python as possible.
The coupling of the undeclared environment and the code that runs is even then in Python.
The versioned cran is no longer available.
For this reason alone, use something that understands and takes this seriously.
No regard is given (by default) to install specific versions of a package. They just install the latest. So your build from 2 years ago will almost certainly be different, sometimes in important ways, from your build today, even if you used the same packages.
This says nothing as to R's suitability to help maintain bio-scientist's accuracy through the process. Often times they will just dump data to R data files, which are opaque to version control and difficult to read outside of the R environment, because the data files often contain references to types defined in packages, thus to decode the data you have to have the correct R packages installed. This makes reading it in an external environment infeasible.
R has many useful packages that just exist and work. But the verification and versioning, and reproducible system, is to me, makes it something to acutely avoid.
Have you ever checked out `renv`? It should work quite well with Bioconductor.
(Dumping data into binaries is… unfortunate, but this sounds more like a training issue than anything else.)
- R packages are much more likely to include compilation of C libraries, which can cause grief if you're not experienced enough to install specific libs that might be newer than eg what apt provides
- library(package) imports the full package into the global namespace (from package import *) which is fine for small projects but scales poorly
Anaconda largely handles the first problem if you can constrain you package use to its ecosystem though.
For my anecdata the worst R package wasn't any worse than a python package that needed gdal, but I had to deal with these problems easily 5 times more often
https://cran.r-project.org/web//packages//reticulate/index.h...
Tldr: R for classical stats, python for machine learning
> Python and R both have their own pros and cons. If you can, learn both and use one that is suitable for the task at hand.