However, insulin dose (IU/kg), a surrogate measure of resistance in type 1 diabetes, moderated the association of serum magnesium (mmol/L) with HbA1c (mmol/mol) with a B coefficient of − 71.91 (95% CI: − 119.11; -24.71), P-value = 0.003) and Log10 high-sensitivity C-reactive protein (Log10 mg/L) − 2.09 (95% CI: − 3.70; − 0.48), P-value = 0.011). The gene discussed is INS; the disease is type 1 diabetes mellitus.