In summary, our results show that TRDEGs are linked to inflammation, energy metabolism, and immune cells, offering fresh insights into the mechanisms underlying TB pathogenesis and supporting further investigation into the possible molecular roles of TARM1 in TB, as well as assisting in the identification of prospective diagnostic biomarkers. This evidence concerns the gene TARM1 and tuberculosis.