This analysis revealed that the TyG index accounted for 40.25%, 36.45%, and 76.97% of the total effects of ALT, AST, and the ALT/AST ratio, respectively, on diabetes risk. The gene discussed is GPT; the disease is diabetes mellitus.