Sputum testing should include Gram stain, mycobacterial and fungal stains and cultures, and sometimes testing for viruses (eg, polymerase chain reaction for cytomegalovirus in a transplant patient or in a patient with AIDS).