(CNN) -- While investigators trudge through pig farms and remote villages in Mexico, searching for clues about the new swine flu, answers about the virus' origin may finally appear on a computer, based on genetic codes.
A researcher investigates swine flu at the Centers for Disease Control and Prevention in Atlanta, Georgia.
At the Department of Biomedical Informatics at Columbia University, researchers are using public databases to trace the origins of the 2009 H1N1 virus. They've found that the closest relatives to the new virus are viruses that were isolated from pigs in the United States in the past few years.
Their analysis, recently published in Eurosurveillance, suggests that the virus has at least two swine ancestors, one of them related to a virus isolated in North America in 1998.
Still, the relatives are distant, and it's premature to conclude that the virus came from the United States based on this analysis, said Raul Rabadan, study co-author and assistant professor at Columbia.
Influenza is like a small jigsaw puzzle with eight pieces, each with its own function, Rabadan said. The puzzle changes all the time, which is why exposure does not lead to total immunity and vaccines need to be updated yearly.
When two viruses infect the same cell, they can create yet other viruses with pieces of each of the original strains. This process is called reassortment. The 2009 H1N1 virus is a reassortment of swine, human and avian genes.
Rabadan and colleagues are finding the closest ancestors for each of the parts of the virus and then trying to understand how these parts may have combined in the past, a complicated question.
It is impossible to know from the available data where geographically the 2009 H1N1 virus came from, but with more samples, researchers may be able to decipher more clues, he said. Just from looking at the genetic code, it is unknown what species is the virus' host, how easily it is transmitted and how deadly it is.
"We have a set of letters that you can try to map, and then you can try to see how this map is working, how would you know if a particular combination is giving you something? That's something that has to be solved."
Although a 5-year-old boy in the small village of La Gloria, Mexico, is said to be "patient zero," with the earliest confirmed case of 2009 H1N1, no one knows exactly how he contracted the virus. Read more about the boy
Some say that tracking the origin of the virus isn't as important as finding ecological weak points and bolstering surveillance.
"We may not be able to say precisely say, 'This pig farm spawned this virus' and all that, but I think it's very important to face the facts about what kinds of ecological settings are spawning danger," said Laurie Garrett, senior fellow for global health at the Council on Foreign Relations.
For influenza, the new ecological stress points mostly relate to industrial-scale livestock and, in the case of avian flu, backyard chicken farming, she said. In both of those cases, there are "economic lives at stake" in making decisions such as killing certain animals, she said.
"We have to figure out a way we can surveil those populations, surveil that ecology, without the industries at stake -- or, in the case of chickens, the small family farmer in Indonesia -- feeling that their livelihood is challenged just by the very fact that anybody's even trying to do surveillance," Garrett said.
But the genetic lineage of the virus does offer useful clues, she said. Cooperation among the United States, Canada and Mexico in every step of the investigation has been profound, she said. By contrast, Indonesia has refused to share bird flu samples with the World Health Organization in the past.
Some researchers say it's not surprising that a new virus such as 2009 H1N1 would seem to have its focal point in Mexico.
A 2008 Nature study co-written by Peter Daszak, president of Wildlife Trust, an international organization of scientists, used computer modeling to find that hot spots for emerging infectious diseases include China, Southeast Asia, Mexico, parts of Brazil, Europe and the United States.
The study showed that socioeconomic, environmental and ecological factors correlate with emerging infectious diseases and help identify "hot spots" for where they crop up.
Now, researchers are looking at travel and trade patterns from Mexico to shed light on how the virus has spread. There's a large trade of pigs from the United States and Canada, as well as pig trades from other countries, each year into Mexico, he said.
"There's a lot of mixing, and a lot of potential for viruses," Daszak said. "It's equally likely that it emerged in Mexico as it is in Canada and the U.S."
The main driving factors for an emerging infectious disease are the demographics of people, livestock production and changing food production strategies, Daszak said.
Although scientists know of several thousand viruses, more than a million viruses could be out there, assuming every vertebrate species on the planet has 20 viruses that no other vertebrate has, and there are 50,000 vertebrates, he said.
The lesson from the swine flu outbreak is that "we missed the boat," he said. While resources were thrown at avian flu in Southeast Asia, the newest virus has emerged at the United States' doorstep, he said.
"We should have been out there looking for these things happening," he said. "We should have been working better with those pig farms or with in any industry in a hot zone."
Anyone who is building pig farms or poultry farms in a hot zone of emerging infectious diseases should increase security, look out for new diseases in livestock or people, and investigate any novel diseases rigorously, he said.
The Centers for Disease Control and Prevention has found that each gene segment of 2009 H1N1 had its closest ancestor in swine influenza virus, and officials hypothesized that the reassortment of these genes occurred in pigs, said Nancy Cox, director of the CDC's Influenza Division.
"It doesn't necessarily mean that that's where it occurred, but that was our working hypothesis based on the genetic relationship of each of the gene segments," she said.
Regardless of the outcome of 2009 H1N1, more infectious diseases will crop up over time, and there's no end in sight, Daszak said.
"When you're in a genetic arms race like this, we're always going to be fighting this battle," he said.
All About Influenza • Centers for Disease Control and Prevention