A common vampire bat (Desmodus rotundus) flies during its nocturnal hunt in Belize in this handout photo released on February 20, 2018. Brock Fenton/Handout via REUTERS.

WASHINGTON (Reuters) - If you want to know how vampire bats can survive on a diet that -- as everyone knows -- consists exclusively of blood, the answer is simple. It’s in their genes.

Scientists on Monday said they have mapped for the first time the complete genome of a vampire bat, finding that this flying mammal boasts numerous genetic traits that help it thrive on an exotic food source that offers nutritional disadvantages and exposes it to blood-borne pathogens.

The researchers compared the genome of the common vampire bat, scientific name Desmodus rotundus, to genomes of bat species that eat nectar, fruit, insects and meat. They also examined microbial DNA from its droppings.

This bat and the world’s two other vampire bat species, the hairy-legged vampire bat and the white-winged vampire bat, are the only mammals that eat just blood.

The common vampire bat, a nocturnal cave-dweller with a 7-inch (18-cm) wingspan, inhabits parts of Mexico, Central America and South America. It feeds on the blood of livestock such as cattle and horses. It lands near prey under cover of darkness, walks on the ground, then feeds on the sleeping animal using razor-sharp teeth to pierce the skin and a lengthy tongue to lap up flowing blood.

“We decided to study this species because it has an ‘extreme’ diet, in the sense that it requires many adaptations in the organism to live on that,” said study lead author Lisandra Zepeda, a University of Copenhagen doctoral student while doing the research published in the journal Nature Ecology & Evolution. “Blood is a challenging dietary source since it provides very low levels of vitamins and carbs, and a lot of proteins, salts and waste products.”

They pinpointed genome elements that augment the bat’s immune response and viral defense to cope with pathogens lurking in blood. They also identified genes involved in the metabolism of vitamins and fats that could help the bat deal with the unique nutritional aspects of its blood diet.

To some people, vampire bats are creatures of dread, associated with fictional vampires like Dracula.

“Yeah, they’re messed-up creatures, or amazing creatures, whatever you want to call them,” Zepeda said. “My personal feelings about them is that it’s too bad people demonize them like that. We should be amazed by them, not scared. They’re actually quite cute: abstract beauty. Sure, you don’t want them to bite your cows if you’re a farmer, but they were there way before you.”