dataesr/scientific-paragraphs-categorization huggingface dataset:
These infections mostly originate in other countries, and can in principle provide informative, if informal, sentinel surveillance for pathogen populations in countries with strong travel and/or immigration links to those with routine sequencing  (Ingle et al. , 2019). Indeed, for some countries and regions, travel data represented most or all of the available genome data (see Table  2, S4 ). In this study, where multiple data sources were available for the same country, we found that national genotype and AMR prevalence estimates for the period 2010-2020 were largely concordant between local surveillance studies and travel-associated cases captured elsewhere (Figs 6-7, S12-13), particularly when comparing contemporaneous annual prevalence estimates (Figs  6, 7c ). This shows clearly that travel-associated Typhi isolated in low burden countries can be informative for surveillance of some high burden countries, which should serve as incentive for public health reference laboratories to share their data to the fullest extent they are able to under local regulations.
Another key limitation stemming from the post hoc nature of this study is that it is hard to assess how representative the prevalence estimates are for a given region/country and timeframe. The GTGC has developed new source/metadata standards for Typhi (see Methods), that include information on the purpose of sampling, which were completed by the original owners of each dataset (data available in Table  S2 ). Such 'purpose-of-sampling' fields are currently lacking from metadata templates used for submission of bacterial genomes to the public sequencing archives (e. g. NCBI, ENA), and our approach was modelled on that established for sharing of SARS-CoV-2 sequence data, designed by the PHA4GE consortium  (Griffiths et al. , 2022). In this study, the purpose-of-sampling information was used to identify the subset of genome data that could be reasonably considered to be representative of national annual trends in genotype and AMR prevalence for public health surveillance purposes (n=9,478 genomes post 2010; Figs  1 2 3 ).
However, the high rates of CipNS in Kenya (53%) and Nigeria (40%) are concerning, especially given the increasing usage of fluoroquinolones in these countries (estimated 2. 1 DDD/1,000/day in 2018 in Kenya and 2. 76 DD/1,000/day in Nigeria)  (Browne et al. , 2021) , which could potentially drive local emergence and spread of CipR. While resistance to azithromycin and ceftriaxone have been detected (Table  3 , Figures  4, 5 , 6b, S5, S6, S8), their prevalence remains low and, with the exception of XDR 4. 3. 1. 1. P1, clonal expansion of resistant variants has not been observed. To our knowledge, there are no data reported on the fitness cost of acrB mutations or CefR plasmids in Typhi; however, the genomic evidence suggests a higher fitness cost compared with QRDR mutations, providing further support for the use of ceftriaxone or azithromycin over ciprofloxacin as we work to introduce preventative measures.
Gavi, the Vaccine Alliance, has committed funds to support the procurement and distribution of TCVs in typhoid endemic countries (Gavi: The Vaccine Alliance, n. d. ). Four countries have undertaken Gavi-supported national introductions (Pakistan, Liberia, Zimbabwe, Nepal) and one country has self-financed a national introduction (Samoa)  (Neuzil, 2020; Sikorski, 2020). In Pakistan and Zimbabwe, TCV introduction was stimulated by the occurrence of AMR Typhi outbreaks in major urban centres, highlighting that the case for prevention can be stronger when curative therapy is less available. Additional support is likely required to inform TCV decision-making in other typhoid endemic countries, particularly where burden and AMR data are scarce. With increasingly limited treatment options, vaccines are an even more important tool to mitigate the public health burden of AMR Typhi, both through the prevention of drug-resistant infections and through broader, indirect effects, like reduction of empiric antimicrobial use leading to reduced selection pressure.
While TCVs have been shown to be highly effective against drug-resistant Typhi  (Batool et al. , 2021; Yousafzai et al. , 2021) , public health policymakers have to weigh the value of TCVs against other competing immunisation priorities. While TCV introduction is scaled up globally, antimicrobial stewardship should also be prioritised. Aggregated, representative data showing distribution and temporal trends in AMR can inform local treatment guidelines to extend the useful lifespan of antimicrobials licensed to treat typhoid fever, potentially including reverting to former last-line drugs in some settings. The traffic light system presented in this analysis (see Figures  2  and S5 ) provides a framework for monitoring trends in AMR and adjusting empiric therapy guidelines accordingly. Genomic surveillance has a particularly important role to play in monitoring for changes in clinically important resistances in Typhi, as a shift in resistance mechanism or early evidence of clonal spread, which can only be identified definitively using WGS, could provide early warning of a likely increase in prevalence.
This study provides an analytical framework for Typhi genomic analysis, based on an open, robust, reproducible data flow and analysis framework leveraging open-access online data analysis platforms (Typhi Mykrobe for read-based genotyping  (Ingle et al. , 2022) ; the GHRU pipeline for genome assembly  (Underwood, 2020) , and Typhi Pathogenwatch for assembly-based genotyping and tree-building  (Argimon et al. , 2021) ). We have made available all data processing and statistical analysis code, and underlying sequence and metadata, via GitHub and FigShare (see Methods). Together, these provide (i) a comprehensive data and code resource for the research and public health communities interested in typhoid surveillance data; (ii) a model for the inclusion of WGS in project-based or routine surveillance studies of typhoid that can be readily replicated and adapted; and (iii) a sustainable model for aggregated analysis of typhoid genomic surveillance data that can readily incorporate new data and extract features (genotypes, AMR determinants, plasmid replicons) of importance to clinical and public health audiences.
Notably, this Consortium-driven effort shows that new insights can be gained from aggregated analysis of published data, which were not evident from the individual contributing studies, for example (i) the XDR strain 4. 3. 1. 1. P1 existed in Pakistan in 2015, a year earlier than previously reported (Figure  4 ); (ii) the CefR+CipR strain reported in Mumbai  (Argimón et al. , 2021; Jacob et al. , 2021b)  has persisted between at least 2015-2020 and is now more easily identified as 4. 3. 1. 2. 1 with bla SHV-12 ; (iii) persistence of MDR in certain settings is correlated with migration of MDR from plasmid to chromosome (Figure  S11 ), which has implications for the future persistence and potentially spread of ESBL strains. This dataset provides clear, actionable information about the distribution and temporal trends in AMR across multiple countries and regions.
Phoba et al. , 2017; 2= Lagrada et al. , 2022; 3=Hendriksen et al. , 2015; 4= Tanmoy et al. , 2018; 5= Djeghout et al. , 2018; 6=Guevara et al. , 2021; 7=Sah et al. 2019; 8=Klemm et al. 2018; 9=da Silva et al. 2022; 10=Nair et al. 2021   Based on assumed acute cases isolated from untargeted sampling frames from 2010 onwards, with known country of origin (total N=9,478 genomes). (a) Genotype prevalence by world region, 2010-2020. Countries contributing data are shaded in beige, and are grouped by regions as defined by the UN statistics division. (b) Annual genotype prevalence for countries with ≥50 genomes where typhoid is endemic. In both plots, colours indicate prevalence of Typhi genotypes, as per inset legend. Genotypes not exceeding 20% frequency in at least one country are aggregated as 'Other'.
Full data on regional and national genotype prevalences, including raw counts, proportions and 95% confidence intervals, are given in Tables  S5  and S6 , respectively. Core-genome distance-based neighbour-joining tree generated in Pathogenwatch, using all genomes from  (Klemm et al. , 2018)  (the first genomic characterisation of the XDR outbreak clade, including outbreak strains and local context strains from Sindh Province in 2016-2017) and  (Rasheed et al. , 2020)  (genomics report of XDR outbreak strains from Lahore in 2019). Tree tips are coloured by genotype, according to inset legend; the 2015 strain Rwp1-PK1 is labelled in the tree and indicated with a triangle. Year of isolation and presence of AMR determinants are indicated in the heatmap, according to inset legend. S9  for three-letter laboratory code master list.
Acknowledgements ZAD received funding from the  European Union 's  Horizon 2020 research and innovation programme  under the  Marie Sklodowska-Curie  grant agreement No  845681. MAC is affiliated to the  National Institute for Health Research Health Protection Research Unit (NIHR HPRU)  in Genomics and Enabling Data at  University of Warwick  in partnership with the  UK Health Security Agency (UKHSA) , in collaboration with  University of Cambridge  and Oxford. The views expressed are those of the author(s) and not necessarily those of the  NIHR , the  Department of Health and Social Care , the UKHSA, or the  U. S. Centers for Disease Control and Prevention. RAK, TM and GT were supported by the  Bill & Melinda Gates Foundation (BMGF)  grant  OPP1217121  and the  BBSRC   Institute Strategic Programme   BB/R012504/1  and its constituent project  BBS/E/F/000PR10348.
AJP acknowledges funding support from the  WHO and Gavi , the  Vaccine Alliance. DMA notes support from the  NIHR Global Health Research Unit on Genomic Surveillance of AMR. RSH is a  NIHR  Senior Investigator. AMS is supported by the  SEQAFRICA  project, funded by the  Department of Health and Social Care's Fleming Fund using UK  aid. INO acknowledges support from the  UK NIHR Global Health Research Unit   on Genomic Surveillance of Antimicrobial Resistance Consortium   Award   NIHR  (project # 16/136/111 ), the  UK Medical Research Council/ Department for International Development   African Research Leaders Award : ( MR/L00464X/ ), and a  Calestous Juma Fellowship  from the  Bill and Melinda Gates Foundation  ( INV-036234 ). DAR has received support from  NIH ,  NIAID , and the  United States Department of Health and Human Services  (grant  U19AI110820 ).
The ANOSPP amplicon panel is a genus-wide targeted sequencing panel to facilitate large-scale monitoring of Anopheles species diversity. Combining information from the 62 nuclear amplicons present in the ANOSPP panel allows for a more nuanced species assignment than single gene (e. g. COI) barcoding, which is desirable in the light of permeable species boundaries. Here, we present NNoVAE, a method using Nearest Neighbours (NN) and Variational Autoencoders (VAE), which we apply to k-mers resulting from the ANOSPP amplicon sequences in order to hierarchically assign species identity. The NN step assigns a sample to a species-group by comparing the k-mers arising from each haplotype's amplicon sequence to a reference database. The VAE step is required to distinguish between closely related species, and also has sufficient resolution to reveal population structure within species.
Ethanol is then added again to the mosquito carcass to preserve the mosquito and enable morphological evaluation of any individual post-sequencing. A dilution of the lysate is made, which is then PCR amplified with a cocktail of 64 primer pairs in a single well through a two-step process  (Makunin et al. 2022). A single Illumina library is generated containing amplified and bar-coded material pooled from 768 samples, then sequenced on a single Illumina MiSeq lane. The ANOSPP panel originally used a species assignment method based on alignment distances, using static sequence similarity thresholds fitted per target  (Makunin et al. 2022). Using this method, amplicons contain sufficient information to distinguish between the majority of the 56 species represented in the original dataset; only samples within some species complexes could not be accurately assigned.
However, this method was only tested on a small dataset and the test set was also used as the training set to form the haplotype clusters. Additionally, some targets were extremely divergent between different groups of samples in the dataset and the distances for these targets appear to be sensitive to the choice of alignment algorithm. Here we present a new species assignment method that we call NNoVAE, which is a k-mer based method consisting of an initial step using Nearest Neighbours (NN) that identifies samples down to a species or, in some cases, a species complex, and a second step using a Variational Autoencoder (VAE) for species identification within a species complex. The VAE in the second step is specifically trained on the species complex to which test samples get assigned by the NN step.
The complex-specific VAE is required because the similarity between closely related species is too close to detect with a general purpose method like the NN step. Both assignment steps in NNoVAE work on the same k-mer tables. NCBI GenBank's BLAST  (Altschul et al. 1997 ) can be used to assess the similarity of any sequence to those within any INSDC database such as NCBI GenBank  (Benson et al. 2018). BLAST works on a single query at a time, and does not assign species directly, but rather reports the best hits of the query sequence alongside p-values based on the alignment score corrected for the size of the database. Similarly, the standard search methods for BOLD  (Ratnasingham and Hebert 2007)  performs species assignment based on a threshold of percent identity between the test sample and the samples in the reference database.
The threshold is informed by extensive knowledge of the divergence of the single marker cytochrome oxidase subunit I (COI) between different species. In addition, the BOLD analysis toolkit contains a NN method to explore the relationship between multiple species in the database. Like BLAST and the BOLD toolkit, the NN step of NNoVAE uses sequence-based distances between the haplotypes of test samples and samples in a reference database; however this is performed across all amplicons and uses k-mer distances instead of alignments. By using k-mers, we avoid the issues associated with alignment of highly divergent sequences and moreover are able in a natural way to use short indels and small structural variants as well as SNPs. NNoVAE aims to assign species identity and simultaneously collect information about the relationship of the test sample to different species or species-groups in the database, which is particularly useful when the test sample is of a species not represented in the database.
In contrast, NNoVAE is k-mer based, making it robust to alignment ambiguity and enabling it to efficiently make use of all the available sequencing data. With the application of the NNoVAE method to data resulting from the ANOSPP panel, we aim to create a robust and efficient platform for molecular species identification within the entire Anopheles genus. We present a method that can assign individuals to any of the 62 species currently represented in the reference database as well as taxonomically place species not yet represented. We will include more samples from more species in the reference database as they are sequenced by the amplicon panel, so as to represent the full diversity of the Anopheles genus. NNoVAE also indicates the uncertainty of the assignment and provides information on other closely related species in the dataset, so in particular can flag potential hybrids.
Panel sequences The amplicon sequencing data are processed as described previously  (Makunin et al. 2022). In brief, the fastq files containing the reads are split into one file per target by cutadapt v2. 5  (Martin 2011) , which uses the primer sequences to do so. Cutadapt also filters for read pairs where both the forward and reverse read match the appropriate primer and trims the primers. Next, DADA2 v1. 10 (Callahan et al. 2016 ) is used to reconstruct sample haplotypes from these read pairs and they are filtered using a custom script to include only haplotypes supported by at least 10 read pairs and with at least 0. 1 haplotype frequency per sample-amplicon pair.
Next, the unitigs are merged using the information from the assembly graph with a custom python script, which relies on MAFFT v7. 475  (Katoh and Standley 2013)  for sequence alignment. In the final step, the primers are trimmed from the resulting haplotypes by cutadapt and any haplotypes that do not have primer sequences on both ends are removed, which helps to get rid of contamination. If the genomic coordinates of the primers are not known, we align the samples to the most appropriate reference genome, identify the genomic coordinates of the primer sites if not yet known and follow the steps above. This pipeline is implemented in Snakemake 5. 30. 2  (Mölder et al. 2021). Snakefile and scripts are available on GitHub.
Implementation Species labels are assessed and species-groups constructed using custom Python scripts implemented in python 3. 8 (Van Rossum and Drake 2009). The VAE is implemented in keras 2. 3 (Chollet and Others 2015) using a custom python script. Convex hull construction and distance computations rely on scipy 1. 6  (Virtanen et al. 2020 ) and pygel3d 0. 2  (Baerentzen 2018). Plots are created with matplotlib 3. 3 (Hunter 2007) and seaborn 0. 11  (Waskom 2021). All scripts and environments are available on GitHub.
K-mers Alignments of amplicon target sequences from highly diverged species are often poor and it is difficult to define a 'fair' distance metric based on these alignments. Moreover, there is not a straightforward way to account for small indels and structural variants with alignment based distances. K-mer based distances naturally incorporate indels and structural variation and account for highly diverged sequences in an objective way and provide a solution to the problems arising from relying on alignments. Therefore, our species assignment method uses k-mers to support better comparisons between the sequences in the database and the sequences of the test sample. There is a trade-off in the choice of k. For large k there is little tolerance for errors, while for small k there is a high chance that the same k-mer is found in multiple locations in the sequence.
Results and Discussion Reference database construction Species assignment methods commonly work by comparing a query sequence to a reference database  (Ratnasingham and Hebert 2007; Benson et al. 2018). The completeness and quality of the reference database heavily influence the accuracy of the assignment method. The reference database we constructed consists of well-curated samples sequenced with the panel, in silico extracted reference genomes, and in silico extracted whole genome short read data. As we expect that the reference database will expand to include additional species and populations over time, we assign a version number to the database. The reference database described here, which we call NNv1, contains 186 samples, representing 62 species spread over 4 subgenera. The dataset from  (Makunin et al.
2022)  forms the backbone of the reference panel. In addition, six species in the An. gambiae complex have been included from publicly available whole genome data (The Anopheles gambiae 1000 Genomes Consortium 2021;  Fontaine et al. 2015)  in order to increase the resolution in a group of hard to distinguish species. To maintain the advantages of multi-locus assignment, we required samples to have at least 10 targets amplified to be included in the reference database. Ideally, the database would contain several specimens per species to represent within species variation. This is particularly important for species with a wide geographical range. The amplicon panel is designed to improve accuracy of species assignments over morphological or single-marker methods. However, the species labels supplied by our sample partners were in most cases obtained by the latter methods, hence it was necessary to reconfirm them.
All label information for the reference database NNv1 is listed in Supplementary Table  1 , and the assignment of species labels is discussed in more detail (Supplementary Information Section 1), but we present an outline of the principles we used here. For most samples sequenced by the amplicon panel, two molecular barcodes (COI and ITS2) were also sequenced and compared to the sequences available in BOLD  (Ratnasingham and Hebert 2007)  and NCBI  (Benson et al. 2018). Here, we used the barcode information as well as the pairwise k-mer distances between samples in the reference database NNv1 to generate a consensus species label for each sample. A few samples show inconsistencies between their partner labels, molecular barcodes and amplicon assignments; these samples were also removed or flagged as overly diverged in  Makunin et al.
(2022). For these samples the distances to samples of the same species label is much larger than the distance to some other samples in the database, suggesting they were mislabelled. In some cases there is additional evidence from molecular barcodes and it was possible to relabel them to the species they match. Other samples are clearly different from samples with the same species label, but do not clearly belong to any other species in the database. These are labelled as the species-group they belong to appended by '_sp1', '_sp2', etc. Hopefully, by extending the reference database in the future, we can get a better understanding of which species such samples represent. For some closely related species, the different species labels were supported neither by the pairwise-distances nor by the barcodes.
Species-groups construction The species-groups are defined based on the pairwise k-mer distances between samples in the reference database NNv1 and make use of the consensus species labels discussed above. The k-mer distance between two samples, s 1 and s 2 , is defined as , where T i is the set of targets amplified in sample i 𝑑 𝑠,𝑘 𝑠 1 , 𝑠 2 ( ) = 1 𝑇 1 ∩𝑇 2 | | 𝑡∈𝑇 1 ∩𝑇 2 ∑ 𝑞 1 ∈𝑄 1,𝑡 ∑ 𝑞 2 ∈𝑄 2,𝑡 ∑ 𝑑 𝑘 𝑞 1 ,𝑞 2 ( ) 𝑄 1,𝑡 | | 𝑄 2,𝑡 | | and Q i,t is the set of unique haplotypes of sample i at target t. So in words, for a given target the k-mer distance between two samples is the mean k-mer distance between all pairs of haplotypes from the two samples; e. g. if sample s 1 is homozygous and s 2 heterozygous at target t, then the k-mer distance at target t between these samples is the mean of the k-mer distance of the haplotype from s 1 compared to the first haplotype from s 2 and the k-mer distance of the haplotype from s 1 compared to the second haplotype from s 2.
If a sample has more than two alleles at a single target, we take into account all haplotypes according to the above definition. The k-mer distance between two samples is defined as the average of the k-mer distance between these samples at all the targets that were amplified in both samples. Figure  1  shows the pairwise k-mer distances between all samples in the reference database. The samples are ordered roughly by phylogeny (as in the tree in Figure  2 ) and this results in a visible structure in the distance plot. One can observe dark triangles below the diagonal, reflecting that samples of the same or closely related species have a smaller 8-mer distance to each other than to other samples. This effect repeats itself on different scales, mirroring the multi-level structure in the phylogenetic tree.