Published March 12, 2021 | Version v2
Journal article Open

Bayes Lines Tool (BLT) - A SQL-script for analyzing diagnostic test results with an application to SARS-CoV-2-testing

  • 1. Independent Data and Pattern Scientist, The Netherlands
  • 2. University Hospital of Würzburg, Germany
  • 3. The Independent Research Initiative on Information & Origins, Loerrach, Germany
  • 4. Independent Scientist,The Netherlands
  • 5. University for Applied Arts Vienna, Austria
  • 6. Medicinal Genomics, Beverly MA, USA
  • 7. Leopoldina Hospital Schweinfurt, Germany


The performance of diagnostic tests crucially depends on the disease prevalence, test sensitivity, and test specificity. However, these quantities are often not well known when tests are performed outside clinical practice which makes the rating of the test results somewhat problematic. A current example is the mass testing taking place within the context of the world-wide SARS-CoV-2 crisis. Here, for the first time in history, the test results have a dramatic impact on political decisions. Therefore, transparent, comprehensible, and reliable data is mandatory. It is in the nature of wet lab tests that their quality and outcome are influenced by multiple factors reducing their performance by handling procedures, underlying test protocols, and analytical reagents. These limitations in sensitivity and specificity have to be taken into account when calculating the real test results. As a resolution method, we have developed a seminal Bayesian calculator, the Bayes Lines Tool (BLT), for back-solving disease prevalence, test sensitivity, test specificity, and, therefore, true positive, false positive, true negative and false negative numbers, from official test outcome reports. The calculator performs a simple SQL query and can easily be implemented on any system supporting SQL. We provide three examples of SARS-CoV-2 test results from official government reports from the Netherlands, Germany, and the United Kingdom to illustrate the possible parameter space of prevalence, sensitivity, and specificity consistent with the observed data. Finally, we discuss this tool’s multiple applications, including its putative importance for informing policy decisions.


Submitted to F1000 Research


BLT - A SQL-script for analyzing diagnostic test results.pdf

Files (1.3 MB)

Additional details

Related works

Is supplemented by
Software: 10.5281/zenodo.4594210 (DOI)