Loss of function ankyrin-B variants have impaired function in pancreatic islets and are associated with type 2 diabetes. This finding provides the basis for methods of identifying at-risk individuals for type 2 diabetes and for personalized therapeutic strategies.