Skip to contents

Creates, validates, reads, explicitly approves, and serializes deterministic production baseline snapshots that bind an approved canonical dataset, filename-bound source checksums, complete sample metadata, quantitative metrics, workflow provenance, and scientific approval metadata.

Usage

new_canonical_real_data_baseline_snapshot(
  dataset,
  registry,
  sample_metadata,
  dataset_version,
  generated_by,
  generated_at,
  source_commit,
  approval = c("proposed", "approved"),
  approved_by = NULL,
  approved_at = NULL,
  notes = NULL
)

validate_canonical_real_data_baseline_snapshot(
  snapshot,
  require_approved = FALSE
)

read_canonical_real_data_baseline_snapshot(path, require_approved = FALSE)

approve_canonical_real_data_baseline_snapshot(
  snapshot,
  approved_by,
  approved_at,
  notes = snapshot$notes
)

write_canonical_real_data_baseline_snapshot(
  snapshot,
  path,
  require_approved = FALSE
)

Arguments

dataset

A validated PopgenVCFCanonicalDataset.

registry

A validated PopgenVCFCanonicalBaselineRegistry.

sample_metadata

Complete sample metadata containing sample, population, superpopulation, and sex fields.

dataset_version

Version of the acquired canonical dataset.

generated_by

Non-empty description of the generating workflow.

generated_at

ISO-8601 UTC timestamp.

source_commit

Full 40-character lowercase Git commit SHA.

approval

Either proposed or approved.

approved_by

Reviewer identity, required for approved snapshots.

approved_at

ISO-8601 review date, required for approved snapshots.

notes

Optional review notes.

snapshot

A canonical real-data baseline snapshot.

require_approved

Fail unless the snapshot has approved status.

path

Destination JSON path.

Value

The constructor and reader return a validated PopgenVCFCanonicalRealDataBaselineSnapshot. The approval helper returns a validated approved snapshot, the validator returns the snapshot invisibly, and the writer returns the normalized output path.