Build a clade nuclear-rDNA reference database (GetOrganelle seeds + labels)
Source:R/build_reference_db.R
build_reference_db.RdDownloads 18S / 5.8S / 28S / ITS records for a GenBank taxonomic query and
builds the GetOrganelle seed + label FASTAs used by new_project()
(custom_seeds_db / custom_labels_db). Run this once per clade, before
running the pipeline; point every project for that clade at the result.
Usage
build_reference_db(
query,
clade,
out_dir = ribopilot_ref_dir(),
api_key = NULL,
refseq = FALSE,
count_only = FALSE,
conda_env = NULL,
overwrite = FALSE
)Arguments
- query
Advanced GenBank search term, e.g.
'"Gastropoda"[Organism]'or'"Percidae"[Organism]'.- clade
Short name for the output files, e.g.
"gastropoda". Files are written as<out_dir>/seeds/<clade>_rrna_seeds.fastaand<out_dir>/labels/<clade>_rrna_labels.fasta.- out_dir
Directory to store databases (default
ribopilot_ref_dir(), outside any project so it is reused across projects).- api_key
Optional NCBI API key (raises the request-rate limit).
- refseq
Restrict to RefSeq records.
- count_only
Only print the matching-record count and return (no download).
- conda_env
Optional conda env (name or path) providing Entrez Direct + biopython; its
bin/is prepended to PATH for the run.- overwrite
Rebuild even if the seed/label FASTAs already exist. When
FALSE(default) an existing DB is reused (no download) and its paths returned.
Details
Requires Entrez Direct + biopython (in the RiboPilot conda env). Pass
conda_env to put them on PATH.
This is the CLI entry point for building a database outside the app. The RiboPilot app's Reference step builds databases through its own Nextflow workflow instead and does not call this function; use it directly for scripted or headless use, or to build a database ahead of time.