Diabetes is deeply written into a person's genes, but only emerges when combined with certain environmental factors, according to a new study. 

A team of researchers looked at how obesity can change the chemical tags associated with DNA and modify how genes behave to onset type 2 diabetes in cloned rats, reported Live Science

Half the rats were fed a high-fat diet, while the rest were fed normally. Although the rats all had identical genes, it was clear the gene expression in those with the high-fat diet were different than the rest. 

"An analysis of DNA isolated from their fat cells revealed changes in the epigenome: at certain sites along their DNA, chemical tags called methyl groups were present in the lean mice but missing in the obese mice; at other sites, vice versa. These methyl groups prevent genes from making proteins," reported Live Science. 

When the researchers looked at a data set of obese people who underwent gastric bypass surgery, they saw nearly the exact pattern of epigenetic changes at key sites in DNA isolated from their fat cells as the rats from the experiment. 

"Mice and humans are separated by 50 million years of evolution, so it's interesting that obesity causes similar epigenetic changes to similar genes in both species," Dr. Andrew Feinberg, director of the university's Center for Epigenetics, who led the study, told Live Science of the findings. 

The researchers believe that this finding, combined with other recent studies about diet and diabetes, offer "new potential targets for treating Type 2 diabetes," G. William Wong, an associate professor of physiology at Johns Hopkins and a co-author on the paper, told Live Science.