We found three genes, namely BATF, ISG15 and DNMT1, which can distinguish viral from bacterial infections in a wide range of cohorts including different pathogens, ages and populations, and with potential to become clinical biomarkers for infectious diseases in a clinical setting. Here, BATF is linked to bacterial infectious disease.