Apparatus and methods are described for use with feces of a subject that are disposed within a toilet bowl. One or more light sensors receive light from the toilet bowl, while the feces are disposed within the toilet bowl. A computer processor detects a set of three or more spectral components that have a characteristic relationship with each other in a light spectrum of bile, by analyzing the received light, and detects a presence of bile within the feces, in response to detecting the set of three or more spectral components. The computer processor generates an output in response thereto. Other applications are also described.