An increase in receptor activator of nuclear factor kB ligand (RANKL) and a decrease in osteoprotegerin (OPG), both caused by magnesium deficiency, cause an increase in bone resorption. The gene discussed is TNFRSF11B; the disease is magnesium deficiency.