Tutorials › Statistical Methods for Single-Cell RNA Sequencing › Auditable Reports With Parameters and Provenance

Reproducible End-to-End Workflows · Tutorial 699 of 700

Auditable Reports With Parameters and Provenance

Learn how to make a single-cell analysis report traceable to the inputs and execution choices that produced its results.

Intermediate 11 min read

What You'll Learn

  • Distinguish a readable report from an auditable record of an analysis run.
  • Identify the input, code, software, configuration, seed, and status details a report should expose.
  • Summarize single-cell workflow outcomes without obscuring failed steps or validation warnings.
  • Work through a compact run summary and check its numerical consistency.
  • Recognize what provenance can establish and what it cannot establish about results.

From Results to an Auditable Run

A single-cell report may show a clustering, a marker-gene table, or a cell-type annotation, but those results are difficult to assess if the reader cannot tell which inputs and execution choices produced them. A figure without traceable context can be visually clear yet leave basic questions unanswered: Which count matrix was used? Which version of the analysis code ran? Were the displayed parameters the values actually used, or merely the defaults in a configuration file?

An auditable report links results to the specific run that produced them. It does not replace the analysis, validation checks, or a retained workflow record. Its purpose is to expose a compact, interpretable account of the run: enough information for a reviewer to identify its inputs and choices, understand its status, and locate relevant outputs. The earlier material on computational and statistical reproducibility distinguishes reproducing computation from reproducing scientific conclusions; a run summary supports scrutiny of both, but cannot guarantee either.

Definition: A run summary is a report section that records the identity of the analysis run and its inputs, code, software environment, resolved configuration, random-seed information, execution status, validation status, and principal outputs. Provenance is the recorded information connecting an output to the inputs and computational steps that produced it. A checksum can identify a particular file representation, but does not establish that the file is scientifically appropriate or correct.

What the Report Should Expose

A useful summary is compact, but it should not achieve compactness by hiding distinctions that affect interpretation. At minimum, a reader should be able to identify the following:

  • Run identity and time. Give a unique run identifier and a timestamp with a stated time zone, or an unambiguous standard such as UTC. A timestamp helps distinguish executions; it does not identify the inputs by itself.
  • Inputs. Name the input artifacts and record stable identifiers such as file checksums, object identifiers, or immutable data-version identifiers. State relevant dimensions and identifier conventions where needed to interpret the data. A checksum supports comparison of file identity, not validation of its scientific contents.
  • Code. Record the repository and commit identifier, and report whether the code tree had uncommitted changes. A commit alone does not identify uncommitted modifications that affected execution.
  • Software environment. Record the language and relevant package versions, ideally alongside a reference to the locked environment. Listing a few package versions is not equivalent to recording every system dependency, but it gives a reader important context.
  • Resolved configuration. Report the actual values used for consequential parameters, not only a path to a configuration file. Include units, scale, and interpretation when a value could otherwise be ambiguous.
  • Randomness. Record the seed values and, where relevant, the random-number-stream or parallel execution strategy. A seed is useful context, but does not by itself promise identical results across different software, hardware, or execution order.
  • Status and outputs. Separate workflow execution status from validation status. Name important outputs and their locations or identifiers. Indicate warnings, failures, and skipped steps rather than presenting a partial run as a complete success.

The report should be generated from the values and events recorded by the actual execution. If its author manually retypes the parameters, versions, or status after the fact, a discrepancy can arise between the report and the run. This is especially likely when defaults, environment variables, or command-line overrides change the resolved values. The configuration file can remain a useful input, but the report should expose the resolved settings that governed the analysis.

Key principle: An auditable report makes the chain from inputs to reported outputs inspectable. It should distinguish recorded facts (for example, a commit identifier or a failed validation) from interpretations (for example, whether a result is scientifically credible).

A Compact Summary as a Structured Record

A run summary can be presented as a table, a structured text block, or a generated section in a longer report. What matters is that fields have clear meanings and that separate concepts are not collapsed into one label. For instance, “complete” might mean that all workflow tasks finished, whereas “validation passed” means that the specified checks met their criteria. Neither statement alone says that the analysis is statistically appropriate for its scientific question.

The following compact record is for a hypothetical single-cell workflow. The numbers and identifiers are illustrative. The input matrix is described as genes by cells; an actual report should specify its own dimension convention and what those dimensions count.

Worked Example: Reporting a Single-Cell Run

A hypothetical workflow starts from a matrix containing 18,400 genes and 12,000 cell columns. It filters cells using a minimum of 200 detected genes and a maximum mitochondrial fraction of 0.15, then performs normalization, dimensionality reduction, and clustering. The run summary records the following:

FieldHypothetical run record
Run ID and timesc-2026-104; 2026-10-28 14:20 UTC
Inputcounts.h5; SHA-256 recorded as 8f2…c91; matrix dimensions 18,400 genes by 12,000 cells
CodeRepository commit 4a72d1c; working tree clean
EnvironmentPython 3.12.2; Scanpy 1.10.3; NumPy 2.1.1; locked environment file identified
Resolved settingsMinimum detected genes 200; maximum mitochondrial fraction 0.15; target sum 10,000; 30 principal components; 15 neighbors; clustering resolution 0.6
RandomnessSeed 20261028 for the recorded stochastic steps; parallel execution settings recorded
Counts and status12,000 input cells; 10,920 retained; workflow completed; specified output checks passed
OutputsFiltered object and report tables, each with a recorded output checksum

The cell-retention percentage is calculated from the stated counts:

$$ \frac{10{,}920}{12{,}000}\times 100\% = 91.00\%. $$

The number removed is \(12{,}000-10{,}920=1{,}080\), so the removed proportion is \(1{,}080/12{,}000=0.0900\), or 9.00%. These two percentages sum to 100%. This arithmetic checks consistency between the reported starting and retained cell counts; it does not establish that the filtering rule is appropriate or that every cell was classified correctly.

The abbreviated checksum in the table is only a display aid. A production record should preserve the full checksum in a machine-readable field or stable location. Likewise, “specified output checks passed” is meaningful only if the report identifies what was checked, such as whether expected files exist and whether recorded dimensions meet prespecified criteria. The summary should not imply that all possible properties of an output were tested.

Why Resolved Values and Status Matter

A report that says only “parameters: config.yaml” leaves a reviewer dependent on a separate file and does not reveal whether the run used that file unchanged. A configuration may include defaults, substitutions, or overrides. Reporting resolved values gives the reader a direct account of the settings applied in that execution. The same logic applies to software: a package name without a version is often insufficient to distinguish behavior across installations.

Status also needs more than one field. Consider a workflow in which preprocessing and clustering finish, but a required validation check fails. “Workflow completed” could correctly describe execution of all tasks, yet “validation failed” must remain visible. Conversely, a task can be deliberately skipped under the recorded configuration; reporting it as successful would be misleading. A clear report states which steps ran, which checks were performed, and the outcome of each relevant check.

A practical design treats the summary as a record generated from run metadata, rather than as free-form narrative alone. In a simplified representation, let \(R\) denote a run record:

$$ R = (I, C, E, \theta, S, W, O), $$

where \(I\) identifies inputs, \(C\) identifies code, \(E\) describes the software environment, \(\theta\) contains resolved analysis settings, \(S\) records seed and randomness details, \(W\) records workflow and validation status, and \(O\) identifies outputs. This notation is a way to organize information, not a claim that one fixed schema is suitable for every workflow.

Worked Example: Resolving a Configuration Override

Suppose a hypothetical configuration file specifies a target sum of 10,000, but a command-line option for a particular run sets it to 8,000. The resulting object records 9,600 cells retained from 12,000 input cells. A report that merely names the configuration file would hide which target sum governed this execution. The run record should state the resolved value, 8,000, and may also note that it came from a command-line override.

The retained fraction is:

$$ \frac{9{,}600}{12{,}000}=0.800, \qquad 0.800\times 100\%=80.00\%. $$

The removed count is \(12{,}000-9{,}600=2{,}400\), and \(2{,}400/12{,}000=0.200\), or 20.00%. The counts and percentages are internally consistent. They do not show whether the override caused the retention rate, since other filtering settings or input properties might also affect retention. The correct report records the effective setting and the observed outcome without asserting a causal explanation unsupported by this comparison.

A Justification for Recording the Run Components

The run-record structure can be justified by asking what a reviewer needs to distinguish two executions that yield different outputs. If the input identity is unknown, a changed output might reflect changed data. If code or environment differs, it might reflect changed implementation or dependencies. If resolved parameters or random-number handling differ, those are additional possible sources of variation. If status and output identity are absent, the reviewer may not know whether the reported result came from a complete run or which artifact to inspect.

This is not a mathematical guarantee that a particular list is sufficient for every software stack. It is a traceability argument: omitting a category can leave a plausible explanation for differences unrecorded. Recording the categories makes specific comparisons possible. For example, if two runs have matching input checksums, code commits, software environments, resolved settings, and recorded randomness details, then the report supports a more informative comparison than a pair of unlabeled figures. It still does not prove that the executions are identical in every unrecorded detail.

1
Identify the objects.
Record stable identifiers for inputs, code, environment, and outputs; use dimensions and conventions to make the data description interpretable.
2
Record what actually ran.
Capture resolved settings, seed information, and workflow events from execution metadata rather than reconstructing them from memory.
3
Report outcomes without conflation.
Separate task completion, validation results, warnings, and scientific interpretation; identify partial or failed runs explicitly.
4
Check consistency and exposure.
Verify that reported counts and output references agree with recorded artifacts, and ensure that the report does not expose credentials or other secrets.

Worked Example: Reporting a Failed Check Honestly

A hypothetical run processes 2,500 cells and writes a filtered object. The workflow exits with status code 0, but a required check finds that the output has 2,480 cells while the run metadata claims 2,470 retained cells. The discrepancy is \(2{,}480-2{,}470=10\) cells. The fact that the workflow process exited successfully does not resolve the contradiction.

A suitable summary would distinguish the two records: “workflow execution completed; output-count validation failed; recorded retained count 2,470; observed output count 2,480; difference 10.” It should not label the run fully validated or silently replace one value with the other. The next step is to investigate the source of the mismatch, such as whether the metadata and artifact refer to different outputs. Until resolved, downstream interpretation should treat the reported artifact and count as inconsistent.

Diagnostics, Alternatives, and Limits

Warning signs include a report that lists only a configuration filename, an unversioned software stack, a seed without any description of which stochastic steps used it, output names without stable identifiers, or a single “success” field that conceals failed checks. Other warning signs are internally inconsistent counts, a checksum that was computed for a different file than the one analyzed, and a report that was edited manually without being regenerated after the run. A report should also be checked for accidental disclosure of access tokens, private file paths, or sensitive sample identifiers; auditability does not justify publishing secrets.

A concise prose summary is easy to read but can omit fields or drift from the run. A structured manifest is easier to validate and compare programmatically, but can be hard to interpret without a human-readable explanation. A robust approach uses structured metadata as the source of truth and renders a compact human-readable summary from it. For smaller workflows, a carefully maintained table may be adequate, provided it is generated or checked against the execution record. None of these formats is a substitute for retaining the input artifacts or a secure, stable reference to them.

Checksums have a specific, limited role. If the same checksum algorithm is applied to two files and the resulting digests match, this is strong evidence that the files have the same byte representation, subject to the properties of the algorithm and the exact hashing procedure. It does not prove that the data were collected correctly, that cell identifiers are valid, or that a particular analysis is suitable. Similarly, a recorded seed supports interpretation of a stochastic run, but exact equality of results is not guaranteed across changed software versions, parallel execution arrangements, or hardware. These limitations complement the earlier material on seed management and reproducible randomness.

The report’s role is therefore evidential and operational: it helps readers find what was used, what was run, and what happened. It should not be presented as proof that the results are unbiased, that assumptions are satisfied, or that observed biological patterns are causal. Those conclusions require appropriate scientific and statistical reasoning beyond provenance records.

Common Mistakes

  • Reporting only a configuration filename. A file reference does not reveal overrides or resolved defaults. Report the effective values used in the run.
  • Treating a checksum as a quality certificate. A checksum helps identify a file representation; it does not establish that the input is valid or scientifically appropriate.
  • Using one status label for everything. A workflow can finish while validation fails. Report execution and checks separately.
  • Interpreting a fixed seed as a guarantee. A seed is one reproducibility detail, not a guarantee of bit-for-bit agreement across environments or parallel execution choices.
  • Inferring one-sided missing counts from a difference in set sizes. If two identifier sets have different sizes, their size difference is only a net difference. The number of identifiers present in one set but absent from the other requires a direct comparison or additional assumptions.
  • Confusing a traceable result with a scientifically validated result. Provenance makes a result easier to inspect; it does not by itself establish the validity of the analysis or its interpretation.
Key takeaway: A useful run summary records the inputs, code, environment, resolved parameters, randomness details, workflow and validation status, and outputs in a way that can be checked against the execution. It improves traceability, but it does not substitute for scientific validation.

Check Your Understanding

For each question, consider what the report allows a reviewer to verify. Full solutions follow the questions.

  1. A workflow reports 8,000 input cells and 7,200 retained cells. What are the removed count and retained percentage?
  2. A report names a configuration file whose target sum is 10,000, but the run was launched with an override of 8,000. Which value should the run summary identify as resolved, and why?
  3. A pipeline exits successfully, but a required output check fails. How should the report describe the run?
  4. Two identifier sets have sizes 4,900 and 5,000. Can the size difference alone establish that exactly 100 identifiers in the larger set are absent from the smaller set? Explain.
  5. What can a matching input checksum support, and what can it not establish?

Solutions. (1) The removed count is \(8{,}000-7{,}200=800\). The retained percentage is \((7{,}200/8{,}000)\times100\%=90.00\%\). (2) Report 8,000 as the resolved target sum because it is the value actually used; the report may also state that it came from an override. (3) State that workflow execution completed but the required output check failed. Do not describe the run as fully validated. (4) No. The size difference is a net difference. Some identifiers may be missing in either direction; a direct identifier-by-identifier comparison is needed to determine either one-sided difference. (5) A matching checksum supports that the files have the same byte representation under the stated hashing procedure. It does not establish that the input is correct, complete, appropriate, or scientifically valid.

Clinical Biostats