A Gram stain may help identify the type of bacteria that is causing an infection. For a lung infection, your health professional will take a sample of mucus and stain it. This makes bacteria easier to see when viewed through a microscope. The shape and color of the stained bacteria may help identify the type of bacteria that is causing the infection.
The sample of mucus is then tested in the lab to see if the bacteria are able to grow. If bacteria from the mucus grow, other tests can be used to predict which antibiotics will be most effective in treating the infection.
These tests may be done when a health professional needs to identify the organism that is causing the infection. By doing so, the health professional can choose the antibiotic that is most likely to be effective. In most cases, unless there is a clear need to identify the organism, these tests will not be done.
WebMD Medical Reference from Healthwise