-
Notifications
You must be signed in to change notification settings - Fork 0
Data Fetch
The Zenodo record hosts the reference databases that the pipeline reads β the unified RefSeq-228 family plus the Ganon2 default index. Read datasets (mock + simulated reads) are not on Zenodo; fetch those from their original SRA accessions or upstream URLs (see Datasets). The other per-tool default databases are also not bundled β install each from the tool's own published index (default DBs (not bundled) below).
Prerequisite:
curl,zstd β₯ 1.4,tar. See Installation.
| Bundle | Contents | Approx. size (compressed) |
|---|---|---|
bakeoff_refdb_shared_metadata |
taxdump + ete3 sqlite + lineage / accession-to-taxid tables + audit lists. Required alongside any unified bundle. | ~5 GB |
bakeoff_refdb_unified_kraken2 |
Kraken2 unified index | ~121 GB |
bakeoff_refdb_unified_centrifuge |
Centrifuge unified index | ~58 GB |
bakeoff_refdb_unified_centrifuger |
Centrifuger unified index | ~57 GB |
bakeoff_refdb_unified_ganon2 |
Ganon2 unified index | ~32 GB |
bakeoff_refdb_unified_sourmash |
Sourmash unified sketches | ~2 GB |
bakeoff_refdb_unified_sylph |
Sylph unified sketches | ~5 GB |
bakeoff_refdb_default_ganon2 |
Ganon2 default index (the only default DB redistributed; sized + licence allow it) | ~95 GB |
bakeoff_refdb_default_metadata |
Taxonomy snapshots + sylph-tax metadata that the default-DB pipeline runs need but upstream default indexes don't include. Required alongside any --db default workflow that touches Centrifuge, Sourmash, or Sylph. |
~500 MB |
Each large bundle is split into 45 GB parts named <bundle>.tar.zst.part01, .part02, β¦ and shipped with a <bundle>.manifest.txt listing the archive contents.
You almost never need all of it. Pair the right bundles for what you want to do:
| Goal | Bundles to download |
|---|---|
| Reproduce unified-DB results for one tool T |
shared_metadata + unified_<T>
|
| Reproduce default-DB Ganon2 results | default_ganon2 |
| Reproduce default-DB results for any other tool | self-install the tool's index (Default DBs (not bundled)) + default_metadata for the matching taxonomy snapshot |
| Rebuild a unified index from scratch |
shared_metadata β then follow Database Build
|
shared_metadata is mandatory for every unified bundle; the unified indexes reference its taxdump and ete3 snapshot.
The Zenodo files for one bundle (e.g. bakeoff_refdb_unified_kraken2) look like:
bakeoff_refdb_unified_kraken2.tar.zst.part01
bakeoff_refdb_unified_kraken2.tar.zst.part02
bakeoff_refdb_unified_kraken2.tar.zst.part03
bakeoff_refdb_unified_kraken2.manifest.txt # inventory; optional
Concatenate the parts and pipe straight through zstd | tar into your bakeoff project root β no intermediate .tar.zst is materialised, so disk usage during extraction is just the unpacked DB:
PROJECT_ROOT=/path/to/bakeoff # the dir containing data/ , scripts/ , β¦
cd "$PROJECT_ROOT"
cat bakeoff_refdb_unified_kraken2.tar.zst.part?? \
| zstd -dc --long=27 \
| tar -xf -The leading
cat *.part??glob expands in lexicographic order, which matches the numericpartNNnaming. Run from inside the project root so the relative archive paths (data/ref_db/β¦) land at the right place.
The archive paths are stored relative (data/ref_db/β¦), so a single pass restores the canonical layout the pipeline expects β no mv or symlinks needed.
For the smaller, un-split bundles (sourmash, sylph, shared_metadata), the .partNN glob still works because cat <onefile>.tar.zst just emits that one file:
cat bakeoff_refdb_unified_sourmash.tar.zst \
| zstd -dc --long=27 \
| tar -xf -Integrity of each downloaded part is already covered by the MD5 Zenodo computes for every file on the record page β compare it against md5sum <part> if you want a per-part check before extraction. The pipe-through form above is enough for everyday use; nothing further is needed once tar -xf returns 0.
shared_metadata ships the NCBI taxdump as a compressed tarball; the tools want it expanded into a taxdump/ subdir next to it:
mkdir -p data/ref_db/refseq03032025/taxdump
tar -C data/ref_db/refseq03032025/taxdump \
-xzf data/ref_db/refseq03032025/taxdump0303.tar.gzThat's the only manual post-fetch step. Everything else is already in place.
After extracting all unified bundles plus shared_metadata, default_ganon2, and default_metadata, your tree under <PROJECT_ROOT>/data/ref_db/ looks like:
data/ref_db/
βββ database_build.md # β shared_metadata
βββ RefSeq-release228.catalog.gz # β shared_metadata
β
βββ refseq03032025/ # the unified DB family
β βββ assembly_summary_refseq_augmented.txt # β shared_metadata
β βββ ete3_taxa/ # β shared_metadata
β βββ file.list # β shared_metadata
β βββ nucl_gb.accession2taxid.gz # β shared_metadata
β βββ nucl_wgs.accession2taxid.gz # β shared_metadata
β βββ refseq03032025_dict.txt # β shared_metadata
β βββ refseq_030325_lineage.tsv # β shared_metadata
β βββ refseq_accessions_taxonomy.csv # β shared_metadata
β βββ seqid2taxid.map # β shared_metadata
β βββ taxdump0303.tar.gz # β shared_metadata (expand to taxdump/)
β βββ taxdump/ # β created by the post-fetch tar -xzf above
β β
β βββ k2_abfv_030325/ # β unified_kraken2
β βββ centrifuge_abv_030325/ # β unified_centrifuge
β βββ centrifuger_abv_030325/ # β unified_centrifuger
β βββ ganon2_abvf_030325/ # β unified_ganon2
β βββ sourmash_abvf_030325/ # β unified_sourmash
β βββ sylph_abf_030325/ # β unified_sylph
β
βββ default_db/ # per-tool default DBs
βββ ganon2_default/ # β default_ganon2 (only one bundled)
β
βββ cf_default/
β βββ ete3_taxa/ # β default_metadata (taxa122016 snapshot)
β βββ β¦index filesβ¦ # β self-install (Centrifuge)
βββ sm_default/
β βββ ete3_taxa/ # β default_metadata (taxa032022 snapshot)
β βββ β¦zip filesβ¦ # β self-install (Sourmash)
βββ sylph_default/
β βββ ete3_taxa/ # β default_metadata (taxaGTDB-r220 snapshot)
β βββ taxa042024.sqlite{,.traverse.pkl} # β default_metadata
β βββ β¦syldb filesβ¦ # β self-install (Sylph)
βββ sylph_tax/ # β default_metadata (sylph-tax lineage metadata)
β
βββ k2_default/ # β self-install (Kraken2 default)
βββ cfer_default/ # β self-install (Centrifuger default)
Path-by-path mapping from bundles is also encoded in each bundle's <bundle>.manifest.txt β useful for a quick spot-check that extraction landed everything where it should.
Five of the six tools' default DBs aren't redistributed (size + licence concerns) β install each from the tool's own published index. Create the directory shells first; that way an unfinished partial install is obvious, and the pipeline's --db default runs report cleanly "missing index" rather than a confusing parser error:
cd "$PROJECT_ROOT"
mkdir -p data/ref_db/default_db/{k2_default,cf_default,cfer_default,sm_default,sylph_default,sylph_tax}Then populate each from its upstream source. The version numbers in Tools and Databases are what the manuscript uses; match those if you want bit-for-bit reproducibility.
| Tool / dir | Source | Notes |
|---|---|---|
k2_default/ (Kraken2) |
https://benlangmead.github.io/aws-indexes/k2 β pick the k2_standard_* tarball |
Untar in place; the *.k2d files go directly under k2_default/. |
cf_default/ (Centrifuge) |
https://benlangmead.github.io/aws-indexes/centrifuge | Place the .cf index files directly under cf_default/. |
cfer_default/ (Centrifuger) |
https://github.com/mourisl/centrifuger releases β the prebuilt index download | Same layout: index files directly under cfer_default/. |
sm_default/ (Sourmash) |
https://sourmash.readthedocs.io/en/latest/databases.html β pick the matching zip | Drop the .zip files into sm_default/. |
sylph_default/ (Sylph) |
https://github.com/bluenote-1577/sylph/wiki/Pre%E2%80%90built-databases β sketch + metadata | Sketches (.syldb) into sylph_default/. |
sylph_tax/ |
https://github.com/bluenote-1577/sylph-tax taxonomy bundles | This is the sylph-tax lineage-resolution data, not the sketch itself. |
After populating, each tool's ete3 snapshot for taxonomy resolution must match the index β see Tools and Databases for the snapshot-to-default-DB mapping. For the default DBs, those snapshots ship in bakeoff_refdb_default_metadata, not shared_metadata (which only carries the unified-DB snapshot, refseq03032025/ete3_taxa/taxa032025.sqlite). Extracting default_metadata drops the right snapshot into each <tool>_default/ete3_taxa/ automatically, and also populates sylph_default/taxa042024.sqlite and the sylph_tax/ metadata directory. Run it once alongside any of the self-installed default indexes:
cat bakeoff_refdb_default_metadata.tar.zst \
| zstd -dc --long=27 \
| tar -xf -Two sanity checks once a download finishes:
# 1. inventory the extracted files against the bundle's manifest
diff <(cd $PROJECT_ROOT && tar -tvf <unused>.tar.zst | sort) <(sort bakeoff_refdb_<bundle>.manifest.txt)
# (only meaningful if you kept the joined .tar.zst; otherwise rely on a quick file count)
# 2. point-check one expected file per bundle
ls $PROJECT_ROOT/data/ref_db/refseq03032025/k2_abfv_030325/hash.k2d # kraken2
ls $PROJECT_ROOT/data/ref_db/refseq03032025/centrifuge_abv_030325/*.cf # centrifuge
ls $PROJECT_ROOT/data/ref_db/refseq03032025/sylph_abf_030325/*.syldb # sylph
ls $PROJECT_ROOT/data/ref_db/refseq03032025/ete3_taxa/taxa032025.sqlite # ete3 snapshotIf a file is missing from default_db/<tool>_default/, that's almost always an incomplete download from the upstream source rather than a bundling problem on our side β re-fetch from the URL above.
-
zstd: error 70 : Frame requires too much memory for decodingβ pass--long=27(as shown in every recipe above); the bundles use a 27-bit window. -
tar: data/ref_db: Cannot mkdir: Permission deniedβ you're not in the project root, or you don't own<PROJECT_ROOT>/data/.cd "$PROJECT_ROOT"before thecat | zstd | tarline, and check the directory's permissions. -
Index works for one tool but not another β the unified indexes reference the taxdump and ete3 snapshot from
shared_metadata; the most common cause is forgetting that bundle. -
Downloads stall β Zenodo serves through CDN, but for the 121 GB Kraken2 bundle parts you may want
curl -C -(continue) so an interrupted part resumes cleanly.
- Database Build β optionally rebuild a unified index from scratch instead of downloading it
- Reproduction β regenerate the manuscript figures and tables once the data is in place