But medical experts said this sort of risk assessment is the wave of the future. “I’m not sure we can stop it,” said Dr. John Mandrola, a cardiac electrophysiologist at Baptist Health in Louisville, Ky.

The study began because there was general agreement among researchers that many common diseases are linked not to one mutation, but rather to thousands or millions of mutations, said the first author of the new paper, Dr. Amit V. Khera, a cardiologist at Massachusetts General Hospital and a researcher at the Broad Institute.

In recent years, scientists have cataloged more than 6 million tiny changes in DNA that slightly affect the chances that people will get various diseases.

Each of those genetic alterations has such a small effect — a 1 percent or so increase or decrease in a person’s odds of getting a disease — that it would not be helpful to test for each one in isolation.

But it should be possible, scientists felt, to combine data on all the small DNA changes to construct an individual risk score. To do that, the researchers needed a new algorithm that would weigh the significance of the variations in the genes.

Then they had to test the risk scores they obtained. Dr. Khera and his colleagues turned to the U.K. Biobank, which holds genetic and disease information on half a million people.

The investigators found that their algorithm did predict the odds of being diagnosed with one of the five diseases. But the U.K. Biobank consists mostly of white Europeans.