<codeBook xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:schemaLocation="ddi:codebook:2_6 http://www.ddialliance.org/Specification/DDI-Codebook/2.6/XMLSchema/codebook.xsd" xmlns="ddi:codebook:2_6">
  <docDscr>
    <citation>
      <titlStmt>
        <titl xml:lang="sv"></titl>
        <parTitl xml:lang="en">COI reference sequences from BOLD DB</parTitl>
        <IDNo agency="SND">doi-10-17044-scilifelab-20514192-0</IDNo>
        <IDNo agency="DOI">https://doi.org/10.17044/SCILIFELAB.20514192</IDNo>
      </titlStmt>
      <prodStmt>
        <producer xml:lang="en" abbr="SND">Swedish National Data Service</producer>
        <producer xml:lang="sv" abbr="SND">Svensk nationell datatjänst</producer>
      </prodStmt>
      <holdings URI="https://doi.org/10.17044/SCILIFELAB.20514192">Landing page</holdings>
    </citation>
  </docDscr>
  <stdyDscr>
    <citation>
      <titlStmt>
        <titl xml:lang="sv"></titl>
        <parTitl xml:lang="en">COI reference sequences from BOLD DB</parTitl>
        <IDNo agency="SND">doi-10-17044-scilifelab-20514192-0</IDNo>
        <IDNo agency="DOI">https://doi.org/10.17044/SCILIFELAB.20514192</IDNo>
      </titlStmt>
      <rspStmt>
        <AuthEnty xml:lang="en" affiliation="Science for Life Laboratory">Sundh, John</AuthEnty>
      </rspStmt>
      <prodStmt>
        <grantNo xml:lang="en" agency="Swedish Research Council">2019-00242_VR</grantNo>
        <grantNo xml:lang="en" agency="Swedish Research Council">2015-06026_VR</grantNo>
      </prodStmt>
      <distStmt>
        <distrbtr xml:lang="en" abbr="SND" URI="https://snd.se">Swedish National Data Service</distrbtr>
        <distrbtr xml:lang="sv" abbr="SND" URI="https://snd.se">Svensk nationell datatjänst</distrbtr>
        <distDate xml:lang="en" date="2022-09-15" />
      </distStmt>
      <verStmt>
        <version elementVersion="0" elementVersionDate="2022-09-15" />
      </verStmt>
      <holdings URI="https://doi.org/10.17044/SCILIFELAB.20514192">Landing page</holdings>
    </citation>
    <stdyInfo>
      <subject />
      <abstract xml:lang="en" contentType="abstract">This item contains COI (mitochondrial cytochrome oxidase subunit I) sequences collected from the BOLD database. The dataset is based on the BOLD Data Package from 15 May 2026.

The fasta file coidb.clustered.fasta.gz represents a non-redundant set of filtered sequences (clustered at 100% identity, see Methods) with record ids that can be queried in the Public Data Portal (https://portal.boldsystems.org/) . Each fasta header also contains the BIN ID assigned to the record (with the exception of prokaryotic records which instead have process ids as BIN IDs).

The taxonomic information for all filtered records is given in the tab-separated file coidb.info.tsv.gz.


Files compatible with specific tools for taxonomic assignments are found under the dada2/, sintax/, and qiime2/ folders.

MethodsThis dataset was generated with the coidb package (v0.7.0).

Briefly, records from the BOLD Data Package are filtered to:

- keep only records assigned a proper BOLD BIN (e.g. 'BOLD:AAA0008'), as well as records assigned to Bacteria or Archaea
- keep only records with marker_code 'COI-5P'

- remove records shorter than 500 bp
- remove records containing non-standard DNA characters



Remaining sequences are then clustered at 100% identity separately for each BOLD BIN using vsearch (v2.30.4, Rognes et al. 2016) (records without BOLD BINs that are assigned to Bacteria/Archaea are not clustered).

The taxonomic information for records is processed to handle missing data and non-unique parent lineages. A consensus taxonomy for each BOLD BIN is calculated by taking into account the taxonomic information given for records assigned to each BIN. This is done in two ways:

- the `inclNA` method calculates a consensus based on all taxonomic labels, even the ones with missing data
- the `exclNA` method excludes taxonomic labels with missing data when calculating the consensus



Because these methods have their pros and cons (in short exclNA resolves more species but inclNA is more conservative) both versions of downstream files are available in this item and it is up to the user to decide which one to use.

In addition, all unique species names were matched to the Catalogue of Life (https://www.gbif.org/dataset/7ddf754f-d193-4cc9-b351-99906754a03b)  checklist using the pygbif (https://pygbif.readthedocs.io/en/latest/index.html)  package (v0.6.6). Only records assigned to species that could be matched exactly and without ambiguity were kept and used to form the 'gbif' version of the database.

Description of filescoidb/coidb.clustered.fasta.gz
This file contains nucleotide sequences of all filtered records, clustered at 100% identity within each BOLD BIN. The fasta headers have the format:
&gt;{processid} bin_uri:{BOLD BIN}

where '{processid}' corresponds to the record identifier chosen as the cluster centroid and '{BOLD BIN}' shows which BOLD BIN the record belongs to.

coidb/coidb.info.tsv.gz
This file contains taxonomic information (including BOLD BIN where applicable) as well as nucleotide sequences for all filtered records.

gbif/gbif.info.tsv.gz
This file shows the result of matching species names from BOLD to the Catalogue of Life. The first column contains the species name from BOLD and subsequent columns show the matched taxonomic labels for ranks from kingdom -&gt; species. Unmatched species names have 'unassigned' as taxonomic labels.

consolidated/consolidated.tsv.gz
This file shows the complete information for each record remaining after matching species names to Catalogue of Life. It has the same format as the coidb/coidb.info.tsv.gz file.

consensus_taxonomy/coidb.exclNA.tsv.gz
consensus_taxonomy/coidb.inclNA.tsv.gz
consensus_taxonomy/gbif.exclNA.tsv.gz
consensus_taxonomy/gbif.inclNA.tsv.gz
These files contain the consensus taxonomy for BOLD BINs generated as described under Methods above. The files with the 'gbif' prefix contain only information for records assigned to species matched to the Catalogue of Life.

Tool-specific filesDADA2
The dada2/ folder contains fasta files that are compatible with the DADA2 assignTaxonomy and addSpecies functions. See more information at https://benjjneb.github.io/dada2/assign.html.

The files wtih 'toGenus' and 'toSpecies' in their names have taxonomic information down to the genus and species level, respectively. The files with 'addSpecies' contain only the species name and should be used with the 'addSpecies' function.

SINTAX
The sintax/ folder contains fasta files that are compatible with taxonomic assignments using the SINTAX algorithm as implemented in `vsearch`. See more information in the vsearch manual.

QIIME2

The qiime2/ folder contains info files that can be imported with QIIME2. For more information, see the README file at https://github.com/insect-biome-atlas/coidb.

Other fileslogs/fix_nonunique.coidb.log
logs/fix_nonunique.gbif.log
These files show how taxa with non-unique parent lineages were modified during database creation.

stats/general_stats.tsv
This file show statistics on the different databases in this upload. The columns are:

- type: the type of database (e.g., coidb.exclNA, gbif.exclNA etc)
- total_seqs: total number of sequences remaining after clustering
- total_bins: total number of unique BOLD BINs
- {mean,median,min,max}_seqs_per_bin: statistics on number of sequences per BOLD BIN (after clustering)
- total_non-bins: number of unique non-BOLD BINs. This typically represents prokaryotic records which are not assigned a BOLD BIN
- total_species: total number of unique species (also includes unresolved/ambiguous species names)
- total_bin_species: total number of unique species for sequences assigned a BOLD BIN
- total_nonbin_species: total number of unique species for sequences NOT assigned a BOLD BIN
- ambiguous_species: number of unique species with ambiguous taxonomic assignment (suffixed with "_X"). These are records with missing taxonomic information at species level.
- seqs_in_ambiguous_species: total number of sequences with ambiguous species names
- ambiguous_bin_species: same as ambiguous_species but only for BOLD BINs
- seqs_in_ambiguous_bin_species: same as seqs_in_ambiguous_species but only for BOLD BINs
- unresolved_species: total number of unique unresolved species (species names prefixed with 'unresolved.')
- seqs_in_unresolved_species: total number of sequences with unresolved species labels
- unresolved_bin_species: same as unresolved_species but only for BOLD BINs
- seqs_in_unresolved_bin_species: same as seqs_in_unresolved_species but only for BOLD BINs
- unresolved_ambiguous_species: total number of unresolved AND ambiguous species (species names prefixed with 'unresolved.' and suffixed with "_X").
- seqs_in_unresolved_ambiguous_species: total number of sequences with unresolved AND ambiguous species labels
- unresolved_ambiguous_bin_species: same as unresolved_ambiguous_species but only for BOLD BINs
seqs_in_unresolved_ambiguous_bin_species: same as seqs_in_unresolved_ambiguous_species but only for BOLD BINs


stats/taxa_stats.tsv
This file shows number of BOLD BINs and sequences for different taxa in each database. The file is in 'long-format' with columns:



- taxa: taxonomic name
- n_bins: number of unique BOLD BINs
- n_seqs: number of sequences (after clustering)
- rank: taxonomic rank (only kingdom and phylum are shown)
- name: database name
shasum.txt
This file contains checksums and can be used to verify file integrity by running

shasum -c shasum.txt</abstract>
      <sumDscr />
    </stdyInfo>
    <method>
      <dataColl />
    </method>
    <dataAccs>
      <useStmt>
        <restrctn xml:lang="en">Access to data through an external actor. </restrctn>
        <restrctn xml:lang="sv">Åtkomst till data via extern aktör. </restrctn>
      </useStmt>
    </dataAccs>
    <othrStdyMat />
  </stdyDscr>
</codeBook>