In a bit of high-tech recycling, researchers have developed an innovative way to identify already-approved drugs that may work against diseases they weren't designed to combat.

The scientists have also demonstrated how a couple of such repurposed drugs may have benefits in treating two conditions, inflammatory bowel disease and lung cancer.

Researchers at the Stanford University School of Medicine (from left to right) Marina Sirota, Joel Dudley, and Atul Butte, created a computer program that Mr. Butte likens to an online dating service.

The findings, published in two papers Wednesday in Science Translational Medicine, come as drug companies and the National Institutes of Health are putting greater emphasis on so-called drug repositioning as a way of lowering the costs of drug development and getting therapies to patients more quickly.

There are several examples of medications being developed for one condition and then found to have efficacy in another. Viagra was tested in a cardiac trial and was found to be useful against erectile dysfunction. But rather than rely on such serendipitous discoveries, researchers would like a fast, inexpensive way of identifying potential hits.

Atul Butte, an associate professor of systems medicine in pediatrics at Stanford University School of Medicine, who led the researchers, said they created a computer program he likened to an online dating service, though one that operates on the principle that "opposites attract."

The program, using so-called high-throughput technology, rapidly searched National Institutes of Health public databases containing the results of thousands of genomic studies. The program focused on 100 diseases and 164 drugs where normal and diseased tissue samples, or drugged and nondrugged samples, were compared in the same experiment. The program then looked for cases where a drug created a change in gene activity that was opposite to the gene activity caused by a disease, figuring this might indicate the drug would be an effective treatment.

The researchers found that topiramate, a drug used in epilepsy, might work on inflammatory bowel disease, including Crohn's disease and ulcerative colitis. Another hit suggested that cimetidine, an ulcer drug, might be effective in lung cancer.

They then tested the two generic drugs in small studies using animal models of the diseases. In the bowel-disease study, the drug reduced symptoms, and in the lung-cancer paper, the drug was found to slow tumor growth.

Rochelle M. Long, chief of pharmacological and physiological sciences at the National Institute of General Medical Sciences, which helped fund the studies, said more work was needed to show that the two drugs would indeed benefit patients with the diseases.

Yves A. Lussier, a professor of medicine and engineering at the University of Illinois at Chicago who wasn't associated with the study but co-authored a commentary on it in Science Translational Medicine, said the result in the lung-cancer case wasn't impressive enough for a doctor to prescribe the drug, but was "impressive enough to be improved upon and studied further.

Dr. Long said the papers validated the approach in developing hypotheses. The scientists had no prior information on what might or might not work; they didn't need to go through the long and costly process of developing a cellular model of disease against which to test the drugs; and the computer could rapidly combine vast amounts of data. Drug repositioning always involves a fishing expedition, she said, but "this is really educated fishing.

Dr. Lussier said another advantage of finding repurposed drugs is that, since they are already approved, doctors can prescribe them off-label for patients. "This opens the door to very low-cost, individualized personal therapies, he said.

Pharmaceutical companies have sometimes been reluctant to try drugs for new purposes, fearing that adverse events in a new disease might have repercussions on established indications. But with the cost of bringing a new drug to market in the U.S. sometimes exceeding $1 billion by some estimates, this is a growing area of interest. In April, the NIH held a meeting of academics, government officials and drug companies on how to use drug repurposing more effectively.

NIH director Francis S. Collins wrote in the journal Nature Reviews in June that NIH was seeking to identify abandoned compounds that might work in other diseases and to facilitate agreements to reuse them. One stumbling block is that some compounds are already off-patent, diminishing the financial incentive for a company to pursue it.

One of the papers co-authors is co-founder of a start-up called NuMedii that is seeking to commercialize some of the technology used in the studies. Dr. Butte serves on the scientific advisory board of NuMedii.