In mid-June, Timothy Wannier tested positive for COVID-19. Within 48 hours, he felt it was a mistake.

“The evidence was overwhelmingly obvious,” said Wannier, a geneticist at Harvard University. At the time, case numbers were down in Massachusetts, where he, his wife and two children had been vigilantly sheltering in place for months. Wannier had no symptoms, and neither did any of his close contacts.

He had, however, spent a couple of days in a room teeming with pieces of the pathogen’s genetic material.

Wannier is one of many scientists conducting research on the coronavirus’ genes — harmless hunks of molecules. Unfortunately for three members of the Church lab where he works, those genes also happened to be the target of a widely used coronavirus test, made by the Broad Institute in Cambridge, Mass., that Wannier and two colleagues took the week of June 15 as part of their university’s routine screening. Unaware of the virus genes in or on their bodies, the three had inadvertently tricked the test into identifying them as infected.

Contaminated positives such as these are rare, experts said. “This isn’t the fault of any test,” said Dr. Rosemary She, a pathologist and diagnostics expert at the University of Southern California. “This is human error.”

But in a nation with a patchwork approach to testing, and where a great many researchers have rapidly pivoted to studying the coronavirus, similar issues have struck labs at the Massachusetts Institute of Technology, Brown University, Roger Williams University, Cornell University and elsewhere. Paradoxically, many of the researchers who contaminated themselves with coronavirus genes — including some of Wannier’s co-workers — did so while trying to develop new diagnostics to detect the virus.

Experts said these incidents had exposed weaknesses in testing and isolation strategies, and should serve as a reminder of both the promise and perils of coronavirus diagnostics, which roll out at breakneck speed.

The events have been designated as suspected contaminations, not true infections. But it remains possible that some people actually contracted the virus. But based on who was tested and when, “we don’t think these were true cases,” said Russell Carey, Brown’s executive vice president for planning and policy.

The genome of the coronavirus is written in RNA, a close cousin of the DNA found in human cells, and is relatively fragile in its natural state. Converted to DNA, however, the virus’ genes can linger for long periods on surfaces, objects and passersby, perhaps after being splashed or sprayed out of lab equipment.

After the spate of positive test results, researchers at the Wyss Institute and the Church lab, led by virologist Lindsey Robinson-McCarthy, surveyed their surroundings. Wayward bits of DNA had made their way onto equipment, sinks, door handles, backpacks and clothing. A few fragments even hitchhiked home with one researcher, contaminating a doormat that then deposited the molecules onto a family member’s shoe.

“It was everywhere,” said Gabriel Filsinger of the Church lab. “It went further than we would ever imagine. My backpack has been continuously positive.”

Although labs that specialize in diagnostics have long had protocols, “we’ve never had a situation where so many labs work on a pathogen” amid a pandemic and so much asymptomatic testing, said Susan Butler-Wu, a clinical microbiologist at the University of Southern California.