
Stage 1: read a file, detect frontmatter, and validate the tag map
Source:R/curate_stages.R
stage_ingest.RdStage 1: read a file, detect frontmatter, and validate the tag map
Usage
stage_ingest(
input_path,
tag_map,
header_row = NULL,
reference_lists = NULL,
reference_list_snapshot = NULL,
activate_all_references = FALSE,
site_manifest = NULL,
site_alias_map = NULL,
ignored_identifier_cols = character()
)Arguments
- input_path
Character. Path to the input file (CSV, XLSX, or XLS).
- tag_map
Named list mapping cleaned column names to tag roles. Keys must match column names after
janitor::clean_names()normalization. Values are one of"Name","CASRN","Other","Result","Numeric","Unit","Qualifier","ReportingLimit","Uncertainty","UncertaintyCoverage", etc. Example:list(chemical_name = "Name", cas_number = "CASRN", result = "Result", unit = "Unit").- header_row
Integer or NULL. If NULL (default), frontmatter detection runs automatically. If an integer, that row number is used as the header row (manual override).
- reference_lists
Named list of reference data. If NULL (default), the package-bundled reference cache is loaded automatically. If provided, must contain keys:
stop_words,functional_categories,block_patterns,strip_terms,isotope_lookup.- reference_list_snapshot
Optional compact replay snapshot generated by
generate_concert_script(). When supplied, package defaults are loaded without localuser_reference_lists.rdsoverrides, verified against the snapshot hashes, and merged with snapshot overrides.- activate_all_references
Logical. If TRUE, activates all cleaning reference-list rows for this run only.
- site_manifest
Optional curated Dataset Context site manifest to include in the workbook export.
- site_alias_map
Optional Dataset Context raw-label alias map to include in the workbook export.
- ignored_identifier_cols
Retained identifier columns deliberately treated as metadata. These columns never supply identity evidence.
Value
A curation state list. See curate_headless() for the composed run.