Scat may be a waste product, but it holds crucial clues about an animal’s diet, disease risk and genetic health.