Data and code to replicate the analyses in the paper "Influence of setting and diagnostic algorithm on disease severity among people diagnosed with symptomatic and asymptomatic tuberculosis in South Africa". Dataset variables cover participant demographics, CD4TB score, TB diagnosis and symptoms, Xpert Ultra result, past instances of TB, HIV/ART status, and cavitation on chest X-ray. R code is used to generate table 1 and figure 1-2.