Skip to contents

Creates immutable module-execution and artifact records, assigns SHA256 content identities, validates producer and consumer relationships, derives a provenance DAG, verifies current content, exports interoperable lineage files, and embeds the lineage in portable reproducible projects.

Usage

new_lineage_execution(
  id,
  module,
  status = c("complete", "planned", "running", "failed", "skipped"),
  parameters = list(),
  software = list(),
  started_at = NA_character_,
  completed_at = NA_character_
)

new_lineage_artifact(
  id,
  module,
  name,
  type,
  format,
  producer,
  consumers = character(),
  path = NULL,
  object = NULL,
  metadata = list()
)

new_artifact_lineage(executions = list(), artifacts = list())

validate_artifact_lineage(lineage)

lineage_execution_table(lineage)

lineage_artifact_table(lineage)

artifact_lineage_dag(lineage, validate = TRUE)

verify_artifact_lineage(lineage, objects = list())

write_artifact_lineage(
  lineage,
  directory,
  formats = c("tsv", "json", "graphml", "dot")
)

set_project_artifact_lineage(project, lineage)

Arguments

id

Stable execution or artifact identifier.

module

Analysis module name.

status

Execution status.

parameters, software

Named execution metadata lists.

started_at, completed_at

Optional timestamps.

name

Stable artifact name.

type

Artifact type.

format

Artifact format.

producer

Identifier of the single producing execution.

consumers

Identifiers of consuming executions.

path

Existing artifact file path.

object

In-memory artifact when no file exists.

metadata

Named artifact metadata.

executions

List of PopgenVCFLineageExecution records.

artifacts

List of PopgenVCFLineageArtifact records.

lineage

A PopgenVCFArtifactLineage.

validate

Whether to validate before deriving the DAG.

objects

Named list of current in-memory objects indexed by artifact ID.

directory

Output directory.

formats

Export formats: TSV, JSON, GraphML, or DOT.

project

A PopgenVCFProject.

Value

Constructors return validated lineage objects. Table functions return data tables. artifact_lineage_dag() returns a PopgenVCFProvenanceDAG. verify_artifact_lineage() returns TRUE. The writer returns paths to created files, and set_project_artifact_lineage() returns an updated project.

Details

Each artifact has exactly one producer and zero or more consumers. File artifacts are hashed from bytes. In-memory artifacts are hashed from serialized R content. Artifact and execution identifiers occupy separate namespaces, and a producer cannot consume its own artifact.