The microbiome first came to light in the mid-1600s, when the Dutch lens-grinder Antonie van Leeuwenhoek scraped the scum off his teeth, placed it under a microscope and discovered that it contained swimming creatures. Later generations of microbiologists continued to study microbes from our bodies, but they could only study the ones that could survive in a laboratory. For many species, this exile meant death.

In recent years, scientists have started to survey the microbiome in a new way: by gathering DNA. They scrape the skin or take a cheek swab and pull out the genetic material. Getting the DNA is fairly easy. Sequencing and making sense of it is hard, however, because a single sample may yield millions of fragments of DNA from hundreds of different species.

A number of teams are working together to tackle this problem in a systematic way. Dr. Weinstock is part of the biggest of these initiatives, known as the Human Microbiome Project. The $150 million initiative was started in 2007 by the National Institutes of Health. The project team is gathering samples from 18 different sites on the bodies of 300 volunteers.

To make sense of the genes that they’re gathering, they are sequencing the entire genomes of some 900 species that have been cultivated in the lab. Before the project, scientists had only sequenced about 20 species in the microbiome. In May, the scientists published details on the first 178 genomes. They discovered 29,693 genes that are unlike any known genes. (The entire human genome contains only around 20,000 protein-coding genes.)

“This was quite surprising to us, because these are organisms that have been studied for a long time,” said Karen E. Nelson of the J. Craig Venter Institute in Rockville, Md.

The new surveys are helping scientists understand the many ecosystems our bodies offer microbes. In the mouth alone, Dr. Relman estimates, there are between 500 and 1,000 species. “It hasn’t reached a plateau yet: the more people you look at, the more species you get,” he said. The mouth in turn is divided up into smaller ecosystems, like the tongue, the gums, the teeth. Each tooth—and even each side of each tooth—has a different combination of species.

Scientists are even discovering ecosystems in our bodies where they weren’t supposed to exist. Lungs have traditionally been considered to be sterile because microbiologists have never been able to rear microbes from them. A team of scientists at Imperial College London recently went hunting for DNA instead. Analyzing lung samples from healthy volunteers, they discovered 128 species of bacteria. Every square centimeter of our lungs is home to 2,000 microbes.