ROCHESTER, Minn. — The first daughter died in 2004. She was just 12. She collapsed while running around like every child wants to do.

The local medical examiner was mystified. Her heart had no structural abnormalities. The daughter's family would have still been nursing the loss when a younger sister died in the same fashion a few months later. The shock of that death would have been immeasurable and yet their trials were only beginning. Grief would revisit to take another daughter while at play, and then a fourth daughter a few years after that.

The family, an Amish household in a remote community in the eastern U.S., felt as if they had been cursed.

On the other side of the country, a so-called molecular autopsy by then eight years in the making had already run cold. After each grief-stricken loss, the local medical examiner carefully saved the girls' DNA. Following the second tragedy of 2004, he forwarded the samples to a team that had coined the new term for reconstructing the mechanism of sudden cardiac death by culling through code within the cell.

They had looked for a misspelling of the genetic sequence within RYR2, a 15,000-nucleotide section of the gene known for sudden cardiac events while under exertion. A mutation responsible for fainting spells, it produced a leakage of calcium channel ions in the presence of adrenaline released while at play, giving rise to an electrical collapse leading to ventricular fibrillation.

But this was the early 2000s, and sequencing the genome still relied on a method from the late 1970s.

"We were stuck," says Michael J. Ackerman, M.D., Ph.D., director of the Windland Smith Rice Genetic Heart Rhythm Clinic at Mayo Clinic, home of the molecular autopsy team within the Windland Smith Rice Sudden Death Genomics Laboratory. By the early teens, however, the technology of gene sequencing had exponentially expanded, and most of all, the researchers had not forgotten the four daughters.

"We are tenacious, and we never give up," Ackerman said of the discovery reported this week in the journal JAMA Cardiology. "We sort of regrouped and said let's try again with the new technology."

By 2016, now armed with software capable of scanning the entire gene, Ackerman's lab director Dave Tester restarted the search by initiating a process of elimination from every variant unique to the DNA of the four daughters, their siblings and their parents. From these 140,000 possibilities, he cut 9,000 that were noise, another 114,000 too common to cause rare illness, leaving them just over 1,100 possible locations of the faulty code. It was in there somewhere, one of those, non-recessive mutations was surely the target.

But when he eliminated this last category of genes, "it was zero," Tester says.

Tester, a youthful 50, sits in a three-foot-by-three-foot grotto of empty soda bottles, dead computer mainframes and beneath a shelf of golf wedges belonging to a previous occupant. He holds a B.S. in molecular biology from the University of Wisconsin Eau Claire. He learned how to sleuth the mechanism of genetic calamity on the job.

"He should be a Ph.D.," says Ackerman. "He's done more than most Ph.D.'s." Tester was in charge of the data when they thought they had come close to discovering the mutation in 2004, only to learn that the technology was not ready. But, in 2016, armed with the ability to find changes at the RYR2 in large patterns, he finally saw a signal.

"Dave, he's the one who did the a-ha moment," says Ackerman, who first chose RYR2 as the likely target. "We were looking and relooking at that gene. He walked in one day and said 'Mike, you're right, it's this gene, it's just that it's not a single nucleotide, it's a duplication of over 300,000 nucleotides in the gene.' He figured out where the duplication started, and where it ended, and that there were over 300,000 nucleotides in between."

"Mayo developed a pattern recognition tool," Tester says modestly.

The mutation appears to be unique to the Amish community. They have never found it in Caucasian, African American and Asian patients with sudden cardiac exertion syndrome. Tester credits a bioinformatics lab for running the data, and his colleagues for helping the SDI lab quickly developed a test to determine if remaining family members hold the duplication. The need to know is surely great; the Amish exercise death mutation appears to be highly lethal, killing 80% of those they have identified.

The Clinic has procured donor funding to test every family member of the community. Those with the mutation face a need for implantable defibrillation, however, an extraordinarily costly procedure. The lab is searching for a medical treatment, in addition to the invaluable treatment it has already provided in the form of information.

"Now we can identify which parents, children and cousins are carriers and which ones got the (deadly) double dose," says Ackerman. "Those who we figured out are carriers can decide if it is a good idea for a carrier to marry a carrier. If they don't, the possibility for sudden death is completely eliminated."