thebench.bio #1 Ecosystem for the Bio-Tech Industry
All Python for Scientific Computing questions

Question 3 of 6 Intermediate Scenario

How do unit tests differ from scientific validation?

Short answer

Unit tests check that code behaves as specified on selected cases. Scientific validation asks whether the model, assumptions and measurements answer the real biological question.

Why

Test a normalization function with small matrices, missing values and known output dimensions. Such tests protect logic but cannot show that the normalization procedure removes the right biological confounder. Scientific validation requires representative samples, appropriate controls, benchmark measurements, uncertainty analysis and examination of alternative biological explanations.

One can have flawlessly tested code implementing a scientifically invalid threshold. Conversely, a biologically supported method may still contain a programming bug, so both layers matter. Maintain regression tests against known datasets and scientific acceptance criteria such as recovery of spike-ins or agreement with reference assays.

Report failure modes explicitly. Passing tests should never be described as experimental validation of a predictive biomarker.

Common mistakes

  • Assuming a green continuous integration build demonstrates clinical or biological validity