Dogs are man’s best friend. So the saying goes — and it’s even been studied scientifically. But should it have been?

The dog loyalty research was one of many studies funded by the National Science Foundation that Sen. Tom Coburn (R-Okla.) criticized this year in a reportdescribing what he viewed as wasteful government spending on science.

It’s a common complaint: We spend too much money on obscure research. We’re in debt. We can’t afford to pay graduate students to play fetch.

With the congressional supercommittee’s debt-reduction deadline approaching, federal funding of basic scientific research — from the Energy Department, the National Science Foundation, the National Institute of Standards and Technology, and many others — could be on the chopping block. If the supercommittee can’t reach an agreement, an across-the-board, $1.2 trillion cut will automatically kick in, and it could slash science funding by 8 percent in 2013, according to a recent estimate by Michael Lubell of the American Physical Society.

Republican members of the House science committee wrote a letter to the supercommittee last month to suggest cutting budgets for the Energy Department’s “biological and environmental research” because it’s “duplicative” of industry efforts. They say that the department has taken on a “venture capitalist role” in research — a role that should be played by actual venture capital firms. Their concerns echo a wider belief that business should fund science and government involvement should be limited.

It’s tempting to offload the cost of science onto business, but there are some kinds of research that only government can make possible. This kind of science is often called “basic,” though it’s anything but.

At the Department of Energy’s Joint Genome Institute (JGI), scientists are doing crucial research that could vastly enrich our economy over the next 50 years. At least, that’s their goal. The problem is that this kind of work could go nowhere. That makes it a bad business investment, though a necessary investment in our future. So the problem is: How can obscure scientific research — that may one day create huge rewards — be made to seem necessary, relevant and definitely off the table when it comes to drastic budget cuts?

I visited JGI in Walnut Creek, Calif., to try to find out. The institute, which helped decode the human genome in the 1990s, is now focused on studying the DNA of plants and microbes. That research could at some point yield new biofuels and aid environmental cleanup.

JGI director and geneticist Eddy Rubin is a pioneer in the field of “metagenomics,” the study of how the DNA in many creatures can work together to create ecosystems. Right now, he and his team are studying microbes that live in a cow’s rumen, the stomach-like organ that the animals use to break down grasses into fuel. All their results are published publicly online, for scientists and entrepreneurs to mine for ideas and to prevent unnecessary duplication of research.

Rubin knows there’s a belief that federally funded science shouldn’t do what industry could, as the Republican science committee members wrote. “But,” he said, “private industry isn’t going to build supercomputers to study weather. Or giant accelerators to probe the fundamental particles of nature. That’s what the government needs to do.”

And ultimately, this sort of basic research will pay off. “Who would have thought 15 years ago that we would be sequencing individual people’s genomes?” Rubin asked. The genome-sequencing work Rubin helped pioneer in the 1990s has led to promising gene therapies — and the work he’s doing today could lead to an even bigger payoff when it comes to alternative energies.

Rubin’s colleague, physicist-turned-geneticist Dan Rokhsar, is immersed in the genetic code of prairie grasses. Rokhsar heads up JGI’s plant division, and he’s looking for a way to make biofuels out of switchgrass instead of corn. Unlike corn, switchgrass is a perennial, which means that it doesn’t have to replanted season after season, and it can grow in a wide range of habitats.

Imagine using those cow rumen microbes to break down huge fields of switchgrass rapidly. You’d have an ideal biofuel system, created from natural tools that are self-sustaining and don’t emit dangerous toxins.

Unfortunately, Rokhsar noted, we’ve got a long way to go before that’s possible. Unlike humans, who each carry two copies of their genomes in their cells, switchgrass carries four. That makes analyzing the plant’s DNA difficult. Even more difficult will be finding the genes responsible for making switchgrass sequester nitrogen efficiently while growing tall in a variety of climates.

Despite the hard research ahead, the rewards for discoveries could be tremendous. “Let’s say you’ve got a goal that in 20 years, you want to have a much higher usage of biofuels,” Rokhsar said. He did some quick math: “We spend over $1 billion a day on foreign oil. So let’s say that sequencing these genomes now allows some graduate student to clone a gene five years from now because they can look it up in our database. That’s going to accelerate the research. Say that allows us to start using biofuels a month before our 20-year goal. You’ve saved $30 billion from that month alone.” The hope for that kind of dramatic breakthrough fuels the project.

Other JGI scientists, such as Susannah Tringe, director of megagenomics research, explore ways that restoring natural environments can pay off. Tringe studies the bacterial communities beneath the surface of wetlands, in part because she wants to better understand how to restore damaged wetland ecosystems. But she also wants to restore the entire planet. It turns out that some kinds of wetlands can suck carbon out of the air more efficiently than almost any other system on Earth. If she can figure out which wetlands bacterial communities are responsible for carbon sequestration, maybe those bugs could be used throughout the world to scrub the atmosphere.

Tringe has just received a $2.5 million grant to study wetland microbial communities for the next five years. She can’t imagine how she’d do this work if she had to rely on private funding and had to turn her discoveries into trade secrets. “If your goal is to improve the environment, then keeping a secret of how to do it doesn’t get you very far,” she said.

Annalee Newitz is the editor of the blog and is writing a book about how humans will survive the next mass extinction.