Diagnosis of bacterial infection