r/bioinformatics • u/WunderWombat • 3d ago
technical question Where do you write code?
Wet lab scientist trying to pick up more computational skills here. I'm wondering whether most people do their coding just on their host machine or using an isolated environment like a VM or container. I'm currently weighing the convenience of using my host machine with editors like VSCode and R Studio versus the improved security of coding in something like a VM, where I'd probably have to work in a more lightweight editor. Or perhaps there are options that give the benefits of both, like using VSCode with the dev container extension?
With all the different packages that might need to be installed for this type of work, do people in the computational biology space worry about supply chain attack risks? They seem to be increasingly common, although I guess they're more of an issue for general web developers.
Any insight is appreciated!
32
u/1337HxC PhD | Academia 3d ago edited 3d ago
If you're at a university, big compute is going to be run on any of:
Which are all going to be managed by your IT to varying degrees. Often times this means you develop code either locally on a laptop or "locally" on a smaller server with a GUI, then you scale it up and run it on an HPC or in a cloud environment.
24
u/papadjeef 3d ago
You should definitely write the code on your workstation. Either a laptop or a lab computer or something like that. And then, the first thing you do is check it into a source code repository like GitHub. Then you check it out from there on any servers or virtual machines that you're running it on.
6
u/trannus_aran 3d ago
Especially when learning or testing something, I just do it all on my own machine
11
u/IcedTeaBagMeDaddy 3d ago
Connect to our compute server by ssh with VScode and use Jupyter notebooks. Otherwise Claude code on our server. Everything stored there
4
u/AgitatedTumbleweed65 3d ago
wsl + vscode is all you need, the convenience of linux on your windows(I presume) machine. Windows is also mounted, so you can access data and even apps (explorer, subprocess via PowerShell , etc).
3
u/Planckarte 3d ago
Well for code I just use my laptop or if I’m going to do some light testing I use docker containers or a VM (pixi envs are useful too). But testing and running is usually done on the HPC cluster
3
u/Flyguy86420 3d ago
Always a virtual environment, I like docker to run the webapp, almost every thing is a web app, as the interface
3
u/redditrasberry 3d ago
It depends a lot what scale you work at and what the sensitivity of your data is. Low scale, non-sensitive data, work on your local computer has advantages.
Anything beyond that, there is a lot of advantage to developing a skill set that is agnostic to compute location. This usually veers towards learning a combination of terminal UI and command line options, combined with remote friendly tools such as JupyterLab and vs-code style options that can integrate remote and local.
JupyterLab vs RStudio is quite personal preference, RStudio is obviously better for R but JupyterLab is so easy to install everywhere and is much more language neutral. You will be able to get a kernel for just about any language that is thrust at you, and the AI tools as well as vs-code understand it natively. So I recommend at least knowing JupyterLab since it's more universal and portable.
As others have said, adopting a forward looking strategy is important : bluntly, you will not be writing code. AI tools will be writing it. You will be reviewing it, testing it, tweaking it, iterating with the AI tool to refine it and explore the domain. Occasionally you will be handing entire problems to the AI tools to solve on their own. You should optimise for the interface that positions you well for this future.
5
u/PresentWrongdoer4221 3d ago
You connect your ide to your server. Depending on the language, you make an env for your code, where you keep the packages required. When done you usually dockerise it.
2
u/p10ttwist PhD | Academia 3d ago edited 3d ago
The location scales based on the application:
I don't reach for a VM or container unless I need one to run a complex pipeline, or when I am releasing my own. I do always use virtual environments though, so it's easy to set up a container when the time comes. For me using a container is primarily for reproducibility rather than security concerns. We'll see if that changes in the next couple years...
Edit: if your IT department allows it, putting a remote control Claude code agent in a tmux shell on a server is galaxy brain levels of productivity. Just make sure it knows how to follow your org's rules
4
u/Ill_Friendship3057 3d ago
If you are learning bioinformatics, I think the best option is writing R in RStudio. I used to write code in Python and even Java but all of those were given up for just R. Essentially all the major packages and techniques that get published are accessible through it, and many of the e.g. deep sequencing and proteomics workflows run in it.
1
u/Express-Advice-3790 3d ago
I run Jupyter Notebook on my own machine.
1
u/biohack-dev 2d ago
Eu uso WSL, RStudio, Python no Spyder porque plota graficos. Para bioinformática, raramente uso o VSCode, porque o objetivo não é escrever código para desenvolvimento de software, como se faz na programação, e sim construir um pipeline de dados. Voce pode usar o Jupyter se estiver fazendo anlises em Python. Mas em geral, no meu entendimento, sendo Bioinformata profissional, as ferramentas envolvem Linux/WSL, linha de comando, frameworks avancados, conteinerizacao e computação em nuvem. :)
1
u/Salt-Syllabub9030 3d ago
Try Zasper. It’s lightweight and fast IDE for Jupyter notebooks.
-2
u/simulated-buggy 3d ago
well nowadays it's kindaa handy to respawn a VM on cloud, you can summon a swarm of agents to let them work 24/7 with temporarily task specific containers or by setting up role separation configs across VM