2  Reading the graph views

The graph chapters collect simplified views of the real {targets} dependency graph. They are meant to make the workflow easier to reason about before reading the target code directly.

The diagrams are generated from tagged target metadata and the real dependency graph, then simplified by pruning or bypassing lower-level nodes that would make each view harder to read. They keep real target names and preserve the dependency structure where practical, while staying compact enough to build intuition about the main control points.

The following chapters cover the main pipeline, the differential analyses module, and the genetic enrichment module.

2.1 Trace one configured aggregation

The quickest way to understand the implementation is to follow one value across the graph:

  1. immune_human_2x is a key in cfg_aggregations.yaml.
  2. read_aggregation_config_tibble() resolves manifest defaults and inheritance into one aggregation row.
  3. build_aggregation_tibble() filters active rows and adds symbols for GEM-well, derived QC-group, and aggregation-level upstream targets.
  4. The root _targets.R passes that row through tar_map(names = aggregation, delimiter = ".").
  5. A base target such as multimodal_Seurat_object becomes multimodal_Seurat_object.immune_human_2x.
  6. Description tags make selected targets discoverable as checkpoints or graph nodes, while structured file helpers derive output paths from the active target name.

Inspect the exact target command and description without running it:

targets::tar_manifest(
  names = tidyselect::matches(
    "^multimodal_Seurat_object[.]immune_human_2x$"
  ),
  fields = c(name, command, description),
  callr_function = NULL
)

This trace connects the parameter manifest, mapping tibbles, and target-symbol columns before the larger diagrams introduce many nodes at once.

2.2 What the diagrams omit

The curated graph views are orientation aids, not alternate target definitions. A node can be absent because it was pruned as a lower-level implementation detail, bypassed to preserve a useful dependency path, or omitted because it lacks the graph-membership tag for that view. Use tar_manifest() or the source target files when exact completeness matters.

%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryTextColor': '#1f2937',
    'lineColor': '#4b5563',
    'clusterBkg': '#f8fafc',
    'clusterBorder': '#cbd5e1',
    'edgeLabelBackground': '#ffffff00',
    'fontFamily': 'Helvetica, Arial, sans-serif'
  },
  'flowchart': {
    'defaultRenderer': 'elk'
  },
  'themeCSS': '.cluster rect { fill: #f8fafc !important; stroke: #cbd5e1 !important; } .cluster-label text, .cluster-label span { font-weight: 700 !important; font-size: 16px !important; fill: #475569 !important; color: #475569 !important; }'
}}%%
flowchart TB
  subgraph Legend["Node Color Key"]
    direction LR
    Input["Input"] --- Config["Config input"] --- Stage["Intermediate object"] --- Output["Output"] --- QC["QC output"]
  end
  linkStyle 0,1,2,3 stroke-width:0px,fill:none;
  classDef regular_input fill:#dbeafe,stroke:#3b82f6,color:#1e3a8a;
  classDef CFG_input fill:#f3e8ff,stroke:#8b5cf6,color:#6d28d9;
  classDef intermediate_object fill:#f8fafc,stroke:#64748b,color:#1f2937;
  classDef regular_output fill:#ecfdf5,stroke:#10b981,color:#065f46;
  classDef QC_output fill:#fff7ed,stroke:#f97316,color:#9a3412;
  classDef optional_regular_input fill:#dbeafe,stroke:#3b82f6,stroke-dasharray: 5 5,color:#1e3a8a;
  classDef optional_intermediate_object fill:#f8fafc,stroke:#64748b,stroke-dasharray: 5 5,color:#1f2937;
  classDef optional_regular_output fill:#ecfdf5,stroke:#10b981,stroke-dasharray: 5 5,color:#065f46;
  classDef junction_node fill:none,stroke:none,color:#334155,font-weight:bold;
  class Input regular_input;
  class Config CFG_input;
  class Stage intermediate_object;
  class Output regular_output;
  class QC QC_output;