Change one analysis setting, compute only the results that depend on it, and compare the analyses. The example starts from a saved RNA analysis of 100,000 cells from 28 tissues of 24 donors in the Tabula Sapiens human atlas The Tabula Sapiens Consortium & Quake (2024) and changes one setting at a time: the neighbor count from 21 to 31, and separately the number of principal components from 30 to 40. With 31 neighbors, CyteArc reuses the saved normalization, PCA, and nearest-neighbor search index and computes only new neighbors and a new graph; with 40 components, the analysis forks at PCA. At Leiden resolution 1.0, the saved analysis has 52 clusters, the 31-neighbor analysis 49, and the 40-component analysis 60. Against the saved clusters, the 31-neighbor clusters score an adjusted Rand index (ARI) of 0.93, the same as the saved graph clustered again with another random seed, and the 40-component clusters 0.87. A plan of the full RNA recipe with 31 neighbors reports, before anything runs, that its first eight stages need no new results, and the finished run records each stage’s time, cores, and memory.
The examples need CyteArc’s extra optional dependencies (installation).
Open the saved analysis¶
The prepared store holds the atlas sample and a completed RNA pipeline run labeled rna.
import cytearc
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Keep routine logs and progress bars out of the outputs.
cytearc.configure_output(level="WARNING", progress=False)
# Download the prepared store and open it for writing, so new results are saved beside the run.
dataset = cytearc.datasets.connect("cytearc_docs").download_dataset(
"tabula_sapiens_100k",
destination="cytearc_datasets",
zarr=True,
)
ds = cytearc.DataStore(f"{dataset}/data.zarr", nthreads=4)
# Open the saved RNA run and read the settings that it recorded.
baseline_run = ds.pipeline.open(label="rna")
saved_config = baseline_run.report()["run"]["config"]
saved_stages = saved_config["stages"]
# Describe the cells and the settings that the next sections change.
tissues = len(set(ds.cells.fetch("tissue_in_publication")))
donors = len(set(ds.cells.fetch("donor_id")))
print(baseline_run)
print(f"{ds.cells.N:,} cells from {tissues} tissues of {donors} donors")
print(
f"{saved_stages['hvg']['top_n']:,} variable genes, "
f"{saved_stages['pca']['dims']} principal components, "
f"{saved_stages['neighbors']['k']} neighbors, "
f"Leiden resolution {saved_stages['leiden']['selected']}"
)
print("Run outputs:", ", ".join(baseline_run))PipelineRun(run_id='0559770dee10...', recipe='rna', status='completed', assay='RNA', label='rna')
100,000 cells from 28 tissues of 24 donors
2,000 variable genes, 30 principal components, 21 neighbors, Leiden resolution 1.0
Run outputs: input_cell_selection, analysis_cell_selection, feature_universe, highly_variable_features, normalized, pca, ann_index, neighbors, connectivity_map, embedding_initialization, umap, clusters, markers, leiden
Started: 2026-11-14T15:42:40.722499Z | Wall time: 31.972 s
The saved run kept 30 principal components and built a graph of 21 neighbors per cell, the two settings that the next sections change. The run then clustered the graph with Leiden at resolutions 0.5 and 1.0 and kept the resolution 1.0 partition as its clusters. A pipeline run records one call of a recipe, a method such as ds.pipeline.rna that runs every stage of an analysis, from freezing the input cells and their metadata to ranking markers. The run keeps the call’s settings and, for each output listed above, an artifact reference that identifies one saved, immutable result without loading it: baseline_run["pca"], for example, returns the reference of the run’s PCA.
Change one setting at a time¶
A call reuses an artifact when the store holds a complete one with the same operation, parameters, and inputs, and computes a new one otherwise. Starting from the cells and variable genes that the saved run analyzed, build the chain from normalization to the neighbor graph three times: with the saved settings, with 31 neighbors, and with 40 principal components.
# Take the cells and variable genes that the saved run analyzed.
cell_selection = baseline_run["analysis_cell_selection"]
hvg_ref = baseline_run["highly_variable_features"]
# Compute, or reuse, each step from normalization to the neighbor graph.
def build_graph(dims, k):
normalized = ds.features.normalize(cell_selection, hvg_ref)
pca = ds.reduction.pca(normalized, dims=dims)
search_index = ds.graph.ann_index(pca)
neighbors = ds.graph.neighbors(search_index, k=k)
return {
"normalized expression": normalized,
"PCA": pca,
"search index": search_index,
"neighbors": neighbors,
"graph": ds.graph.connectivity(neighbors),
}
# Repeat the saved settings, then change the neighbor count, then the number of components.
analyses = {
"k = 21, 30 PCs": build_graph(dims=30, k=21),
"k = 31, 30 PCs": build_graph(dims=30, k=31),
"k = 21, 40 PCs": build_graph(dims=40, k=21),
}
# Check that the saved settings return the saved run's own artifacts.
saved_keys = ["normalized", "pca", "ann_index", "neighbors", "connectivity_map"]
saved_refs = [baseline_run[key] for key in saved_keys]
print(
"Saved settings return the saved run's artifacts:",
list(analyses["k = 21, 30 PCs"].values()) == saved_refs,
)
# Show the first 12 characters of the artifact ID that each analysis uses at each step.
pd.DataFrame(
{
name: {step: ref.artifact_id[:12] for step, ref in steps.items()}
for name, steps in analyses.items()
}
)Saved settings return the saved run's artifacts: True
| k = 21, 30 PCs | k = 31, 30 PCs | k = 21, 40 PCs | |
|---|---|---|---|
| normalized expression | 2ae95f7440d9 | 2ae95f7440d9 | 2ae95f7440d9 |
| PCA | f908664365e5 | f908664365e5 | 75dcb79e0384 |
| search index | 00cc6d313614 | 00cc6d313614 | 9f016a5d8ff3 |
| neighbors | 44b2e986053c | a8b32a8c8f55 | e49ad087ee95 |
| graph | d4d3ea3d3293 | 86639066c229 | 8f5d6d7bb3e3 |
Started: 2026-11-14T15:43:12.700959Z | Wall time: 78.576 s
Repeating the saved settings returned the saved run’s own five artifacts, so nothing was computed. The 31-neighbor analysis shares the saved normalized expression, PCA, and search index: the index is built over the 30 principal components and returns any number of neighbors per query, so only the neighbors and the graph are new. Of these five steps, the 40-component analysis shares only the normalized expression: PCA changes, and so do the search index, the neighbors, and the graph, which all depend on PCA.
Trace where the analyses diverge¶
ds.artifacts.lineage follows the inputs that results record back to the cells and genes they came from, and reports each shared input once. Trace the three graphs together:
# Trace the three graphs back through every recorded input.
lineage = ds.artifacts.lineage(
{f"{name} graph": steps["graph"] for name, steps in analyses.items()}
)
print(lineage)ArtifactLineage(outputs=3, artifacts=16, dependencies=23)
Started: 2026-11-14T15:44:31.279706Z | Wall time: 0.469 s
The lineage covers 16 artifacts and 23 dependencies, held as a NetworkX directed graph in lineage.graph. The diagram below draws lineage.graph with each artifact colored by the analysis that added it to the store, and leaves out an arrow when a longer path already connects the two artifacts, such as the arrow from the analysis cells to the normalized expression.
Source
import networkx as nx
from matplotlib.patches import FancyArrowPatch, FancyBboxPatch
# Name each kind of artifact, with the setting that tells the analyses apart.
names = {
"cell_selection": "analysis cells",
"metadata_snapshot": "gene names",
"feature_summary": "gene statistics",
"feature_selection": "variable genes",
"normalized": "normalized expression",
"feature_scaling": "gene scaling",
"reduction": "PCA, {dims} PCs",
"ann_index": "search index",
"neighbors": "neighbors, k = {k}",
"connectivity_map": "graph",
}
# Assign each artifact to the analysis that added it: the saved run, then 31 neighbors, then 40 PCs.
graph = lineage.graph
saved_graph = analyses["k = 21, 30 PCs"]["graph"]
k31_graph = analyses["k = 31, 30 PCs"]["graph"]
saved_artifacts = nx.ancestors(graph, saved_graph) | {saved_graph}
k31_artifacts = nx.ancestors(graph, k31_graph) | {k31_graph}
branch = {
node: "saved run"
if node in saved_artifacts
else "new for k = 31"
if node in k31_artifacts
else "new for 40 PCs"
for node in graph
}
lanes = {"new for 40 PCs": -1, "saved run": 0, "new for k = 31": 1}
colors = {
"saved run": "#d9d9d9",
"new for k = 31": "#0072B2",
"new for 40 PCs": "#E69F00",
}
# Drop each arrow that a longer path already implies, and put each result one row above the highest result that reads it.
drawn = nx.transitive_reduction(graph)
order = list(nx.topological_sort(drawn))
row = {}
for node in reversed(order):
children = list(drawn.successors(node))
row[node] = min(row[child] for child in children) - 1 if children else 0
top = min(row.values())
row = {node: value - top for node, value in row.items()}
# Place each result in its analysis's column, and a lone parent above its only child.
lane_gap, row_gap, box_w, box_h = 2.15, 0.62, 1.85, 0.36
x = {}
for node in sorted(order, key=lambda node: -row[node]):
peers = sorted(
(
other
for other in drawn
if row[other] == row[node] and branch[other] == branch[node]
),
key=lambda other: list(names).index(other.kind),
)
children = list(drawn.successors(node))
if len(peers) > 1:
offset = peers.index(node) - (len(peers) - 1) / 2
x[node] = lanes[branch[node]] * lane_gap + offset * (box_w + 0.25)
elif len(children) == 1:
x[node] = x[children[0]]
else:
x[node] = lanes[branch[node]] * lane_gap
# Draw a box per result, an arrow per input, and a legend of the three analyses.
n_rows = max(row.values()) + 1
width, height = 2 * lane_gap + box_w + 0.2, n_rows * row_gap + 0.1
figure = plt.figure(figsize=(width, height))
axis = figure.add_axes((0, 0, 1, 1))
axis.set_xlim(-width / 2, width / 2)
axis.set_ylim(-height + row_gap / 2 + 0.05, row_gap / 2 + 0.05)
axis.axis("off")
for node in drawn:
center_x, center_y = x[node], -row[node] * row_gap
axis.add_patch(
FancyBboxPatch(
(center_x - box_w / 2, center_y - box_h / 2),
box_w,
box_h,
boxstyle="round,pad=0,rounding_size=0.06",
facecolor=colors[branch[node]],
edgecolor="none",
)
)
label = names[node.kind].format(**(graph.nodes[node]["status"].parameters or {}))
text_color = "white" if branch[node] == "new for k = 31" else "black"
axis.text(center_x, center_y, label, ha="center", va="center", fontsize=9.5, color=text_color)
for source, target in drawn.edges:
axis.add_patch(
FancyArrowPatch(
(x[source], -row[source] * row_gap - box_h / 2),
(x[target], -row[target] * row_gap + box_h / 2),
arrowstyle="-|>",
mutation_scale=9,
color="#555555",
linewidth=0.9,
shrinkA=0,
shrinkB=0,
)
)
axis.legend(
handles=[
plt.Line2D([], [], marker="s", linestyle="", markersize=10, color=color, label=label)
for label, color in colors.items()
],
loc="center",
bbox_to_anchor=(lane_gap, -3.5 * row_gap),
bbox_transform=axis.transData,
frameon=False,
fontsize=9.5,
)
# Release the figure from pyplot so that it shows once, as the cell's result.
plt.close(figure)
figure
Started: 2026-11-14T15:44:31.751315Z | Wall time: 0.236 s
The diagram adds the shared results that the table leaves out: the analysis cells, the gene names and gene statistics that the variable-gene selection read, the variable genes, and the gene scaling that both PCA results read, each gene’s mean and standard deviation. lineage.to_markdown() exports the lineage as Markdown, with a Mermaid diagram and each artifact’s operation, parameters, and path, to keep with an analysis or share in a review. lineage.to_mermaid() returns the diagram source alone.
Plan a recipe run before starting it¶
ds.pipeline.plan takes a recipe’s name and its arguments and reports which stages the call would reuse and which it would compute, and why, without computing or writing anything (Plan a call). Repeat the saved run’s recorded settings with 31 neighbors in place of 21: the saved run switched off QC filtering, cell-cycle scoring, and doublet scoring, and its record supplies the variable-gene, PCA, and Leiden settings and the cell columns that it froze with its cells (snapshot_columns):
# Repeat the saved run's settings with 31 neighbors in place of 21.
k31_call = dict(
filtering=False,
cell_cycle=False,
hvg=saved_stages["hvg"],
pca=saved_stages["pca"],
neighbors={"k": 31},
leiden=saved_stages["leiden"],
doublets=False,
snapshot_columns=saved_config["snapshotColumns"],
)
# Report what the call would reuse and compute, without running it.
plan = ds.pipeline.plan("rna", **k31_call)
# List the stages that the call runs, with what each computed stage took in the saved run.
pd.DataFrame(
[
{
"stage": stage.stage,
"status": stage.status,
"reason": stage.reason or "",
"wall time in the saved run (s)": ""
if stage.estimate is None
else round(stage.estimate.wall_seconds, 1),
}
for stage in plan.stages
if stage.status != "skipped"
]
).set_index("stage")| status | reason | wall time in the saved run (s) | |
|---|---|---|---|
| stage | |||
| input_snapshot | reused | ||
| highly_variable_features | reused | ||
| normalization | reused | ||
| pca | reused | ||
| ann_index | reused | ||
| neighbors | reused | ||
| connectivity | reused | ||
| embedding_initialization | reused | ||
| umap | computed | changed | 95.3 |
| leiden | computed | changed | 33.9 |
| markers | computed | upstream | 25.2 |
Started: 2026-11-14T15:44:31.990465Z | Wall time: 1.903 s
The call would reuse its first eight stages. Its neighbors and graph are the 31-neighbor results that build_graph saved above, and the UMAP initialization is computed from PCA, not from the graph. UMAP and the leiden stage, which clusters the graph at both resolutions, would compute because their input graph changed (changed), and marker ranking waits on the new clusters (upstream). The last column is what each computed stage took when the saved run computed it, on the machine that built the store.
Run the recipe and read what each stage used¶
Run the same call. The new run’s report, run_k31.report(), records for each stage its wall and CPU time, the peak resident memory (RSS) and OS threads of the process, and the bytes received over the network (Stage resources):
# Run the call that the plan described.
run_k31 = ds.pipeline.rna(**k31_call)
# Show the workers and memory budget that the run's process had, and the CPUs it could use.
report = run_k31.report()
resources = report["stages"][0]["metrics"]["resources"]
print(
f"{resources['workers']} workers, "
f"{resources['memoryBudgetBytes'] / 2**30:.0f} GiB memory budget, "
f"{resources['cpusAvailable']} CPUs available"
)
# Divide a measurement by a unit, leaving empty what this platform does not record.
def per(value, unit):
return None if value is None else value / unit
# Tabulate what each completed stage created, reused, and used, from the run's report.
rows = []
for stage in report["stages"]:
if stage["status"] != "completed":
continue
metrics = stage["metrics"]
dispositions = [entry["disposition"] for entry in stage["plans"]]
rows.append(
{
"stage": stage["stage"],
"created": dispositions.count("created"),
"reused": dispositions.count("reused"),
"wall (s)": metrics["wallSeconds"],
"CPU (s)": metrics["cpuSeconds"],
"cores": per(metrics["cpuSeconds"], metrics["wallSeconds"]),
"peak RSS (GiB)": per(metrics["rssPeakBytes"], 2**30),
"threads": metrics["threadsPeak"],
"received (MB)": per(metrics["networkRxBytes"], 1e6),
}
)
pd.DataFrame(rows).set_index("stage").round(
{"wall (s)": 1, "CPU (s)": 1, "cores": 1, "peak RSS (GiB)": 2, "received (MB)": 1}
)4 workers, 6 GiB memory budget, 20 CPUs available
| created | reused | wall (s) | CPU (s) | cores | peak RSS (GiB) | threads | received (MB) | |
|---|---|---|---|---|---|---|---|---|
| stage | ||||||||
| input_snapshot | 0 | 5 | 0.6 | 0.5 | 0.9 | 1.31 | 76 | 0.0 |
| highly_variable_features | 0 | 2 | 0.2 | 0.2 | 0.9 | 1.31 | 76 | 0.0 |
| normalization | 0 | 1 | 0.1 | 0.1 | 0.8 | 1.31 | 75 | 0.0 |
| pca | 0 | 2 | 0.1 | 0.0 | 0.6 | 1.31 | 75 | 0.0 |
| ann_index | 0 | 1 | 0.1 | 0.0 | 0.6 | 1.31 | 75 | 0.0 |
| neighbors | 0 | 1 | 0.1 | 0.1 | 0.8 | 1.31 | 75 | 0.0 |
| connectivity | 0 | 1 | 0.1 | 0.0 | 0.6 | 1.31 | 75 | 0.0 |
| embedding_initialization | 0 | 1 | 0.1 | 0.0 | 0.6 | 1.31 | 75 | 0.0 |
| umap | 1 | 0 | 131.8 | 130.1 | 1.0 | 1.57 | 76 | 0.0 |
| leiden | 2 | 0 | 81.1 | 88.1 | 1.1 | 1.65 | 76 | 0.0 |
| markers | 1 | 0 | 35.5 | 90.0 | 2.5 | 3.89 | 73 | 0.0 |
Started: 2026-11-14T15:44:33.896036Z | Wall time: 251.023 s
The process had 4 workers, set by nthreads=4 when the store was opened, and could use 20 CPUs. Its 6 GiB memory budget, set by the CYTEARC_MEM_BUDGET environment variable where this page ran, is the memory that CyteArc plans each operation to fit in (Memory budget). In the table, the created and reused columns count each stage’s artifacts, the cores column is CPU time divided by wall time, and the threads column counts the process’s OS threads, 73 to 76 here whatever the stage computes, so the cores column, not the threads column, shows how much of a stage ran in parallel.
The eight reused stages took at most 0.6 s each. UMAP took 131.8 s on one core: its layout runs on a single thread by default, because a parallel layout is not reproducible. The leiden stage created both partitions in 81.1 s on 1.1 cores: most of its time went to compiling CyteArc’s Leiden code at its first use in a new installation, which runs on one core, while the clustering itself runs on the store’s 4 workers. Marker ranking used 2.5 cores and reached the run’s highest peak RSS, 3.89 GiB, against 1.31 GiB during the reused stages. The received column stays at 0.0 MB because the store is on local disk. On a remote store, the column shows the bytes received during each stage, counted over the process’s network namespace: on a container worker that is mostly the stage’s reads, and on a laptop usually the whole machine’s traffic. The plan’s estimates put the three computed stages in the same order: UMAP 95.3 s planned and 131.8 s here, the leiden stage 33.9 s and 81.1 s, and marker ranking 25.2 s and 35.5 s.
Compare the three analyses¶
The 31-neighbor run holds its own UMAP and Leiden clusters beside the saved run’s. Lay out and cluster the 40-component graph the same way, and draw the three layouts side by side, colored by the atlas’s compartment annotation:
# Lay out and cluster the 40-PC graph as the recipe does, at the saved Leiden resolution.
dims40 = analyses["k = 21, 40 PCs"]
umap_dims40 = ds.embeddings.umap(dims40["graph"], ds.embeddings.initialization(dims40["PCA"]))
leiden_dims40 = ds.clusters.leiden(
dims40["graph"], resolution=saved_stages["leiden"]["selected"]
)
# Draw the three layouts side by side, colored by the atlas's cell compartments.
layouts = {
"k = 21, 30 PCs (saved run)": baseline_run["umap"],
"k = 31, 30 PCs": run_k31["umap"],
"k = 21, 40 PCs": umap_dims40,
}
figure, axes = plt.subplots(1, 3, figsize=(12, 4), layout="constrained")
for index, (axis, (title, layout)) in enumerate(zip(axes, layouts.items(), strict=True)):
ds.plots.embedding(
layout=layout,
color_by="compartment",
target=axis,
show_titles=False,
show_legend=index == 2,
show=False,
)
axis.set_title(title)
# Release the figure from pyplot so that it shows once, as the cell's result.
plt.close(figure)
figure
Started: 2026-11-14T15:48:44.921915Z | Wall time: 123.541 s
All three layouts keep the same compartments apart: two large immune groups, stromal and endothelial cells next to each other, several epithelial islands, and germline cells on their own. The 31-neighbor layout starts from the saved run’s initialization, which the run reused because the initialization is computed from the shared PCA, and keeps the saved arrangement. The 40-component layout starts from a new initialization computed from its own PCA and arranges the same compartments differently, with epithelial islands at the top, left, and right and no band along the bottom.
Count the clusters at the saved Leiden resolution, and score each clustering against the saved one with the adjusted Rand index (ARI), which is 1 for identical partitions and near 0 for chance agreement. Clustering the saved graph again with another random seed shows how far the seed alone moves the clusters:
# Find each run's Leiden clustering at the saved resolution by its graph, before another seed adds a second one.
def leiden_at_saved_resolution(run):
return ds.artifacts.find(
"clusters",
graph=run["connectivity_map"],
method="leiden",
resolution=saved_stages["leiden"]["selected"],
)
saved_clusters = leiden_at_saved_resolution(baseline_run)
k31_clusters = leiden_at_saved_resolution(run_k31)
# Cluster the saved graph again with another seed, to see how far the seed alone moves the clusters.
reseeded = ds.clusters.leiden(
baseline_run["connectivity_map"],
resolution=saved_stages["leiden"]["selected"],
random_seed=1,
)
# Count the clusters at the saved resolution, and score each clustering against the saved one.
clusterings = {
"k = 21, 30 PCs (saved run)": saved_clusters,
"k = 21, 30 PCs, another Leiden seed": reseeded,
"k = 31, 30 PCs": k31_clusters,
"k = 21, 40 PCs": leiden_dims40,
}
pd.DataFrame(
{
"clusters": [
np.unique(ds.artifacts.load_values(ref).values).size
for ref in clusterings.values()
],
"adjusted Rand index with the saved clusters": [
ds.clusters.compute_concordance(saved_clusters, ref)
for ref in clusterings.values()
],
},
index=list(clusterings),
).round(2)| clusters | adjusted Rand index with the saved clusters | |
|---|---|---|
| k = 21, 30 PCs (saved run) | 52 | 1.00 |
| k = 21, 30 PCs, another Leiden seed | 53 | 0.93 |
| k = 31, 30 PCs | 49 | 0.93 |
| k = 21, 40 PCs | 60 | 0.87 |
Started: 2026-11-14T15:50:48.466070Z | Wall time: 1.658 s
With another random seed, Leiden finds 53 clusters on the saved graph, against the saved run’s 52, with an ARI of 0.93. With 31 neighbors, Leiden finds 49 clusters with the same ARI, so the step from 21 to 31 neighbors moves the clusters no further than a new seed does. With 40 components, Leiden finds 60 clusters with an ARI of 0.87, so the step from 30 to 40 components changes this clustering more than a new seed does. The neighbor graph and clustering tutorials show how these settings shape a graph and its clusters.
Find a saved result by its inputs¶
ds.artifacts.list finds saved results by kind, operation, and exact inputs, and returns every match. Find the graph that the saved run built from its neighbors:
# Find the graph built from the saved run's neighbors; unpacking fails unless exactly one matches.
[reopened_graph] = ds.artifacts.list(
from_assay="RNA",
kind="connectivity_map",
operation="build_connectivity_map",
inputs={"neighbors": baseline_run["neighbors"]},
complete_only=True,
)
# Read the operation, parameters, and inputs that the graph recorded.
status = ds.artifacts.inspect(reopened_graph)
{
"saved run's graph": reopened_graph == baseline_run["connectivity_map"],
"operation": status.operation,
"parameters": status.parameters,
"inputs": status.inputs,
"complete": status.complete,
}{"saved run's graph": True,
'operation': 'build_connectivity_map',
'parameters': {'local_connectivity': 1.0, 'bandwidth': 1.5},
'inputs': {'neighbors': {'type': 'artifact',
'scope': 'assay',
'kind': 'neighbors',
'artifact_id': '44b2e986053ce86eda2342da8a752fc407dc160b0e8493cc403aed4a36de5985',
'assay': 'RNA'}},
'complete': True}Started: 2026-11-14T15:50:50.127255Z | Wall time: 0.015 s
Exactly one graph matched: the saved run’s, built by build_connectivity_map with a local_connectivity of 1.0 and a bandwidth of 1.5 from the saved neighbors, 55e63bce7f20 in the first table. The provenance guide explains how results record their inputs.
Recompute a result or recover from an interruption¶
invalidate_cache=True makes a call compute a new artifact even when a matching one exists, as in ds.features.normalize(cell_selection, hvg_ref, invalidate_cache=True), and leaves the earlier artifact on disk. CyteArc also stops reusing a result when a release changes what its operation computes (Operation revisions).
Ctrl-C stops a recipe at its next safe checkpoint, so the current computation may finish first. A cytearc.CancellationToken passed as cancel= stops the recipe the same way from another thread, and the recipe then raises cytearc.PipelineCancelled. Either way the run is recorded as interrupted, and repeating the call with the same settings and label starts a new run that reuses every result the interrupted one completed. Partial writes are never reused: ds.artifacts.prune_incomplete(dry_run=True) lists them, and dry_run=False removes them. Remove them only when no other process is writing to the store, because a write in progress also looks incomplete (artifacts API reference).
- The Tabula Sapiens Consortium, & Quake, S. R. (2024). Tabula Sapiens reveals transcription factor expression, senescence effects, and sex-specific features in cell types from 28 human organs and tissues. openRxiv. 10.1101/2024.12.03.626516