
Snakemake workflows are essentially Python scripts extended by declarative code to define rules. And by then, whatever I started running from home will be finished!Īgain, there are many, many, many options for workflow management systems but I like to use Snakemake. Plus, with a window manager like screen, I can log on to the server from home, start a screen session, begin running some stuff, close my computer, bus to work, and then reattach to that session once I’m at work. With a window manager, if your connection dies, your session can still be running and you can just reattach to it when you get your connection back. But, my students will say, you could always just open up 3 separate windows and tile them next to each other… STILL, the advantage of a window manager I see is for when you have a crappy connection. By using a window manager, you can multiplex your window and see how much compute, memory, etc you’re using. There are many options for window managers but I prefer Screen or Tmux. So I recommend my students remove their mouse for a week to force themselves to learn keyboard shortcuts (easier said than done but the recommendation is made). The learning curve can be a bit steep and, depending on your level of discipline, it’s very tempting to just use the mouse. So I try to use the mouse as little as possible by taking advantage of keyboard shortcuts to do everything from clicking on links or executing large chunks of code. When you work on the computer for as many hours as I do, you’ll likely start developing muscle fatigue from large movements such as from the keyboard to the mouse and vice versa. Speaking of keyboard shortcuts, this is necessary when using text editors like Emacs and Vim but can also be extended to your browser with plug-ins like Vimium. Whatever your preference, just find a way to write code in an editor and then execute that code directly with a keyboard shortcut instead of copying and pasting. Using an IDE like RStudio for R and Spyder for Python is a good way to mitigate these issues.

What? Time is wasted in just highlighting code with the mouse, copying and pasting…not to mention the flurry of missed tabs or semicolons from copy-and-paste errors. Then they’ll have a bug in the code, fix it in their interactive session, but then have to remember to copy it back to their text editor. The biggest efficiency killer I’ve noticed from observing my students is how they write code in a text editor and then copy and paste that code to execute it in an interactive session.

Get a text editor that can send commands to the terminal

So here are my 5 must-dos for efficient bioinformatics that I’ve tried to get all my students to adopt. My colleague Kamil was joking about how we need to make bioinformatics sexier and more click-bait-y with those ridiculous buzz-feed-esque headlines like ‘N ways to X your Y’ and ‘M best Ws that will K your J’.
