Ming Tommy Tang
@tommytang.bsky.social
4.1K followers 1.4K following 7.3K posts
Director of bioinformatics at AstraZeneca. subscribe to my youtube channel @chatomics. On my way to helping 1 million people learn bioinformatics. Educator, Biotech, single cell. Also talks about leadership. tommytang.bio.link
Posts Media Videos Starter Packs
tommytang.bsky.social
Investigating whether deep learning models for co-folding learn the physics of protein-ligand interactions www.nature.com/articles/s4...
tommytang.bsky.social
10/
Key takeaways:
Login shell sets up your login environment

Interactive shell is for live terminal use

Non-login, non-interactive is how jobs run

Always source configs in scripts

Know your shell to debug faster

Learn your shell. Your scripts will thank you.
tommytang.bsky.social
9/
Another tip:
Use env or printenv to check your environment.
Use ps -f to see if you're in a login shell (-bash).
Test before you submit a 3-day job that fails in 2 seconds.
tommytang.bsky.social
8/
Solution:
At the top of your job script, add:
source ~/.bashrc

or
source ~/.bash_profile

Or define everything explicitly in the script.
Never assume the environment is set.
tommytang.bsky.social
7/
Example:
Your .bash_profile loads conda:

source ~/miniconda3/etc/profile.d/conda.sh

But your job crashes with command not found.
Why?
Because your script was run by a non-login shell.
tommytang.bsky.social
6/
Running a job on an HPC cluster?
SLURM calls a non-interactive, non-login shell by default.
Which means:
Your PATH, PYTHONPATH, R_LIBS_USER?
Might not be loaded unless explicitly sourced.
tommytang.bsky.social
5/
.bash_profile is read by login shells
.bashrc is read by interactive non-login shells
If you export paths only in .bashrc,
they may be missing when you login via SSH.
Boom—your pipeline crashes.
tommytang.bsky.social
4/
Why should bioinformaticians care?
Because .bashrc and .bash_profile behave differently.
And your environment might break if you don’t know which is loaded.
tommytang.bsky.social
3/
Can a shell be both login and interactive?
Yes!
If you SSH into a machine and start typing—
That’s both login and interactive.
But not all shells are both.
tommytang.bsky.social
2/
What’s an interactive shell?
A shell that reads and writes directly from a user’s terminal.
You’re typing into it.
You start one by typing:
bash

Or just open a new terminal tab.
tommytang.bsky.social
1/
What’s a login shell?
It’s the shell that starts when you log in via SSH, a virtual console, or a terminal emulator set to launch a login shell.
You'll see it in ps as -bash (the hyphen means login shell).
It sets up your environment.
tommytang.bsky.social
Bioinformatics is more about biology and code.
It's shells and sessions, exports and environments.
Ever been confused by “login shell” vs “interactive shell”?
This thread is for you. 🧵
tommytang.bsky.social
14/
So next time someone asks:
“How long will it take?”
You can smile and say:
“It depends—how much truth are we ready to uncover?”
tommytang.bsky.social
13/
Key takeaways:
“Bioinformatics” isn’t just one step

Routine plots are fast—insight takes time

Depth of analysis depends on the biological question

Interpretation evolves as the science unfolds
tommytang.bsky.social
12/
And all of this?
It can take weeks.
Months.
Sometimes the entire length of a PhD (FOUR YEARS!).
tommytang.bsky.social
11/
Then there’s visual storytelling:
Clear plots.
Accurate legends.
Clarity in PCA, UMAP, violin plots.
You’re not just analyzing. You’re communicating.
tommytang.bsky.social
10/
You start with DESeq2.
Try edgeR.
Maybe limma-voom.
The results overlap, but differences remain.
That’s the art: building confidence across tools.
tommytang.bsky.social
9/
You check for batch effects.
You wonder if a different normalization method changes the conclusion.
Spoiler: it might.
tommytang.bsky.social
8/
The collaborator asks: “Can we validate this in another dataset?”
Now you’re off downloading GEO, harmonizing formats, rerunning pipelines.
tommytang.bsky.social
7/
Then biology calls:
“Look at this gene—we know it's a target of the treatment. What’s it doing?”
Suddenly you're deep-diving into specific genes.
tommytang.bsky.social
6/
You try clustering: maybe k-means or hierarchical.
You group genes with similar expression dynamics.
Each cluster tells a story—if you’re willing to listen.
tommytang.bsky.social
5/
Which genes respond to Treatment1 but not Treatment2?
What’s synergistic in the Combo?
What’s additive vs unique?
tommytang.bsky.social
4/
But you have 4 conditions:
Control, Treatment1, Treatment2, Combo.
Now the questions begin...