Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Order cell states with pseudotime

A single-cell experiment measures cells at one time point, but it may capture several stages of a process. Pseudotime places those cells along a graph-based coordinate. In CyteArc, chosen starting and terminal populations orient that coordinate. It does not measure elapsed time or establish which cells give rise to others.

We use a developing-pancreas dataset to order cells from Ductal-like progenitors toward Alpha, Beta, and Delta populations, then find genes associated with that ordering.

Open the prepared analysis

DataStore has 3696 (3696) cells with 1 assays: RNA Cell metadata: 'I', 'ids', 'names', 'G2M_score', 'RNA_UMAP1', 'RNA_UMAP2', 'RNA_clusters', 'RNA_leiden_cluster', 'RNA_nCounts', 'RNA_nFeatures', 'RNA_percentMito', 'RNA_percentRibo', 'S_score', 'clusters', 'clusters_coarse' RNA assay has 27998 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'highly_variable_genes', 'nCells'

Started: 2026-10-11T18:54:51.748056Z | Wall time: 7.804 s

The saved analysis supplies the graph, UMAP, and feature selection. The store’s live clusters column contains the published cell-type annotations; these differ from the numbered clusters calculated by the pipeline.

Choose a start and endpoints

We use the published Ductal annotation as the source and pool Alpha, Beta, and Delta as sinks. This is a biological assumption to check with marker evidence, not something pseudotime discovers for us.

The vector below assigns a total of -1 to the source and +1 to the pooled sinks. All other cells receive zero. Sharing each total across its cells keeps source and sink mass balanced despite their different sizes.

{'source cells': 916, 'sink cells': 1142, 'source weight': -1.0, 'sink weight': 1.0}

Started: 2026-10-11T18:54:59.555365Z | Wall time: 0.019 s

Score and view pseudotime

Pancreas UMAP coloured by pseudotime from zero to one. Scores rise from the chosen Ductal source on the right toward the pooled Alpha, Beta, and Delta sinks on the left.

Started: 2026-10-11T18:54:59.576729Z | Wall time: 2.455 s

Low values should lie toward the Ductal region and high values toward the endocrine endpoints. The default rescales the score from zero to one. Intermediate values are expected for intermediate populations; the spacing is not a clock.

Check the score within each annotation, using only cells marked valid:

countmeanstdmin25%50%75%max
cell type
Alpha481.00.9591140.0114270.8563330.9550740.9624450.9669740.975449
Beta591.00.9699540.0199400.9118690.9554990.9698780.9870211.000000
Delta70.00.9209870.0064490.9025920.9185070.9220150.9234730.944463
Ductal916.00.0228840.0157870.0000000.0105470.0240640.0304420.120687
Epsilon142.00.9232470.0288270.8360760.9092760.9289150.9466950.960882
Ngn3 high EP642.00.5004950.1764100.0869140.3775370.5493240.6255770.770497
Ngn3 low EP262.00.0536540.0376500.0002370.0294260.0394940.0766450.294520
Pre-endocrine592.00.8633030.0612510.4163780.8161360.8764900.9169080.952879

Started: 2026-10-11T18:55:02.033895Z | Wall time: 0.031 s

In this example, Ductal cells have low scores, endocrine endpoints have high scores, and Ngn3-high progenitors occupy the middle. A pattern that disagrees with known markers is a reason to revisit the graph or endpoint choice.

Find genes associated with the ordering

The full result includes untested features, which have missing p-values. The first few rows may therefore contain NaN. Multiple-testing correction covers only the tested features; we select those after previewing the table.

feature_indexfeature_namefeature_idr_valuep_valuep_value_adjusted
00Xkr4Xkr40.0NaNNaN
11Gm37381Gm373810.0NaNNaN
22Rp1Rp10.0NaNNaN
33Rp1-1Rp1-10.0NaNNaN
44Sox17Sox170.0NaNNaN

Started: 2026-10-11T18:55:02.067207Z | Wall time: 3.547 s

Keep tested genes, then compare the strongest increasing and decreasing associations:

feature_namer_valuep_value_adjusted
increasing14296Gnas0.7333780.0
23549Cpe0.7273400.0
21244Aplp10.7247620.0
3186Fam183b0.6671800.0
25060Hmgn30.6349820.0
26573Bex20.6222860.0
26730Pcsk1n0.6197150.0
2189Rap1b0.5985310.0
4284Ubb0.5967820.0
5837Scgn0.5936440.0
decreasing18864Spp1-0.8282830.0
24581Rpl13-0.8223000.0
22385Rps19-0.8128870.0
16254Rps8-0.8092830.0
431Dbi-0.7982670.0
19815Rpl32-0.7830620.0
26498Rps4x-0.7818890.0
13425Rpl12-0.7681390.0
10164Rps2-0.7544980.0
20787Mgst1-0.7457160.0

Started: 2026-10-11T18:55:05.616793Z | Wall time: 0.020 s

Positive correlations identify genes whose expression tends to increase along the chosen axis; negative correlations identify decreasing genes. These are candidates to inspect, not evidence that they drive development.

Common mistakes and limitations

  • Treating the ordering as discovered rather than supervised: source and sink choices define the axis, so test plausible alternative endpoints before making a developmental claim.

  • Forgetting that only the largest connected graph component is scored by default: excluded cells have valid=False and undefined values. Apply the validity mask to your own summaries; CyteArc’s pseudotime marker and aggregation methods apply it automatically.

  • Relying on correlation alone: genes that rise and fall along the path can be missed, so use Follow gene expression along pseudotime to inspect such profiles.

Continue to Explore candidate cell fates for several possible terminal outcomes, or Trajectory validation checklist for checks across graph and endpoint choices.