Validate human-readable gifter database sources
Source:R/database-build.R
validate_gifter_sources.RdPerforms structural validation before a SQLite database is compiled. Any duplicate identifiers, broken references, missing hierarchy levels, invalid directions, malformed anchor boundaries, graph cycles, or inconsistent release metadata are reported as build errors.
Usage
validate_gifter_sources(
source_dir,
stop_on_error = TRUE,
reference_dir = NULL,
marker_links = NULL
)Arguments
- source_dir
Directory containing the gifter TSV source tables.
- stop_on_error
If `TRUE`, stop when structural errors are found.
- reference_dir
Optional directory holding the pinned reference snapshot written by `data-raw/reference_snapshot.R`. `NULL` runs the structural checks only.
- marker_links
Optional paths to marker link extracts, used to recompute the basis of marker assignments. A namespace with no extract is reported as not recomputed.
Details
Structural validation cannot tell a real accession from a plausible one. When `reference_dir` names a pinned reference snapshot, the tables are also compared with Rhea, ChEBI and KEGG: every external accession must exist, a Rhea identifier must be a master, imported equations and names must match, and each declared anchor must take part in the chemistry of its routes.