Cockroaches have been humanity’s roommates for the past thousands of years, thanks to their amazing abilities to survive even in most unfavorable environments. These unwanted, creepy insects mostly survive on fermenting foods in the sewage pipes of our homes. Cockroaches cause allergies, are a rich source of disease-causing bacteria, and therefore are a huge nuisance for most of us.

Now, for the first time, a team of researchers from the South China Normal University in Guangzhou, China, has found success in sequencing the genomes of American cockroaches (Periplaneta americana). According to researchers, the genome of the American cockroach is now the second largest sequenced to date (compared to other insects) after the locust. The findings of the study were published in Nature Communications.

The American cockroach, also known as the water bug, is the largest among commonly found house cockroaches, according to the New York Times. To survive, this pest eats just about anything, including book bindings, glue, rubber, feces, and other cockroaches. Relative to its size, it runs very fast — the human equivalent of 210 miles per hour, and amazingly, it can live for almost a week even without its head.

In the new study, Chinese researchers found that the genes of the American cockroach have given it the ability to survive even in too harsh environments, thereby making the pest too tough to get rid of.

What makes the American cockroach so scrappy and able to adapt to human environments? It's in the genes. https://t.co/KOPkNMXQeX — NYT Science (@NYTScience) March 21, 2018

Chinese researchers compared the genomes of Periplaneta Americana with the genomes of two related species, the smokybrown cockroach (P. fuliginosa) and the Australian cockroach (P. australasiae). The team found evidence that some specific families of genes in American cockroaches have become more expansive over time. For example, genes families associated with detoxification and chemoreception are more expansive in these insects. These genes code for more than 500 taste receptors and 150 scent receptors—the maximum number of receptors found so far in any insect. Researchers believe such a large number of taste and scent receptors, together with other chemical receptors, allow the American cockroach to be such an effective scavenger. While genes associated with perceiving bitter tastes help the pest identify safer foods for it, the detoxification genes allow it to evolve resistance to the chemicals developed by humans against it.

The study also identified the genes in American cockroach that help the pest regenerate its broken limbs. In earlier studies, researchers have found the same genes in some other insects, including the fruit fly. Chinese researchers are now trying to identify the proteins involved in this organ regeneration process, with the hope to harness such proteins for treating humans with damaged limbs.

According to Gizmodo, researchers are hopeful that future studies on cockroaches would provide a better understanding of the evolutionary relationship between termites and cockroaches and allow researchers discover some new methods to control these pests.

“The harm of American cockroaches is becoming more serious with the threat of global warming,” the researchers wrote in their paper.