Skip to contents

Register analysis modules, resolve their dependency graph, and execute them against a validated popgenVCF analysis state through the unified execution engine.

Usage

new_analysis_registry()

register_analysis(
  registry,
  name,
  run,
  requires = character(),
  enabled = TRUE,
  description = "",
  validate = validate_module_result,
  outputs = name,
  references = character(),
  resource_class = "standard",
  parallel_safe = FALSE,
  contract_version = "1.0"
)

list_analyses(registry)

resolve_analysis_order(registry, config, selected = NULL)

execute_analysis_registry(
  analysis,
  context,
  registry,
  selected = NULL,
  engine = new_execution_engine(),
  checkpoint_path = NULL
)

default_analysis_registry()

Arguments

registry

A PopgenVCFRegistry object.

name

Unique module name.

run

Module runner accepting analysis and context.

requires

Character vector of prerequisite module names.

enabled

Logical value or function accepting the validated config.

description

Short module description.

validate

Result validator accepting result, analysis, and context.

outputs

Declared analysis-result names.

references

Scientific references supporting the module.

resource_class

Expected resource class.

parallel_safe

Whether the module may run concurrently with independent modules. Parallel-safe modules must not modify the shared runtime context.

contract_version

Module-contract version.

config

Validated popgenVCF configuration.

selected

Optional module names.

analysis

A PopgenVCFAnalysis object.

context

Runtime context shared by module runners.

engine

A PopgenVCFExecutionEngine object.

checkpoint_path

Optional .rds path forwarded to execute_analysis_plan() for unconditional per-batch checkpointing.

Value

A registry, module table, execution order, or updated analysis/context bundle depending on the function.