ingest_metadata: Standardize Sample Metadata

View source: R/ingest.R

ingest_metadataR Documentation

Standardize Sample Metadata

Description

Normalize user-provided metadata into the canonical column contract used by splitGraph.

Usage

ingest_metadata(data, col_map = NULL, dataset_name = NULL, strict = TRUE)

Arguments

data

A sample-level data.frame.

col_map

Optional named character vector mapping canonical names to user-provided columns.

dataset_name

Optional dataset label stored as an attribute on the returned table.

strict

If TRUE, error when required columns are missing.

Value

A standardized data.frame with canonical identifier columns coerced to character.

Examples

meta <- ingest_metadata(
  data.frame(sample_id = c("S1", "S2"), subject_id = c("P1", "P2"))
)

splitGraph documentation built on July 3, 2026, 5:06 p.m.