The microbes in your home know all of your dirty little secrets. According to a new study, bacteria on your door frames can provide clues about how many males and females live in your house and what types of pets you have. Eventually, the findings could help forensic scientists develop new crime-solving techniques.

“This is a powerful study,” says Rachel Adams, a microbial ecologist at the University of California, Berkeley, who was not involved in the new research. The findings nicely mirror results from other, smaller studies, she adds.

To conduct the study, scientists asked residents of about 1200 homes scattered across the continental United States to swab dust that had accumulated in two places: their main external doorframe and an internal door frame in their home’s main living space. But they couldn’t swab it just any old way. Instead, they had to take their samples from the hard-to-reach and rarely disturbed upper surface of the trim above the door.

“It’s clever that they analyzed dust from above the door jamb,” says Linsey Marr, an environmental engineer at Virginia Polytechnic Institute and State University in Blacksburg who wasn’t involved in the research. “It’s somewhere people never clean.”

Residents also filled out a detailed questionnaire about their living habits and their house, including its age, the types of pets that lived there, and even how many smokers and vegetarians called it home. Then, the researchers used genetic analyses to identify the major groups of fungi and bacteria inhabiting the grunge.

The fungi found inside homes were similar to those found outside, suggesting that these microbes probably wafted in from the environment and had little to do with household inhabitants. But the bacteria told a different story, says Noah Fierer, a microbial ecologist at the University of Colorado, Boulder. The types of bacteria found in interior dust samples largely depended on the ratio of male to female residents and on the presence of pets such as dogs and cats, he and his colleagues report online today in the Proceedings of the Royal Society B. The genera found include human fecal and vaginal bacteria as well as those that live on human skin, Fierer says. Many of the fecal bacteria may have been borne aloft by air currents generated when toilets are flushed.

Two types of skin-dwelling bacteria—those in the genera Corynebacterium and Dermabacter—and the fecal-associated genus Roseburia were more abundant in homes with more males. That may be because men typically are larger than women and therefore have more skin and shed more such bacteria, but the finding may also be driven by different hygiene practices among men and women. For instance, women harbor fewer bacteria on their skin and therefore shed them less often, possibly because of more frequent bathing or showering or a more prevalent use of skin care products.

The researchers could also tell whether a home had a dog or a cat with 92% and 83% accuracy, respectively—a sign that pets have a highly predictable influence on the bacterial diversity in household dust. In homes with cats, 24 genera of bacteria were significantly more abundant than they were in homes without cats, the researchers found. In residences with dogs, the researchers found higher numbers of bacteria from 56 different genera.

The results suggest that relatively simple tests of household dust collected from infrequently cleaned areas could help forensic scientists identify the sex of a home’s occupants—and maybe even its frequent visitors, the team says. Because such dust accumulates very slowly, however, it might be asking too much for such tests to identify occasional or one-time guests.