dataesr/scientific-paragraphs-categorization huggingface dataset:
Merging of COI sequences from the NCBI-nt and BOLD has been attempted in different programs. bold_ncbi_merger  (Macher et al. , 2017)  uses a simple method based on identical taxon names. metacoxi  (Balech et al. , 2022)  obtains NCBI taxIDs and taxonomic lineages based on ENA flat files, when available. However, when this information is not available (the sequence is present only in BOLD), NCBI taxIDs are determined by simply matching taxon names to the NCBI taxonomy, without checking for homonymy. Furthermore, taxon names not present in the NCBI taxonomy do not receive a taxID, and therefore a taxID system is incomplete. A further difficulty of creating custom (local) databases is the download of sequences from the original sources. NCBI provides different means of accessing data: a whole database can be downloaded via ftp sites, and filtered subsequently, or Application Programming Interfaces (APIs) are provided for targeted downloads  (Kans, 2021).
On the other hand, BOLD systems do not provide an easy way to download the whole public data set, and the use of BOLD APIs needs considerable optimization to be able to access large data sets. Although the bold R package (https://docs. ropen sci. org/bold/) is available to download data from BOLD, it is subject to failure for large taxa and takes several hours or days, according to requested data size. The mkcoinr tool was designed to create the COInr database, which includes all COI sequences from NCBI-nt and BOLD sequences, irrespective of the region of the gene covered and the taxonomic group.
MEGLÉCZ All sequences have a taxID, and all taxIDs form a coherent system compatible with, but not limited to, the NCBI taxIDs, allowing the user to unambiguously obtain taxonomic lineages even for taxon names with homonyms. Sequence redundancy within taxa is eliminated to reduce database size, without losing information. This database is freely available and can be easily and quickly downloaded from Zenodo (https:// zenodo. org/recor d/65559 85;  Meglécz, 2022a Meglécz, , 2022b)) , thus saving the most complicated and time-consuming steps of custom database creation. Users can customize the downloaded database using mkcoinr scripts and format them to be able to use it with their preferred taxonomic assignment tool. It is a semi-automated pipeline using command lines in a Linux environment.
| MATERIAL AND ME THODS mkcoinr is a series of Perl scripts that can be executed in command line, thus being easily integrated into other pipelines. The scripts were written for Linux OS and can run on MacOS or other Unix environments. The Windows Subsystem Linux (https://docs. micro soft. com/en-us/ windo ws/wsl/) allows Windows users to run mkcoinr scripts. Particular care was taken to reduce dependencies to easy-to-instal, thirdparty programs without the use of special packages. blast  (Altschul et al. , 1997) , vsearch  (Rognes et al. , 2016) , cutadapt  (Martin, 2011)  and nsdpy  (Hebert & Meglécz, 2022)  can all be installed either through the Python Package Index (PyPI) or standard program repositories. Figure  1  represents a complete flowchart of the pipeline. A tutorial and detailed documentation is available at https://github.
com/ megle cz/mkCOInr  (Meglécz, 2022a (Meglécz, , 2022b)). eliminate genes with introns and sequences from environmental or metagenomic samples. Sequences with more than five consecutive internal Ns, and outside of the length range of 100-2000 nucleotides were also eliminated. Open nomenclature was not accepted in taxon names. If the taxID did not correspond to a correct Latin name format, the smallest taxon with a correct Latin name in the lineage was chosen for the sequence (e. g. , Acentrella sp. AMI 1, taxID: 888165, rank: species was replaced by Acentrella, taxID: 248176, rank: genus). Sequences were then subjected to taxonomically aware dereplication by the dereplicate. pl script. Within each taxID, all sequences that were a substring of another sequence were eliminated. This allows the size of the database to be reduced without losing information and keeping intraspecific variability.
Systems (https://www. bolds ystems. org/index. php/TaxBr owser_ Home), where each taxon had fewer than 500,000 specimen records. All public sequences of the above list and associated information were downloaded from BOLD, using the download_bold. pl script that uses the BOLD APIs. For each taxon, the integrity of the downloaded files and the number of records were checked, and the download was repeated automatically in case of failure. From and Uranoscopiformes, respectively). In the next step, a taxon under the smallest taxon with NCBI taxID was attributed to an arbitrary, negative taxID, and the new taxID was integrated into the taxID system, with the NCBI taxID as a parent. The newly created taxID was then added to the taxID system and it was characterized by a taxon name, a taxonomic rank and the taxID of its direct parent, forming a hierarchical system.
This hierarchical taxID system allows the creation of the lineage of any taxID unambiguously, even in the case of homonymy and synonymy. As for NCBI sequences, the filtered BOLD data set was dereplicated by the dereplicate. pl script. To compare the effect of using only correct Latin names (as in COInr) or accepting all taxon names present in the input databases, the above pipeline was run a second time using systematically the.
| The COInr database The BOLD and NCBI data sets were pooled into one single data set by the pool_and_dereplicate. pl script, where sequences for the tax-IDs shared by the two source databases were dereplicated, while sequences from taxIDs unique to one of the sources were simply added to the combined database. This database is a starting point to create more specific custom databases according to the users' needs. The core database consists of two simple-to-parse tsv files (tab-separated values). The sequence file has three columns (se-quenceIDs, taxIDs and sequences), and contains sequences of all taxonomic groups that can cover any COI region, with variable taxonomic resolution from species to phylum level. The taxonomy file contains taxIDs, scientific names, parent taxIDs, taxonomic rank and taxonomic level index.
| Customizing the COInr database The COInr database can be modified according to users' needs. Sequences can be selected for a list of taxa or, by contrast, removed from the database through the select_taxa. pl script. The script will also produce a lineage and a taxID for each taxon in the taxon list, allowing users to check for potential errors due to homonyms. In case of incoherence, the taxon list enriched by the correct taxIDs can be used to rerun the script with more precise selection. The same script ing an E-PCR on the core database. The E-PCR (electronic PCR) uses cutadapt  (Martin, 2011)  to select for a particular subregion of COI using a pair of primer sequences. The COInr database can also be completed by custom sequences. Users will need a taxon name and sequenceID for each custom sequence.
The format_custom. pl script will produce a lineage file with all input taxa, which should be checked, and eventually corrected and completed by the users. The add_taxids. pl script will add taxIDs to each lineage and complete the input taxonomy file (part of the COInr database). Sequences should then be dereplicated by the dereplicate. pl script and added to the COInr database using the pool_and_derelplicate. pl. Figure  1  represents the customizing options on mkcoinr, each of them starting from the COInr database. However, the different steps can also be successive to produce a final database. For example, it is possible to start by selecting sequences for a list of taxa, then adding custom sequences to the newly created database, which in turn can be trimmed to the target region.
| Format database The very simple format of the database (sequence file and taxonomy file both in tsv format) allows users to easily obtain a database in their desired format. The format_db. pl script can produce databases ready to use for blast  (Altschul et al. , 1997) , vtam  (González et al. , 2020) , rdp classifier  (Wang et al. , 2007)  and qiime  (Bolyen et al. , 2019). The "full" option will produce a single tsv file with sequence IDs, ranked lineages, taxIDs and the sequences, allowing user to parse, and produce basic statistics on the database content (e. g. , number of sequences of each taxon). Each of the resulting 60 bait files was used to trim the positive and the two negative test data sets by using two identity thresholds (0. 6 and 0. 7). After pooling the databases and dereplication, 90% of the sequences were from taxa present in both databases, while 4% and 6% were specific to NCBI and BOLD, respectively.
Overall, the 11. 5 million input sequences were reduced to 3. 3 million by eliminating redundancy between the two input databases, and within each taxon. Lepidoptera order). The total number of taxa in NCBI was more than three times higher when using all names  (769,956 vs. 221,565). This difference was smaller, yet considerable for the number of BOLD taxa  (322,927 vs. 231,425)  for the all-names and Latin names databases (Table  3 ).
, 2015)  are not specific to a marker, while others are more specialized. For example, the MIDORI database  (Leray et al. , 2018; Machida et al. , 2017)  contains mitochondrial sequences of 13 protein-coding genes and the co-arbitrator  (Heller et al. , 2018)  is designed to build an auto-curated database of Metazoan COI sequences. All the above-mentioned databases and tools are based exclusively on NCBI databases or on a data set already containing a coherent system of lineages. Several COI-specific databases containing sequences from NCBI databases and BOLD have also been   (Porter & Hajibabaei, 2018a ) is specifically designed for the rdp classifier and focuses on Arthropoda and Chordata and also contains outgroups. It contains NCBI and BOLD sequences of at least 500 bp, and sequences were screened to remove typical contaminants (e.
g. , mislabelled human or bacterial sequences). Meta-Fish-Lib  (Collins et al. , 2021)  and MitoFish  (Sato et al. , 2018)  are reference libraries of fishes, and COins  (Magoga et al. , 2022 ) is a manually curated COI database of insects. The COInr database and the mkcoinr tool are most comparable to the MARES  (Arranz et al. , 2020)  and metacoxi  (Balech et al. , 2022)   sequences in an easy-to-parse format. However, no tools are provided at present for the creation of custom databases, and therefore basic programming skills are necessary to obtain a ready-to-use custom database from it. This is relatively easy for some tasks, such as selection of sequences of a taxon, but needs considerable effort to select a specific gene region, or to format the database for rdp classifier  (Wang et al.
When accepting all names as they appear in the input database, a high proportion of the COI sequences are shared between taxa, and most importantly a high proportion of taxa contain only sequences that are identical to sequences of other taxa. Therefore, keeping artificial identifiers as species names, when they do not necessarily correspond to species, they are uninformative for most users and in many cases they cannot be distinguished from sequences of other taxa, inflates uselessly the number of taxa and thus hinders efficient, taxonomically aware reduction of redundancy. The COInr database uses only taxa with correct Latin name format. To avoid the loss of sequences, sequences with incorrect taxon names are attributed to the lowest taxon in the lineage with a Latin name. Therefore, sequences are kept in the database, with a conservative level of taxonomic information, resulting in a more efficient dereplication, and thus a smaller database without the loss of crucial information.
| Selecting the target region The COInr database includes sequences that can cover any region of the COI gene. For taxonomic assignment methods based on sequence similarity  (Clemente et al. , 2011; Huson et al. , 2007; Kahlke & Ralph, 2019; Wood & Salzberg, 2014)  the database can be used as it is, because sequences of the nontarget region will not be returned by blast or other similarity searches. The only disadvantage would be the database size, which could be eventually reduced by selecting only the region of the sequence that covers the target region. On the other hand, for taxonomic assignment based on sequence composition or phylogeny  (Murali et al. , 2018; Nguyen et al. , 2014; Rosen et al. , 2011; Wang et al. , 2007) , or for the use of the database for phylogenetic, mitogenomic or genomic studies it is preferable to trim sequences to the target region.
| Selecting the target groups Using a large database with a wide taxonomic scope is convenient for users analysing different data sets with a varied taxonomic origin, since the same database can be used and can give a good first approximation of taxonomic assignment of sequences. It can also be helpful to detect contaminant sequences that are not expected in the study (e. g. , human sequences or model species studied in the same laboratory) or sequences outside of the target group of the study (e. g. , bacteria, algae and fungi when focusing on animals). By using a generalist database, these sequences can be identified and eliminated. On the other hand, the presence of reference sequences from taxa not relevant to the study can also have disadvantages: the database size is higher and therefore the speed of taxonomic assignment is lower with generalist databases.
Moreover, sequences can be assigned to unexpected taxa if the taxonomic coverage of the target group is incomplete. This can be avoided with databases specific to the target group  (Axtner et al. , 2019; Mathon et al. , 2021; Valentini et al. , 2016). For example, many sequences from marine samples can be erroneously assigned to insects when using a generalized database, which is the combined result of the facts that most marine groups are insufficiently covered in the reference databases  (Mugnai et al. , 2021) , and an overwhelming majority of the sequences are from insects (73%). Therefore, the possibility to easily create custom databases specifically tailored to the users' needs is particularly important, and mkcoinr provides the necessary tools to make this selection.
| Selecting sequences with different taxonomic resolution Another consideration when creating custom databases is whether to keep reference sequences with incomplete lineages. Most sequences of a reference database assigned to an insect order without further precision are likely to be useless, since most insect reference sequences are determined at least to the genus level, and the taxonomic coverage of this group is wide. By contrast, for less wellcovered groups, especially if species or higher-level groups are difficult to identify morphologically (e. g. , Nematoda, Rotifera), reference sequences with partial lineages are still informative.
| Database curation Erroneously annotated sequences in the reference database can have serious consequences on taxonomic assignments. Unfortunately, both the NCBI and BOLD databases contain mislabelled sequences  (Bidartondo et al. , 2008; Meiklejohn et al. , 2019). This problem should be addressed from the source by a public sequence database that can incorporate a community-curated annotation and allows third parties to improve the annotations of sequences. In the BOLD database, the detection of taxonomic incoherencies is principally based on BINs (Barcoding Index Numbers)  (Ratnasingham & Hebert, 2013) , and applications such as bags  (Fontes et al. , 2021)  allow us to automatically flag some of them. However, the BIN system is based on the existence of a barcoding gap, which does not exist for all taxa  (Meier et al.
, 2006; Roe & Sperling, 2007; Rubinoff et al. , 2006). Therefore, human expertise with curation jams is still very much needed for taxonomic revision  (Radulovici et al. , 2021). On the other hand, errors in primary sequence data in NCBI-nt can only be corrected by the authors, which is inefficient and unsustainable. In the field of mycology, considerable progress has been done to identify undescribed taxa using a Taxon Hypothesis  (Kõljalg et al. , 2020) , to make concerted effort to identify high-quality sequences and to re-annotate erroneous or insufficiently annotated public ITS sequences (R. Henrik  Nilsson et al. , 2014)  and include the improved annotations to the UNITE database (Rolf Henrik  Nilsson et al. , 2019). This database can be used as a reference for automated curation of some other error types such as chimeras (R.
Henrik  Nilsson et al. , 2015). A similar approach would also be desirable for Metazoa, especially for taxa that are difficult to distinguish morphologically. Given the lack of sufficient curation effort of the source databases, ideally, a local database derived from them should be curated to identify incorrectly assigned sequences. Published semiautomatic methods aiming to curate databases are not applicable to large databases (millions of sequences), since either the run time would be prohibitive or include a manual step for curation  (Collins et al. , 2021; Kozlov et al. , 2016; Rulik et al. , 2017). The COInr database is too large to be able to run an automatic curation step, which should be kept in mind when using the full database. However, if a small custom database is created from COInr, this curation step becomes feasible and strongly recommended.
| CON CLUS IONS The COInr is a comprehensive database of COI sequences, and its major aim is to serve as a reference database for barcoding and metabarcoding studies. It can be used for taxonomic assignments of COI sequences as it is, since it is not limited in its taxonomic scope, or to a particular region of the gene. It is also a good starting point to create local, custom databases, since it saves the most timeintensive and complicated steps of database creation: (i) downloading a large number of sequences, (ii) creation of a coherent taxID system to avoid ambiguity due to homonymy and synonymy, and (iii) sequence dereplication. The mkcoinr package provides the necessary tools to both to re-create a whole COInr database, between the planned annual.
the raw downloaded files, COI sequences (COI-5P, COI-3P) were selected if they did not contain more than five consecutive internal Ns and were in the length range of 100-2000 nucleotides. As for NCBI sequences, the smallest taxon in the BOLD lineage with a correct Latin name was chosen for the sequence to avoid open nomenclature. All unique lineages were then listed with the corresponding sequence identifiers (sequenceID) and for each lineage a taxID was determined using the add_taxids. pl script: the smallest taxon is identified in each BOLD lineage, where the name matches a taxon name in the NCBI taxonomy database (including synonyms), and at least 60% of the taxon names in the BOLD lineage match the NCBI lineage. For example, for the BOLD lineage "Chordata, Actinopterygii, Trachiniformes, Pinguipedidae, Parapercis, Parapercis somaliensis," the genus Parapercis matches the 215,380 NCBI taxID, even if the orders are different in BOLD and NCBI (Trachiniformes.
Flowchart of mkcoinr. Double lines represent the different options for customizing the COInr database. These steps can also be consecutive | 5 MEGLÉCZ also allows sequences to be selected with a minimum taxonomic resolution. The select_region. pl script trims the sequences to a specific region of the COI gene. Using the usearch_global command of vsearch (Rognes et al. , 2016), sequences of the database are aligned to a small bait file, which contains a taxonomically diverse pool of sequences already trimmed to target region. The usearch_global program is similar to blast since it aligns each query sequence (sequences of the COInr) to the sequences of its database (the bait file in this case). Contrary to blast, usearch_global produces global alignments. The best alignment of each query sequence is used to trim the query sequence according to the alignment positions.
Identifying and trimming sequences to a target region is one of the most difficult steps in customizing the COInr database. It can produce false positives and false negatives if the search parameters are not set properly. The detailed protocol of the benchmarking and the associated scripts are found in the github repository of mkcoinr (https://github. com/megle cz/mkCOInr). Briefly, a positive test data set was produced by downloading CDS of all complete mitochondrial genomes from NCBI-nt and the whole COI gene sequences were identified by the format_ncbi. pl script. Sequences shorter than 1100 bp were filtered out to avoid using erroneously annotated incomplete sequences. Two negative data sets were also produced. The negative-mito data set was derived from the above downloaded mitogenomes.
Downloaded from https://onlinelibrary. wiley. com/doi/10. 1111/1755-0998. 13756 by Cochrane France, Wiley Online Library on [01/03/2023]. See the Terms and Conditions (https://onlinelibrary. wiley. com/terms-and-conditions) on Wiley Online Library for rules of use; OA articles are governed by the applicable Creative Commons LicenseApart from sequences of animals, which comprised 99% of the database and corresponded 97% of the species, other Eukaryotes (plants, Fungi) and even some Bacteria and Archaea sequences were also present in the database (Table2). Within Metazoa, 83% of the sequences were from Arthropoda, which corresponds to 74% of the animal species of the database. Downloading the COI sequences from NCBI and all sequences from BOLD took approximately 24 and 40 h, respectively. It is clearly the most time-consuming step.
The rest of the pipeline until obtaining the final COInr database took approximately 1 h on a desktop computer (Intel Core i7-7700, CPU @ 3. 6 GHz, 32 Gb RAM). This compares to the few seconds of downloading the COInr database from Zenodo that clearly saves a tremendous amount of time for users. Creating a custom database from COInr varied in length as a function of the desired characteristics of the database. As an example, the creation of a custom database explained in the tutorial (Eukaryotes, noninsect sequences with known genera, enriched by custom sequences, limited to a 313-bp region, formatted to the rdp classifier) takes approximately 30 min. To evaluate the effect of using nonstandard taxon names, corresponding to open nomenclature (e. g. , Allograpta aff. argentipila, Alona guttata group, Macrobiotus cf.
hufelandi) or correct Latin names completed by arbitrary identifiers (e. g. , Macrobathra sp. ACL2485, Abablemma BioLep730, Abacarus sp. GD111), two databases were created: COInr, where only correct Latin names were used, and the all-names database created by the same pipeline, with the exception that all taxon names were accepted regardless of their format (e. g. , Lepidoptera sp. 096 PS-2011 was used instead of the taxID of.
On the other hand, parameters that are too stringent can reduce sensitivity. A balance between false positives and false negatives was achieved, however, with 0-0. 4% of false positives and 0. 5% of false negatives for a carefully selected parameter combination (trim_error: 0. 3; min_overlap: 20; identity: 0. 7). Alternatively, users can choose to provide a bait file to replace the E-PCR step. This option is more robust for avoiding false positives, irrespective of the bait file diversity and the identity threshold. On the other hand, the more diverse the bait file, the higher the sensitivity. As a rule of thumb, five random sequences per taxonomic class or one to five sequences per order lead to a high sensitivity (>98%) and precision (near 100%). The choice between using the E-PCR or the bait-file option depends on the aim of the database.