A sputum analysis is often carried out by physicians to determine if you are currently suffering from any bacterial or fungal infection. If you have been under respiratory disorder for a while and the constant coughing is getting steadily worse, then you need to consult your physician right away. This test is often carried out to determine if you currently have any respiratory infection and an early detection of some of the more serious infections such as pneumonia can help you get the treatment you need for the same, during the early onset of the infection.