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.

Read RNA and protein together with CITE-seq

Read a prepared CITE-seq analysis of 7,299 peripheral blood mononuclear cells (PBMCs) from a healthy human donor (10x Genomics dataset tenx_8K_pbmc_citeseq). CITE-seq measures RNA and surface proteins in the same cells: each antibody carries a DNA barcode, its antibody-derived tag (ADT), which is sequenced with the cell’s RNA. The dataset has 17 antibodies, 14 against surface proteins and 3 isotype controls. Weighted nearest neighbors (WNN) Hao et al., 2021 builds one neighbor graph from both assays, weighting RNA and protein separately for each cell.

Leiden clustering of the WNN graph gives 21 clusters, and protein carries more than half of the weight in 58% of cells. The CD4 and CD8a antibodies separate the CD4 and CD8 T-cell clusters sharply, while the CD4 transcript is detected in only 18 to 25% of the cells in the CD4 T-cell clusters, less often than in monocytes.

Open the prepared store and its runs

Started: 2026-11-14T15:42:39.420724Z | Wall time: 7.083 s

The download is a CyteArc store, a Zarr directory that holds the counts of both assays and the saved runs:

DataStore has 7299 (7865) cells with 2 assays: ADT RNA Cell metadata: 'I', 'ids', 'names', 'ADT_UMAP1', 'ADT_UMAP2', 'ADT_leiden_cluster', 'ADT_nCounts', 'ADT_nFeatures', 'RNA+ADT_UMAP1', 'RNA+ADT_UMAP2', 'RNA+ADT_leiden_cluster', 'RNA+ADT_wnn_UMAP1', 'RNA+ADT_wnn_UMAP2', 'RNA+ADT_wnn_leiden_cluster', 'RNA_UMAP1', 'RNA_UMAP2', 'RNA_clusters', 'RNA_leiden_cluster', 'RNA_nCounts', 'RNA_nFeatures', 'RNA_percentMito', 'RNA_percentRibo' ADT assay has 17 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'feature_type', 'genome', 'nCells', 'pattern', 'read', 'sequence' RNA assay has 33538 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'feature_type', 'genome', 'nCells', 'pattern', 'read', 'sequence'

Started: 2026-11-14T15:42:46.507263Z | Wall time: 3.232 s

The store holds 7,865 cells, of which 7,299 are active, marked True in the I column: the cells that passed the RNA run’s quality filter. The RNA assay holds 33,538 genes and the ADT assay 17 antibodies. Cell columns such as RNA+ADT_wnn_leiden_cluster copy results of the saved runs into the cell table; this page reads the runs themselves.

A pipeline run is one recorded call of a CyteArc recipe, such as ds.pipeline.rna. The run saves each result as an immutable artifact together with the settings that made it, so the results can be reopened instead of recomputed. List the runs in this store:

(PipelineRun(run_id='847dbf937203...', recipe='multimodal', status='completed', assay='RNA', label='wnn'), PipelineRun(run_id='fcda06bec85a...', recipe='multimodal', status='completed', assay='RNA', label='snn'), PipelineRun(run_id='9f91737eca2a...', recipe='adt', status='completed', assay='ADT', label='adt'), PipelineRun(run_id='8804eec1fd5e...', recipe='rna', status='completed', assay='RNA', label='rna'))

Started: 2026-11-14T15:42:49.743989Z | Wall time: 0.356 s

The rna and adt runs analyze each assay over the same 7,299 cells. The wnn and snn runs combine the two runs’ neighbor graphs into one joint graph, with WNN or with shared nearest neighbors (SNN), and then embed and cluster that graph. A multimodal run reports the assay of its first source run, so both show RNA. This page reads the WNN run.

Read each cell’s modality weights

For each cell and assay, WNN measures how well the cell’s neighbors in that assay predict the cell’s profile there, relative to how well its neighbors in the other assay predict it, and gives the larger weight to the assay that predicts the cell better. These modality weights sum to 1, and the cell’s joint neighbors are the cells most similar to it in both assays combined, each assay counted by its weight. Open the WNN run. Its cell view, wnn.cells, holds the values that the run saved for each of its cells: the WNN UMAP coordinates, the clustering that the run kept (clusters, its only Leiden partition, at resolution 1.75) and the two weights. ds.artifacts.find also finds it by the run’s graph and its resolution:

The resolution 1.75 clustering is the run's clusters: True
Iidsnamesumap_1umap_2clustersweight_RNAweight_ADT
0TrueAAACCCAAGATTGTGA-1AAACCCAAGATTGTGA-19.32-4.1130.001.00
1TrueAAACCCACATCGGTTA-1AAACCCACATCGGTTA-19.45-7.5431.000.00
2TrueAAACCCAGTACCGCGT-1AAACCCAGTACCGCGT-112.02-0.8520.001.00
3TrueAAACCCAGTATCGAAA-1AAACCCAGTATCGAAA-1-14.6421.9350.470.53
4TrueAAACCCAGTCGTCATA-1AAACCCAGTCGTCATA-1-15.5621.7850.001.00

Started: 2026-11-14T15:42:50.104474Z | Wall time: 0.236 s

Four of these five cells give one assay nearly all of the weight, 1.00 against 0.00 at two decimals, and only the fourth splits it, 0.47 for RNA and 0.53 for ADT. WNN turns the two assays’ prediction scores into weights through an exponential, which pushes the weights toward 0 and 1 whenever one score is well above the other; the cell’s joint neighbors then follow that one assay almost entirely. Measure how often each assay leads, and how often one takes nearly all of the weight:

Mean weights: RNA 0.44, ADT 0.56
ADT weight above 0.5 0.58 ADT weight 0.9 or more 0.35 RNA weight 0.9 or more 0.25 Name: share of cells, dtype: float64

Started: 2026-11-14T15:42:50.343849Z | Wall time: 0.036 s

The ADT weight exceeds 0.5 in 58% of cells, and the mean weights are 0.56 for ADT and 0.44 for RNA. Most cells lean almost entirely on one assay: the ADT weight is 0.9 or more in 35% of cells and the RNA weight in 25%.

Map the WNN clusters and weights

Color the WNN UMAP by the WNN clusters and by each cell’s ADT weight. With run=wnn, the plot reads the run’s saved fields, and a CellField names one field with its panel title and, for the clusters, a categorical color scale:

Two panels of the WNN UMAP. Left, cells colored by the 21 WNN clusters, with each cluster's number on its cells: clusters 5, 14 and 17 form the top island, clusters 1, 4, 7 to 11 and 13 the central island, clusters 2, 3, 16 and 21 the right-hand island, with clusters 12, 15, 19 and 20 at its left edge and on the bridges to the central island, and clusters 6 and 18 the bottom island. Right, the same cells colored by ADT weight from 0 (purple) to 1 (yellow): most large clusters mix cells near 0 and near 1. Yellow prevails in the central island and in cluster 5, purple is more common on the right-hand island, cluster 14 beside cluster 5 is mostly purple, and the small clusters 17 and 18 are mostly teal, with intermediate weights.

Started: 2026-11-14T15:42:50.382852Z | Wall time: 1.653 s

The WNN graph has 21 clusters, numbered by size from cluster 1, the largest. Most large clusters mix cells with ADT weights near 0 and near 1, so one cell’s weight says little about which assay its cell type relies on. The balance still differs between regions: yellow prevails in the central island and in cluster 5 at the top, purple is more common on the right-hand island, and cluster 14, beside cluster 5, is mostly purple.

Check the antibody panel

The ADT run’s feature view, adt.features, lists all 17 antibodies of the assay, and its panel column marks the ones that the run analyzed. nCells counts the store’s 7,865 cells with at least one count of each antibody:

namespanelnCells
ids
CD3CD3_TotalSeqBTrue7864
CD4CD4_TotalSeqBTrue7864
CD8aCD8a_TotalSeqBTrue7863
CD14CD14_TotalSeqBTrue7864
CD15CD15_TotalSeqBTrue7864
CD16CD16_TotalSeqBTrue7864
CD56CD56_TotalSeqBTrue7864
CD19CD19_TotalSeqBTrue7702
CD25CD25_TotalSeqBTrue7861
CD45RACD45RA_TotalSeqBTrue7864
CD45ROCD45RO_TotalSeqBTrue7864
PD-1PD-1_TotalSeqBTrue7863
TIGITTIGIT_TotalSeqBTrue7849
CD127CD127_TotalSeqBTrue7862
IgG2aIgG2a_control_TotalSeqBFalse7839
IgG1IgG1_control_TotalSeqBFalse7856
IgG2bIgG2b_control_TotalSeqBFalse7639

Started: 2026-11-14T15:42:52.038828Z | Wall time: 0.165 s

The ADT run kept 14 antibodies and left out the 3 isotype controls, IgG2a, IgG1 and IgG2b: antibodies without a target on these cells, which measure nonspecific binding. Every antibody, the isotype controls included, has counts in at least 7,639 of the 7,865 cells. Background binding gives each antibody a signal in nearly every cell, so a protein is read from its level, not from whether it was detected. The plots and the cluster table below show that level as the centered log-ratio (CLR), which divides each antibody’s counts by their geometric mean across cells and takes the logarithm.

Compare protein and mRNA markers

The antibody IDs are the short names, and the names add the TotalSeq-B suffix, so FeatureRef("CD4", assay="ADT", by="id") selects the CD4 antibody by its ID, and label= gives it a panel title. A plot made with run=wnn reads features only from the run’s own assay, RNA. To color the WNN UMAP by markers of both assays, pass its layout instead: indexing a run by an output name, as in wnn["umap"], returns an ArtifactRef, a reference to that saved result:

Six rows of paired WNN UMAP panels, protein on the left and mRNA on the right, from the top: CD3 protein and CD3D mRNA, CD4 and CD4, CD8a and CD8A, CD14 and CD14, CD19 and CD19, CD56 and NCAM1. Protein colors show CLR values and mRNA colors library-size-normalized counts, each on its own scale. CD3 protein and CD3D mRNA cover the central island. CD4 protein fills its center and bottom and CD8a protein its upper left; CD8A mRNA marks the same upper-left region more patchily, while CD4 mRNA is faint everywhere and no brighter on the central island than on the right-hand island. CD14 protein and mRNA mark the right-hand island and CD19 protein and mRNA the bottom island. CD56 protein is high across the top island, with scattered moderate values on the right-hand island, and NCAM1 mRNA is sparse even in the top island.

Started: 2026-11-14T15:42:52.206418Z | Wall time: 3.556 s

Each row pairs a protein with a gene that encodes it; CD3D encodes one chain of the CD3 complex. Protein colors show CLR values and mRNA colors library-size-normalized counts, each on its own scale, so compare where a marker is high rather than its colorbar numbers. CD3 protein and CD3D mRNA mark the T cells, the large central island. CD4 and CD8a protein divide that island sharply, CD4 into the center and bottom (clusters 1, 4, 10 and 11) and CD8a into the upper left (clusters 7, 8, 9 and 13). CD8A mRNA marks the same upper-left clusters more patchily, while CD4 mRNA is faint everywhere and no brighter on the CD4 T cells than on the monocytes. CD14 protein and mRNA mark the monocytes on the right (clusters 2 and 3), CD19 the B cells at the bottom (cluster 6), and CD56 protein the NK cells at the top (clusters 5 and 14), where NCAM1 mRNA is sparse.

Measure how protein and mRNA separate CD4 and CD8 T cells

For each WNN cluster, average the CD4 and CD8a protein, and compute the share of cells with at least one CD4 or CD8A mRNA count. ds.get_cell_vals reads one feature’s normalized values for the active cells (cell_key="I") by the feature’s name, which for an antibody is its TotalSeq-B name:

cellsCD4 proteinCD4 mRNA detectedCD8a proteinCD8A mRNA detected
clusters
110842.390.180.370.00
28711.050.690.390.00
37920.740.430.350.00
47632.600.250.560.02
57230.070.000.330.01
65300.130.010.270.01
74290.170.013.170.51
83960.170.014.520.67
93190.340.024.140.76
103122.480.250.460.01
112152.370.190.390.00
122041.850.501.570.14
131850.140.012.940.43
141530.100.001.030.07
15870.830.510.320.01
16821.050.570.480.01
17491.740.201.530.16
18400.180.001.000.12
19321.020.410.570.00
20251.170.640.200.00
2180.910.380.400.00

Started: 2026-11-14T15:42:55.766842Z | Wall time: 0.367 s

CD4 protein averages 2.37 to 2.60 in clusters 1, 4, 10 and 11 against 0.14 to 0.34 in clusters 7, 8, 9 and 13, and CD8a protein the reverse, 0.37 to 0.56 against 2.94 to 4.52, so the two antibodies split these eight T-cell clusters into the CD4 and CD8 lineages. Only clusters 12 and 17 carry both antibodies at intermediate levels (CD4 1.85 and 1.74, CD8a 1.57 and 1.53). The transcripts mark only part of each lineage. CD8A mRNA is specific, detected in at most 2% of the cells of the CD4 T-cell clusters, but in only 43 to 76% of the cells of the CD8 T-cell clusters. CD4 mRNA is detected in only 18 to 25% of the cells of the CD4 T-cell clusters, less often than in the CD14 monocytes of clusters 2 and 3 (69% and 43%), so the CD4 transcript is a poor marker of CD4 T cells in this dataset.

RNA clustering, which reads 1,000 variable genes rather than one marker, still keeps the CD4 and CD8 T cells apart: the WNN and SNN integration tutorial shows that the RNA and ADT clusterings disagree within lineages rather than between them, for example on memory and regulatory T-cell states that the panel’s CD45RA, CD45RO, CD127, CD25, PD-1 and TIGIT antibodies resolve.

Build a WNN result for your own data

In your own store, ds, analyze RNA first and then the antibody panel with cells=rna, since WNN combines runs of the same cells. These calls build runs like the prepared ones:

# Filter cells and analyze RNA: variable genes, PCA, graph, UMAP and clusters.
rna = ds.pipeline.rna(
    label="rna",
    hvg={"top_n": 1000},
    pca={"dims": 15},
    neighbors={"k": 21},
    leiden={"partitions": [1.0]},
)

# Analyze the antibody panel over the cells that the RNA run kept.
adt = ds.pipeline.adt(
    label="adt", cells=rna, neighbors={"k": 21}, leiden={"partitions": [1.0]}
)

# Combine the two runs with WNN, then embed and cluster the joint graph.
wnn = ds.pipeline.multimodal([rna, adt], label="wnn", leiden={"partitions": [1.75]})

The prepared runs also skipped marker ranking (markers=False), and the RNA run skipped cell-cycle and doublet scoring (cell_cycle=False, doublets=False); the recipes run these stages by default. The ADT recipe leaves out antibodies whose names contain “isotype”, “control” or “ctrl”, normalizes the rest with CLR and reduces them with PCA; panel={"exclude": ...} takes another regular expression of names to leave out, and panel=None keeps every antibody. WNN is the default integration method, and method="snn" builds the SNN comparison from the same runs. Continue to Compare multimodal integration methods to name the WNN clusters from their protein profiles, see which assay each cluster leans on and compare WNN with SNN and with each assay’s own clusters, or to Integrate RNA, chromatin, and protein with TEA-seq to add chromatin accessibility as a third modality.

References
  1. Hao, Y., Hao, S., Andersen-Nissen, E., Mauck, W. M., Zheng, S., Butler, A., Lee, M. J., Wilk, A. J., Darby, C., Zager, M., Hoffman, P., Stoeckius, M., Papalexi, E., Mimitou, E. P., Jain, J., Srivastava, A., Stuart, T., Fleming, L. M., Yeung, B., … Satija, R. (2021). Integrated analysis of multimodal single-cell data. Cell, 184(13), 3573-3587.e29. 10.1016/j.cell.2021.04.048