Scientists have for the first time sequenced the genome of New York City bed bugs, a project that could one day offer a way to contain one of the world’s most hated insects.

One group of researchers, in a Nature Communications study, found that genes in the bedbug, Cimex lectularius, are expressed the most after it feeds on blood for the first time. The group, led by the American Museum of Natural History’s Jeffrey Rosenfeld, also compared bed bug DNA from every New York subway station and found those from different parts of the city had different genetic makeups.

Related: Destructive tussock moth outbreak threatens pine tree supply

Another group of scientists, also writing in Nature Communications, found 187 potential genes that allow these parasites to repeatedly feed on their host without causing pain. They also identify genes associated with insecticide resistance, including proteins in the animals’ cuticle that prevent insecticide penetration and enzymes that can detoxify the chemicals.

“Bedbugs are one of New York City’s most iconic living fossils, along with cockroaches, meaning that their outward appearance has hardly changed throughout their long lineage,” said one of the paper’s corresponding authors George Amato, director of the Museum’s Sackler Institute for Comparative Genomics. “But despite their static look, we know that they continue to evolve, mostly in ways that make it harder for humans to dissociate with them. This work gives us the genetic basis to explore the bedbug’s basic biology and its adaptation to dense human environments.”

The bed bug is a parasite that feeds on exclusively on blood and has been associated with humans for thousands of years. Global infestations of bed bugs came about with the rise of heated homes and international travel, a problem that has only exacerbated by the evolution of insecticide resistance over the past 20 years.

Related: Venomous caterpillar packs a punch

The hope now is that the sequenced genome – featuring more than 38,000 genes - could lead to better insecticides for bed bugs and also help to better identify allergens associated with their infestation. For example, the researchers found that bedbugs are likely most vulnerable during the first nymph stage, potentially making it a good target for exterminators in the future.

Researchers also found that the bedbug microbiome contains more than 1,500 genes that map to more than 400 different species of bacteria, indicating that bed bugs harbor a rich suite of endosymbionts that are likely essential for their growth and reproduction. As a result, antibiotics that attack bacteria beneficial to bed bugs -but non-essential to humans - could be another weapon to control of the insects.

“Having this resources opens up a lot of potential new rounds of research in dealing with bed bugs,” said the University of Cincinnati’s Joshua Benoit, who was a co-author on the second paper and is part of the International Bed Bug Genome Project Collaboration, said in a statement. “In a year or two, we might actually develop better ways to control bed bugs.”

Related: Wasp DNA produces genetically modified butterflies

Researchers extracted DNA and RNA from preserved and living collections, including samples from a population that was first collected in 1973 and has been maintained by American Museum of Natural History. RNA was sampled from males and females representing each of the bug’s six life stages, before and after blood meals, in order to paint a full picture of the bedbug genome.

“It’s not enough to just sequence a genome, because by itself it does not tell the full story,” said Mark Siddall, one of the paper’s corresponding authors and a curator in the Museum’s Division of Invertebrate Zoology and Sackler Institute for Comparative Genomics. “In addition to the DNA, you want to get the RNA, or the expressed genes, and you want that not just from a single bedbug, but from both males and females at each part of the life cycle. Then you can really start asking questions about how certain genes relate to blood-feeding, insecticide resistance, and other vital functions.”

Researchers not only found that the bedbugs are more closely related to their subway neighbors but also other insects – showing close relationships to the kissing bug (Rhodnius prolixus), one of several vectors for Chagas disease, and the body louse (Pediculus humanus), which both have tight associations with humans.