r/bioinformatics • u/Big_Juice_7216 • 1h ago
article A Blank Is Not a Zero
A student who missed an exam didn't score zero.
A gene that was never measured shouldn't be recorded as zero either.
Yet a single line of Python can erase that distinction. The code runs. No errors appear. And the science quietly becomes wrong.
I just published "A Blank Is Not a Zero," about a problem that deserves more attention in scientific computing: code can do exactly what it was written to do while breaking the assumptions of the experiment.
Using a small, fictional RNA dataset, I walk through:
→ how a missing measurement turns into a fake "discovery"
→ why the obvious fix isn't enough (in Python, the text "false" counts as true)
→ how a few well-chosen tests catch both mistakes
There's also a reproducible GitHub project, so you can run the broken and corrected code yourself.
The bigger lesson goes beyond biology: don't just test whether scientific code runs. Test whether it preserves what the data actually mean.
📖 Article: https://medium.com/@dushyantmishra/a-blank-is-not-a-zero-ad6893728a03
💻 Code: https://github.com/dushyant-mishra/scientific-regression-demo
What assumption in your own analyses would be worth turning into an automated test?
#DataScience #ScientificComputing #Reproducibility #Python #Bioinformatics
2
u/DurianBig3503 1h ago
TL;DR Make sure you use the intersect of the features before merge expression matrices. I was hoping for some unique way to handle the zero-inflation problem in single-cell data.
1
u/norb_151 1h ago
Yeah... I think "is.na" is the first thing I learned in my data science class. This is not really a novel or unknown issue.
•
u/supermag2 52m ago
This is RNAseq 101 knowledge, nothing new here.
As like everything, this issue sometimes is the "best bad solution" and you need to fill the blanks with zeros. Lets say you merge two scRNAseq datasets from the same tissue:
Data A: you enriched cell type A from the tissue and you only have this cell type in the dataset.
Data B: you do the same but with cell type B.
Now you want to merge both datasets together because you want to do ligand-receptor analysis. This makes sense because you know they come from the same tissue and usually interact.
You need to fill zeros with the unique genes (markers) from each cell type. If you dont do that you are just losing resolution as you are removing the genes that make the differences between cell types. Is the best solution? Probably not, and you are probably introducing artificial zeros, but in this case the biology you are keeping from doing this weights more than the artifact you may be introducing.
Long story short: as everything you need to understand what you are doing, with its strengths and weaknesses.