A stool analysis is a series of tests done on a stool (feces) sample to help diagnose certain conditions affecting the digestive tract . These conditions can include infection (such as from parasites, viruses, or bacteria), poor nutrient absorption, or cancer.