dataesr/scientific-paragraphs-categorization huggingface dataset:
Genomic neighbour typing using nanopore sequencing. All reference strains in the database are associated with similarity weights that are set to zero at the start of the run. Each time a new read is read from the stream, k-mer-based matching is applied to identify the strains with the maximum number of matching k-mers (see below). Such strains are nearest neighbours to the read in the database according to the 1/('number of matched k-mers') pseudodistance. The weights of the nearest neighbours are then increased according to the information content of the read, calculated as the number of matched k-mers divided by the number of nearest neighbours. Reads that do not match (that is, 0 matching k-mers in the database) are not used in subsequent analysis. The computed matches are also used for updating the k-mer score (KS), which is the proportion of matched k-mers in all reads.
The KS helps to assess whether a sample is truly matching the database and whether predicting resistance for the database species makes sense. The obtained weights serve as a proxy to the inverted genetic distance and are used as a basis for the subsequent predictions of the lineage and the antibiotic resistance and susceptibility. Predicting lineage. A lineage is predicted as the lineage of the best-matching reference strain; that is, the one with the largest weight. The quality of lineage prediction is further quantified using a lineage score (LS), calculated as LS = 2 f/ (f + t) -1, where f and t denote the weights of the best matches in the first ('predicted') and in the second best ('alternative') lineage, respectively. The values of the LS can range from 0. 0 to 1. 0 with the following special cases: LS = 1.
0 means that all reads were perfectly matching the predicted lineage, whereas LS = 0. 0 means that the predicted and alternative lineages were matched equally well. The LS is used to measure how well a sample matches the identified lineage. If the LS is higher than a specified threshold (0. 6 in default settings), the call is considered successful. If the score is lower than this, the sample cannot be securely assigned to a lineage, and this should draw the attention of the operators. Note that custom RASE databases may require a recalibration of the threshold. Predicting resistance and susceptibility. Resistance or susceptibility is independently predicted for individual antibiotics based on the weights of the strains that belong to the predicted lineage. These are used to calculate a susceptibility score, which is further interpreted by comparing to predefined thresholds.
If the SS is greater than 0. 5, susceptibility to the antibiotic is reported, otherwise non-susceptibility is reported. Hence, resistance is predicted as the resistance of the best match. However, when the SS is within the [0. 4, 0. 6] range, it is considered a low-confidence call, and as such it should draw the attention of the operators; this usually indicates that resistance or susceptibility has recently emerged in the evolutionary history, and genomic neighbour typing may not be able to confidently distinguish between these similar, but phenotypically distinct, strains. Note that the thresholds above might require a further recalibration based on the specific database, antibiotics and application of RASE. S. pneumoniae RASE database. The S. pneumoniae RASE database was constructed using the EUCAST breakpoints  33  for the following antibiotics (mg l -1 ):.
Articles Nature Microbiology ceftriaxone (0. 25), erythromycin (0. 25), benzylpenicillin (0. 06), trimethoprimsulfamethoxazole (1. 00) and tetracycline (1. 00). While we used the above values in the present work, others may be readily defined and the database rapidly updated. This is especially useful in cases where breakpoints may vary depending on the site of infection (as is the case with pneumococcal meningitis and otitis media, for which lower MICs are considered to be resistant  33  ). The draft assemblies were downloaded from the SRA FTP server using the accession codes provided in table 1 in ref. 24. The phylogenetic tree was downloaded from DataDryad (accession no. : https://doi. org/10. 5061/dryad. t55gq). The pneumococcal ProPhyle index was constructed with the k-mer size of k = 18.
The obtained S. pneumoniae RASE database, including the source code and data, is available at https://github. com/c2-d2/rase-db-spneumoniae-sparc. N. gonorrhoeae RASE database. The N. gonorrhoeae RASE database was constructed with the CDC GISP breakpoints  34  for the following antibiotics (mg l -1 ): azithromycin (2. 0), cefixime (0. 25), ciprofloxacin (1. 0) and ceftriaxone (0. 125). Before applying the breakpoints, azithromycin MICs for strains collected before 2005 were doubled to correct for the known inconsistencies of the phenotyping protocol, which were due to a change in formulation of the commercial media  47. The draft assemblies and the phylogenetic tree were downloaded from Zenodo (accession no. : https://doi. org/10. 5281/zenodo. 2618836). The following three prevalent types of plasmids  48  were downloaded from GenBank, localized in the GISP database using BLAST  49  and removed from the dataset: the cryptic plasmid pJD1 (GenBank accession no.
: NC_001377. 1), the beta-lactamase plasmid pJD4 (GenBank accession no. : NC_002098. 1) and the conjugative plasmid pEP5289 (GenBank accession no. : GU479466. 1). The gonococcal ProPhyle index was constructed with the k-mer size of k = 18. The obtained N. gonorrhoeae RASE database, including the source code and data, is available at https://github. com/c2-d2/rase-db-ngonorrhoeae-gisp. k-mer-based matching. Reads were matched against the RASE databases using the ProPhyle classifier  27, 28  (commit b55e026) and its ProPhex component  50, 51. The ProPhyle index stores k-mers of all strains in a highly compressed form, reducing the required memory footprint. In the database construction phase, the k-mers of the strains are first propagated along the phylogenetic tree and then greedily assembled to simplitigs  52.
For these k-mer lengths, RASE indexes were constructed and their performance evaluated using the RASE prediction pipeline and selected experiments. While RASE showed robustness to k-mer length in terms of final predictions, prediction delays differed (Extended Data Fig. 6 ). Based on the obtained timing data, we set the k-mer length to k = 18. Comparison to Kraken. For each RASE database, a fake NCBI taxonomy was generated from the database tree. Then, a library was built using Kraken 31 (v. 1. 1. 1, default parameters) from the same FASTA files as used for building the RASE database. Finally, Kraken databases were constructed for both k = 18 and k = 31. The obtained Kraken databases were used to classify reads from individual experiments. The obtained Kraken assignments were subsequently converted using an ad hoc Python script to RASE-BAM (a subset of the BAM format  53  used by RASE).
Finally, RASE prediction was applied on the BAM files, with the use of the RASE database metadata, and the results compared with the results of the standard RASE with ProPhyle. Measuring time. To determine how RASE works with nanopore data generated in real time, the timestamps of individual reads were extracted using regular expressions from the read names. These were then used for sorting the base-called nanopore reads by time. When the RASE pipeline was applied, the timestamps were used for expressing the predictions as a function of time. The times of ProPhyle assignments were also compared to the original timestamps to ensure that the prediction pipeline was not slower than sequencing. When timestamps of sequencing reads were not available (that is, the gonococcal WHO data and clinical samples), RASE estimated the progress in time from the number of processed base pairs.
Lower time estimates on resistance gene detection. A complete genome of the multidrug-resistant SP02 isolate was assembled from the nanopore reads using CANU  56  (v. 1. 5, default parameters). Before the assembly step, reads were filtered using SAMsift 57 based on the matching quality with the pneumococcal RASE database: only reads at least 1,000-bp long with at least 10% 18-mers shared with some of the reference draft assemblies were used. The obtained assembly was further corrected using Pilon 58 (v. 1. 2, default parameters) and Illumina reads from the same isolate (taxid 1QJAP in the SPARC dataset  24  ) mapped to the nanopore assembly using BWA-MEM  59  (v. 0. 7. 17, default parameters) and sorted using SAMtools  53. The obtained assembly was searched for resistance-causing genes using the online CARD tool  16  (as of 1 Aug 2018).
All of the original nanopore reads were then mapped using Minimap2 (v. 2. 11, with '-x map-ont')  60  to the corrected assembly, and resistance genes in the reads were identified using BEDtoolsintersect  61  (v. 2. 27. 1, with '-F 95'). Timestamps of the resistance-informative reads were extracted and associated with the genes. Only reads longer than 2 kbp were used in the analysis. Evaluation of the N. gonorrhoeae WHO samples. To evaluate the predictions of the WHO samples, we inferred a phylogenetic tree from a dataset comprising both the GISP isolates and the WHO isolates. First, reads were downloaded for the GISP isolates (NCBI BioProject no. : PRJEB2999 and PRJEB7904) and for the WHO isolates F-P (NCBI BioProject no. : PRJEB4024). For the WHO isolates U-Z, read data were simulated from the finished de novo assemblies (NCBI BioProject no.
: PRJEB14020) using Art-Illumina 62 (v. 2. 5. 1). Reads were mapped to the NCCP11945 reference genome (GenBank accession no. : CP001050. 1) using BWA-MEM  59  (v. 0. 7. 17) and deduplicated using Picard 63 (v. 2. 8. 0). Pilon 58 (v. 1. 16, with '-mindepth 10-minmq 20') was used to call variants and further filtered to include only 'pass' sites, and sites where the alternative allele was supported with AF > 0. 9. Gubbins 64 (v. 2. 3. 4) with RAxML 65 (v. 8. 2. 10) were run on the aligned pseudogenomes to generate the final recombination-corrected phylogeny (Supplementary Data 1). The closest relatives identified by RASE were verified using the obtained tree. For every WHO isolate, the obtained RASE prediction was compared to the closest GISP isolate on the tree. Library preparation. For isolates SP01-SP06, cultures were grown in Todd-Hewitt medium with 0.
MinION sequencing. Sequencing was performed on a MinION MK1 device using R9. 4/FLO-MIN106 flow cells according to the manufacturer's instructions. For experiments SP01-SP06, base calling was performed using ONT Metrichor (v. 1. 6. 11 (SP01), v. 1. 7. 3 (SP02), v. 1. 7. 14 (SP03-SP06)) simultaneously with sequencing, and all reads passing Metrichor quality check were used in the further analysis. For experiments SP07-SP12, the ONT MinKNOW software (v. 1. 4-1. 13. 1) was used to collect raw sequencing data, and ONT Albacore (v. 1. 2. 2-2. 1. 10) was used for local base-calling of the raw data after sequencing runs were completed. For experiments GC01-GC05, ONT MinKNOW software was used to collect raw sequencing data, and ONT Albacore (v. 2. 3. 4) was used for local base-calling. Testing resistance phenotype.
Acknowledgements This work was supported by the  Bill & Melinda Gates Foundation  ( GCGH GCE OPP1151010  to K. B. and W. P. H. ), the  NIH-National Institute of Allergy and Infectious Diseases  ( R01 AI106786-05  to K. B. ), the  Canadian Institutes of Health Research  ( MFE 152448 , a fellowship grant, to R. S. L. and D. R. M. ), the  NSF  (GRFP to K. C. M. ), and the  David and Lucile Packard Foundation  (to M. B. ). This paper presents independent research funded by the  National Institute for Health Research (NIHR)  under its  Programme Grants for Applied Research Programme  (reference no. RP-PG-0514-20018  to J. O. ), the  UK Antimicrobial Resistance Cross Council Initiative  ( MR/N013956/1  to J. O. ), the  Rosetrees Trust  ( A749  to J. O. ), the  Biotechnology and Biological Sciences Research Council (BBSRC)   Institute Strategic Programme Microbes in the Food Chain  ( BB/R012504/1  and its constituent projects  BBS/E/F/000PR10348  and  BBS/E/ F/000PR10349  to J.
Code availability RASE was developed using Python, GNU Make, GNU Parallel 69 , Snakemake  70  and the ETE 3 (ref. 71 ) and PySam 53 libraries, and was based on ProPhyle  27, 28  (commit b55e026). Bioconda 72 was used to ensure reproducibility of the software environments. The core RASE package and RASE documentation are available at https://github. com/c2-d2/rase. The prediction pipeline is available at https://github. com/c2-d2/rase-pipeline. Codes for constructing the S. pneumoniae and N. gonorrhoeae RASE databases are available at https://github. com/c2-d2/rasedb-spneumoniae-sparc and https://github. com/c2-d2/rase-db-ngonorrhoeae-gisp, respectively. A skeleton for creating new databases is available from https://github. com/c2-d2/rase-db-skeleton.
Data availability The analyses in the paper were performed using the following RASE databases: "N. gonorrhoeae GISP USA v1. 4" (available at https://github. com/c2-d2/rase-dbngonorrhoeae-gisp/releases) and "S. pneumoniae SPARC USA v1. 3" (available at https://github. com/c2-d2/rase-db-spneumoniae-sparc/releases). Nanopore reads for all experiments from this study have been deposited in Zenodo with the accession code 10. 5281/zenodo. 3346055; for the metagenomic experiments (SP07-SP12), only the filtered datasets were made publicly available (that is, after removing the remaining human reads in silico to comply with privacy policies). Additional supplementary materials are available at https://github. com/c2-d2/rasesupplement.
Studying the ecology of photosynthetic microeukaryotes and prokaryotic cyanobacterial communities requires molecular tools to complement morphological observations. These tools rely on specific genetic markers and require the development of specialised databases to achieve taxonomic assignment. We set up a reference database, called µgreen-db, for the 23S rRNA gene. The sequences were retrieved from generalist (NCBI, SILVA) or Comparative RNA Web (CRW) databases, in addition to a more original approach involving recursive BLAST searches to obtain the best possible sequence recovery. At present, µgreen-db includes 2,326 23S rRNA sequences belonging to both eukaryotes and prokaryotes encompassing 442 unique genera and 736 species of photosynthetic microeukaryotes, cyanobacteria and non-vascular land plants based on the NCBI and AlgaeBase taxonomy.
When PR 2 / SILVA taxonomy is used instead, µgreen-db contains 2,217 sequences (399 unique genera and 696 unique species). Using µgreen-db, we were able to assign 96% of the sequences of the V domain of the 23S rRNA gene obtained by metabarcoding after amplification from soil DNA at the genus level, highlighting good coverage of the database. µgreen-db is accessible at http://microgreen-23sdatabase. ea. inra. fr. Photosynthetic microeukaryotes and cyanobacteria can be found in diverse aquatic and terrestrial habitats thanks to their advanced abilities to adapt to a range of challenging conditions, including extreme environments such as polar regions or deserts (e. g. , soils, marine water, freshwater and brackish water, air, plants, and animals) 1-5. These ubiquitous microorganisms play essential ecological roles in the global carbon and nitrogen cycles and also contribute to the production of atmospheric oxygen.
, UniEuk, EukRef) are currently underway to propose a classification of microbial eukaryotes that will serve as a reference for a universal taxonomy  [47] [48] [49]. The proposed tools are mainly deployed on the 18S rRNA gene that targets eukaryotic photosynthetic organisms but does not target cyanobacteria. Metabarcoding still remains the fastest and cheapest method to study microbial diversity and community structure. However, it requires reference databases, updated with a good coverage of organisms, a high level of sequence quality, and curated taxonomy to achieve the taxonomic assignment of the retrieved sequences  50. There already exist several generalist or specialist databases that include groups of photosynthetic microeukaryotes and cyanobacteria with curated taxonomy. The most popular databases are (i) SILVA, that groups SSU and LSU rRNA genes from eukaryotic and prokaryotic organisms 51 , (ii) PR 2 , a protist small subunit ribosomal reference database  52  , (iii) PhytoREF, a reference database of the plastidial 16S rRNA gene of photosynthetic eukaryotes 53 , (iv) R-Syst::diatom, that gathers the 18S rRNA gene and rbcL diatom sequences  54  , and (v) DINOREF, a reference database of the 18S rRNA of dinoflagellates  55.
Sherwood et al. 31  recently made available a database (http://scholarspace. manoa. hawaii. edu/handle/10125/42782) that groups 97,194 UPA and LSU amplicon sequences from their own project, including sequences not found in SILVA. However, these sequences are mainly assigned to the Bacteria domain (75% of the total sequences with only <1% assigned to Cyanobacteria), whilst within the 10% of eukaryotic sequences, 80% are associated to the Metazoa group. Moreover, the taxonomy is not fully standardised and therefore difficult to use for HTS analyses. A reference database of the UPA marker exists; it only contains taxa related to photosynthetic microeukaryotes and cyanobacteria, as well as standardized taxonomy. However, it includes far fewer sequences (573) than the other UPA databases described above  56.
Thus, to our knowledge, no 23S rRNA database exists to date that meets all the essential criteria (i. e. , good coverage of organisms, good sequence quality, curated taxonomy) for the molecular study of photosynthetic microeukaryote and cyanobacterial communities. We propose a new reference database of 23S rRNA gene sequences in eukaryotes and cyanobacteria, called µgreen-db. It was constructed from various sources (SILVA, CRW, BLAST, or sequences extracted from genomes) so as to be the most representative one available. When possible, the complete sequence of the 23S rRNA gene is provided, allowing users to create their own primers for environmental metabarcoding studies. The overall taxonomy associated with the sequences is based on the PR 2 /SILVA, or NCBI or AlgaeBase databases. In µgreen-db, sequences of non-vascular land plants are also provided to improve the study of photosynthetic microeukaryote and cyanobacterial communities in soil environments where mosses and liverworts (Bryophytes) can be abundant.
Taxonomic validation -taxonomic composition of μgreen-db. Following the initial retrieval of the database sequences in June 2016, a further update of the entire taxonomy was completed using NCBI in August 2018. During this update we encountered three scenarios for each sequence, i. e. , (i) no change in taxonomy, (ii) obsolete accession number (8 sequences), or (iii) removal or loss of the accession number (2 sequences). In the case of (ii), we updated the accession number, while in the case of (iii), we removed these particular sequences from our database. Taxonomic coverage (corresponding to the percentage of sequences for a given rank) was higher with AlgaeBase than with NCBI (Fig. 2 ). Coverage at the class and genus levels was slightly better with PR 2 /SILVA than with AlgaeBase. For sequences assigned from the NCBI database, we obtained 88.
3% of Cyanobacteria, 97% of photosynthetic microeukaryotes, and 92. 8% of non-vascular land plants. To finalise our database, we used the universal primer pair to amplify the 23S rRNA V region (UPA)  44, 57  in our database. We obtained 1,500 of the 2,366 sequences with a PCR in silico (Supplementary Fig. S1 ). Several formatted files were generated for metabarcoding data analysis (https://zenodo. org/record/3385760#. XW-NptPVLUI). Description of the µgreen-db web interface. µgreen-db is also available via a web interface (http:// microgreen-23sdatabase. ea. inra. fr). Access to all data is provided via this interface and simply allows searches for taxa of interest. Using this website, one can also download the latest sequence files with NCBI-, AlgaeBase-or PR 2 /SILVA-based taxonomies in various formats compatible with the commonly used bioinformatic pipelines.
Finally, information on the construction of this database, statistics and news are also accessible through this website. Illustration of the application of µgreen-db for the study of complex soil phototrophic microbial communities. We tested the ability of µgreen-db to assign sequence datasets generated from a set of indigenous soil phototrophic microbial communities obtained from a soil exposed to two contrasted light conditions (dark vs. light). The Shannon diversity indices calculated from the OTU dataset highlighted higher diversity under the dark condition than under the light condition (H' = 3. 1 ± 0. 1 vs. H' = 2. 6 ± 0. 1, respectively) (Table  S1 ). This decrease in diversity was associated to a lower richness (441. 3 ± 41. 2 vs. 378. 3 ± 31. 4 OTUs) and a lower evenness (0. 51 ± 0.
01 vs. 0. 43 ± 0. 02) of the community after exposure to light. Interestingly, µgreen-db correctly affiliated 98. 5% and 96% of the sequence datasets at the phylum and genus levels, respectively. The taxonomic affiliation of the sequences also revealed a broad diversity of the phototrophic soil microbial community, with 11 phyla and 149 unique genera detected. As observed for the diversity metrics, light conditions significantly shaped the composition of the phototrophic community. Most markedly, Cyanobacteria became highly dominant at the phylum level, increasing from 4 ± 2. 4% to 72. 0 ± 1. 8% of the assigned sequences after exposing the soil to light (Fig. 4A ). In the same way, sequences related to Charophyta increased from 1. 4 ± 0. 5 to 8. 4 ± 1. 8% following exposure to light. In contrast, Chlorophyta, Bacillariophyta and Ochrophyta, which represented 39.
Discussion Microbial diversity can be studied using either morphological identification or molecular tools that assign taxa based on genetic markers. Several authors recommended to combine these two methods to obtain improved coverage of species  37, 58, 59. This combination of techniques is particularly powerful to improve our functional understanding of photosynthetic microbial communities. As stated before, the µgreen database contains sequences retrieved from very diverse sources/methodologies and offers the possibility to affiliate sequences based on three different taxonomy nomenclatures: PR 2 /SILVA, NCBI, and AlgaeBase. To allow for an efficient taxonomic assignment, we provide full lineage from the kingdom/ phylum levels down to the species level. Nevertheless, μgreen-db is not a phylogenetic or taxonomic authority.
One limitation in using the 23S rRNA gene in metabarcoding studies is that few sequences are available from public databases (e. g. , GenBank, SILVA)  57, 60. This explains why it was necessary to retrieve our sequences using several strategies to obtain the most diverse database possible. In addition, to retrieve the sequences from various databases, we implemented a strategy of recursive BLAST with phylogenetic tree construction to improve our spectrum of organisms. Consequently, we were able to recover more than 1,500 sequences and to significantly increase the total number of sequences in our reference database. The taxonomic assignment of sequences by NCBI provided contrasting results. Although taxonomy for almost all sequences were assigned at the genus level, only 88. 5% of them were assigned at the phylum level, and 42% at the class level.