23Surveillance of drug-resistant bacteria is essential for healthcare providers to deliver effective 24 empiric antibiotic therapy. However, traditional molecular epidemiology does not typically occur 25 on a timescale that could impact patient treatment and outcomes. Here we present a method 26 called 'genomic neighbor typing' for inferring the phenotype of a bacterial sample by identifying 27 its closest relatives in a database of genomes with metadata. We show that this technique can 28 infer antibiotic susceptibility and resistance for both S. pneumoniae and N. gonorrhoeae. We 29 implemented this with rapid k-mer matching, which, when used on Oxford Nanopore MinION 30 data, can run in real time. This resulted in determination of resistance within ten minutes 31 (sens/spec 91%/100% for S. pneumoniae and 81%/100% N. gonorrhoeae from isolates with a 32 representative database) of sequencing starting, and for clinical metagenomic sputum samples 33 (75%/100% for S. pneumoniae), within four hours of sample collection. This flexible approach has 34 wide application to pathogen surveillance and may be used to greatly accelerate appropriate 35 empirical antibiotic treatment. 36
45The molecular epidemiology of infectious disease allows us to identify high-risk pathogens and 46 determine their patterns of spread, on the basis of their genetics or (increasingly) genomics. 47Conventionally such studies, including outbreak investigations and characterization of novel 48 resistant strains, have been conducted in retrospect, but this has been changing with the 49 availability of new and increasingly inexpensive sequencing technologies 2,3 . The wealth of data 50 generated by genomics is promising but introduces a new challenge: while many features of a 51 sequence are correlated with the phenotype of interest, few are causative. 52 53 Prescription, however, has long been informed by correlative features when causative ones are 54 difficult to measure, for example whether the same syndrome or pathogen occurring in other 55 patients from the same clinical environment have responded to a particular antibiotic. This has 56 also been observed at the genetic level as well, as a result of genetic linkage between resistance 57 elements and the rest of the genome. An example is given by the pneumococcus (Streptococcus 58 pneumoniae). The Centers for Disease Control have rated the threat level of drug-resistant 59 pneumococcus as 'serious' 4 . While resistance arises in pneumococci through a variety of 60 mechanisms, approximately 90% of the variance in the minimal inhibitory concentration (MIC) 61 for antibiotics of different classes can be explained by the loci determining the strain type 5 , even 62 though none of these loci themselves causes resistance. Thus, in the overwhelming majority of 63 cases, resistance and susceptibility can be inferred from coarse strain typing based on population Results 81 82 Resistance is associated with clones in S. pneumoniae and N. gonorrhoeae 83 84 To quantify the association of clones with antibi...