Analysis of time-to-positivity data in tuberculosis treatment studies: Identifying a new limit of quantification
This repository holds all of the code necessary to recreate the work presented in the manuscript "Analysis of time-to-positivity data in tuberculosis treatment studies: Identifying a new limit of quantification" by Dufault et al published in the International Journal of Antimicrobial Agents (2025).
The BACTEC Mycobacteria Growth Indicator Tube (MGIT) machine is the standard globally for detecting viable mycobacteria in patients’ sputum. Samples are observed for no longer than 42 days, at which point the sample is declared ‘negative’ for tuberculosis (TB). This time to detection of bacterial growth, referred to as time-to-positivity (TTP), is increasingly of interest, not solely as a diagnostic tool but also as a continuous biomarker wherein change in TTP can be used for comparing the bactericidal activity of different TB treatments. However, as a continuous measure, there are oddities in the distribution of TTP values observed, particularly at higher values. We explored whether there is evidence to suggest setting an upper limit of quantification for modeling purposes (ULOQ_M) lower than the diagnostic limit of detection (LOD) using data from several TB-PACTS randomized clinical trials and PanACEA MAMS-TB.
docs- contains the final reports (html, pdf, etc) generated by the source files in reportsreports- contains the source files for reportslib- contains user written functionsucsf-color-palette.Rthis script contains the UCSF color paletterelative-function-remox.Rthis script uses the posterior distributions of the parameter credible estimates from the REMox data to determine the level of differentiation observed between each of the regimens and control, based on different ULOQ_M thresholds.relative-function-nc002.Rthis script uses the posterior distributions of the parameter credible estimates from the NC-002 data to determine the level of differentiation observed between each of the regimens and control, based on different ULOQ_M thresholds.relative-function-mams.Rthis script uses the posterior distributions of the parameter credible estimates from the MAMS data to determine the level of differentiation observed between each of the regimens and control, based on different ULOQ_M thresholds.
munge- contains all of the code to design, run, and evaluate the simulation study00_run-file.R- this is the primary file for performing the entire simulation study. This calls in all the rqeuired code for cleaning the data, analyzing the data, and evaluating the performance. Ideally, you should only need to call this file to perform the entire simulation study.01_data-cleaning.R- this code is called by the00_run-file.Rto clean the data- inputs: preprocessed REMox data, preprocessed TB-PACTs data
- outputs:
data/cleaned-data/[DATE]_[STUDY]-clean.RData
02_run-linear.R- this code is called by the00_run-file.Rto run the linear Bayesian hierarchical models.- inputs:
data/cleaned-data/[DATE]_[STUDY]-clean.RData - outputs:
data/model-generated/[DATE]_linear-[STUDY]-lod-[ULOQ_M].RData
- inputs:
04_run-linear_sensitivity.R- this code is called by the00_run-file.Rto run the sensitivity check removing the baseline TTP measurements from the linear models- inputs:
data/cleaned-data/[DATE]_[STUDY]-clean.RData - outputs:
data/model-generated/[DATE]_linear-[STUDY]-lod-[ULOQ_M]_sensitivity.RData
- inputs:
sandbox- contains work in progressdata- not included in this repository, but data can be accessed as described in the manuscript
SMD - NIH/NIAID P30: TB Research Advancement Center (UC TRAC), P30AI168440 SMD - NIH/NIAID R25: TB Research and Mentorship Program (TB RAMP), 1R25AI147375 EMS - Veni project number 09150161910052 financed by the Dutch Research Council (NWO)
Dufault SM, Davies GR, Svensson EM, Sloan DJ, McCallum AD, Patel A, Van Brantegem P, Denti P, Phillips PPJ. Analysis of time-to-positivity data in tuberculosis treatment studies: Identifying a new limit of quantification. International Journal of Antimicrobial Agents. 2025 Feb;65(2):107404. https://doi.org/10.1016/j.ijantimicag.2024.107404
Contributor: Suzanne M. Dufault ([email protected])