key: cord-0871314-ubpx9f8x authors: Cuny, A. P.; Rudolf, F.; Ponti, A. title: pyPOCQuant - A tool to automatically quantify Point-Of-Care Tests from images date: 2020-11-12 journal: nan DOI: 10.1101/2020.11.08.20227470 sha: dfa32c44b0e6e71649d7a79719ca26c1d3c4a5cd doc_id: 871314 cord_uid: ubpx9f8x Lateral flow Point-Of-Care Tests (POCTs) are a valuable tool for rapidly detecting pathogens and the associated immune response in humans and animals. In the context of the SARS-CoV-2 pandemic, they offer rapid on-site diagnostics and can relieve centralized laboratory testing sites, thus freeing resources that can be focused on especially vulnerable groups. However, visual interpretation of the POCT test lines is subjective, error prone and only qualitative. Here we present pyPOCQuant, an open-source tool implemented in Python 3 that can robustly and reproducibly analyze POCTs from digital images and return an unbiased and quantitative measurement of the POCT test lines. [4]. 23 To be of use in the global SARS-CoV-2 pandemic, POCTs must fulfill the 24 standards set by the WHO (≥ 80% sensitivity and ≥ 97 − 99.5% specificity) 25 [5, 6]. These specifications hold both for the diagnostic of an ongoing viral 26 infection and the detection of past infections. A plethora of manufacturers 27 provide tests that they claim to fulfill these specifications, but we argue that 28 they will require comprehensive characterization and comparison of their 29 analytical and clinical performance [7, 8] . 30 LFA and similar devices are scored visually and yield a dichotomous (pos-31 itive/negative) readout. Experimentally, the analytical limit of detection can 32 be determined using a titration of (repeated) measurements of purified pro-33 teins (such as monoclonal antibodies as a surrogate for blood IgG detection) 34 or in proteins from the pathogen of interest that are expressed in cell lines 35 and purified (i.e. Spike protein of SARS-CoV-2) [9] . However, they do have 36 the potential for a quantitative readout using dedicated readers, lab scanner, 37 or image-based analysis [10, 11, 12, 13] . While there have been efforts to use 38 smartphones as readers in combination with 3D-printed adapters and holders 39 [14, 15, 16, 17, 18, 19, 20] , no freely available pipeline is available to analyze 40 POCTs from large numbers of images in an automated way. The user manual describes its usage in full detail. Depending on the workflow, needs and preferences of the user, pyPOC-62 Quant can be launched from the command line interface (CLI) using the 63 pyPOCQuant.py main script, or run as a module from a Jupyter notebook. 64 We also developed pyPOCQuantUI, a user-friendly graphical user interface 65 (GUI) and desktop application that leverages pyPOCQuant while massively 66 facilitating the definition of essential parameters needed for the analysis. 67 pyPOCQuantUI is implemented in Python 3 using the PyQt5 library and 68 can be run from source or as a stand-alone, executable desktop application. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; Figure 2 : pyPOCQuant architecture overview. Bold arrows depict the main flow trough the tool using the GUI. Regular arrows depict the CLI usage and optional ways of interaction. in a data frame that can be used for further statistical analysis. The next 74 sections will discuss these operations in detail. The pipeline processes all images in a user-defined input folder in par-81 allel, and the number of parallel tasks can be defined at run time ( Figure 82 2). Results are compiled in a common data frame and saved as a comma- is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; POCT segmentation. Additional QR codes encoding spatial information make 93 the process of segmentation more robust. These QR codes ensure that the 94 image was acquired in the expected orientation. If this is not the case, a is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint Corr. profile Peak max TL1 local BD TL2 local BD Ctl TL local BD Peak sgfnt. thld Est. bkgnd is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint be controlled in the settings. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint also features three vertical test lines that need to be aligned with the test is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint conditions. Therefore, human assessment is neither reliable nor quantitative. 281 We propose pyPOCQuant as a valuable tool that generates quantitative is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint such as PCR or ELISA may be hampered by limited access to reagents and 294 laboratory equipment, such as during the global SARS-CoV-2 pandemic. We developed it to reproducibly batch-process thousands of images of POCTs 300 in parallel using multi-core computers or even clusters. We made pyPOC-301 Quant user-friendly by adding a graphical user interface to facilitate load-302 ing images, defining and testing analysis parameters on single images, and 303 launching entire analysis campaigns with a few clicks. In addition to its exe-304 cution from the CLI or GUI, pyPOCQuant can also run in Jupyter notebooks. Notebooks integrate analysis and documentation into elegant reports. is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint hochschule Nordwestschweiz for valuable user feedback that helped us greatly 328 improve the software and the user experience. We would like to thank Marc is the author/funder, who has granted medRxiv a license to display the preprint in (which was not certified by peer review) preprint The copyright holder for this this version posted November 12, 2020. ; https://doi.org/10.1101/2020.11.08.20227470 doi: medRxiv preprint A guide to aid the selection 334 of diagnostic tests Lateral flow assays Lateral flow immunoassay Testing for Infectious Diseases: Diversity, Complexity, and Barriers in 342 World Health Organization and others, Antigen-detection in the diagno-345 sis of sars-cov-2 infection using rapid immunoassays: interim guidance Limit of blank, limit of detection and limit 359 of quantitation Towards lateral flow 362 quantitative assays: detection approaches Multi-site 365 validation of a sars-cov-2 igg/igm rapid antibody detection kit A low-cost, 368 high-performance system for fluorescence lateral flow assays Lateral-flow technology: From visual 371 to instrumental Cellphone-based devices for bioanalytical sciences Multiplex Platforms 375 in Diagnostics and Bioanalytics Development of a Smartphone-based reading 378 system for lateral flow immunoassay Mobile phone 381 imaging and cloud-based analysis for standardized malaria detection and 382 reporting Point of care sensing and biosensing using ambient light sensor 385 of smartphone: Critical review Disposable Autonomous Device for Swab-to-Result Diag-397 nosis of Influenza Mobile phone based ELISA (MELISA) Robust Statistics Clinical characterisation of eleven lateral