LOS ANGELES — The doctor will see you now – and she has four legs and a tail.

Japanese researchers have trained an 8-year-old Labrador retriever to diagnose colorectal cancer by smelling a patient’s breath and stool. The dog, which previously worked in water rescue, had an overall accuracy of 95 percent when using the breath test and 98 percent for the stool test, according to a study published Monday in the journal Gut.

To train the dog, researchers first let her sniff a breath sample from a patient with colorectal cancer. Then they presented her with a panel of breath samples – one from a cancer patient and four from healthy people. When the dog recognized the sample from the cancer patient, the reward was some quality time with a tennis ball.

In the Gut study, the dog was presented with 36 panels of breath samples. Overall, she correctly identified 91 percent of the samples that were from cancer patients, and she correctly ignored 99 percent of the samples from healthy volunteers.

The dog did a better job evaluating 38 panels of stool samples. In those tests, she correctly flagged 97 percent of the samples from cancer patients and correctly ignored 99 percent of the samples that were disease-free.

“This study presents the first step towards the development of an early detection system using odor materials from patients with … colorectal cancer,” the study authors wrote.

The researchers speculate that the dog’s highly developed sense of smell allowed her to pick up a whiff of the chemical compounds that are unique to cancer. It’s still unclear whether each cancer has its own chemical signature, or whether the same compounds are present in a variety of cancers. The researchers note, however, that this particular Lab has been able to detect breast, lung, prostate, uterine, ovarian, bladder, gastric, pancreatic, esophageal and bile-duct cancers from breath samples.

There were about 102,900 new cases of colon cancer and 39,760 case of rectal cancer in the United States last year, and 51,370 patients died from the disease, according to the American Cancer Society.

While dogs have previously been shown to identify skin, bladder, lung, breast and ovarian malignancies, canines are too expensive and too fickle to rely on for routine cancer diagnoses, the researchers said.

Labrador retrievers, originally used in Canada to catch fish and pull in nets, now work as guide dogs for the blind, search-and-rescue animals and narcotics detectors, according to the American Kennel Club’s website.