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.

Joint reanalysis of CyteBase datasets

Combine cells from several CyteBase datasets, run a joint RNA analysis, and reopen its results later. Counts stay in the source datasets; your new results are saved locally.

This example combines human blood and PBMC data from Wilk et al. (2020), Lee et al. (2020), Arunachalam et al., and Schulte-Schrepping et al. The latter two are study-specific subsets republished by Jin et al. (2021).

The four sources contain 244,389 cells. We include all 233,870 primary COVID-19 or normal cells before QC, with no random subsampling, and compare matched analyses before and after Harmony correction by study. This is a joint reanalysis example, not a test of disease effects.

Use a Python 3.13+ notebook environment with this checkout installed:

uv pip install -e ".[cytebase,extra]"

The public catalog requires network access but no token. The saved results on this page were built with the CyteBase October 2026 release (2610), published in the public Nygen/cytebase-2610 bucket.

1. Choose datasets

The IDs below select the four studies. For your own analysis, choose compatible datasets from the same organism with matching gene IDs.

Started: 2026-10-12T17:08:18.093213Z | Wall time: 4.427 s

The names on the left become values in the composite’s dataset column. Replace the IDs or add entries to use other studies.

Started: 2026-10-12T17:08:22.524839Z | Wall time: 0.010 s

Open the prepared source datasets through the catalog. These datastores are read-only; analysis results will be written to the new composite.

Started: 2026-10-12T17:08:22.538500Z | Wall time: 84.438 s

2. Select cells

Include every primary cell whose disease label is COVID-19 or normal. This excludes Lee’s influenza samples and does not impose a per-study cell cap.

rows contains positions in each original source dataset. Omitting rows from create_composite includes all stored cells, including inactive ones.

source_cellsselected_cells
blood_wilk4472144721
blood_lee5957249053
blood_arunachalam4913949139
blood_schulte_schrepping9095790957

Started: 2026-10-12T17:09:46.982241Z | Wall time: 9.473 s

3. Create the composite

Use features="intersection" to keep the 19,405 gene IDs shared by all four sources. features="union" would retain every gene, filling absent source genes with zeros; absence from a source is not evidence that a gene was unexpressed.

Choose a new local path. Creation scans the selected counts to prepare the composite, but leaves the counts in their source datasets. If the path already exists, reopen it using the example at the end of this notebook.

233,870 cells and 19,405 shared genes

Started: 2026-10-12T17:09:56.458952Z | Wall time: 201.266 s

The dataset column identifies each cell’s source. Original metadata is preserved with an orig_ prefix. Check the cells and donors in each study and condition before correcting by study. Donor IDs are interpreted within their source study; matching strings across studies do not establish a shared donor.

cellsdonors
datasetorig_disease
blood_arunachalamCOVID-19231857
normal259545
blood_leeCOVID-19314638
normal175904
blood_schulte_schreppingCOVID-194517018
normal4578721
blood_wilkCOVID-19280947
normal166276
Within-study donors represented in both conditions: 0

Started: 2026-10-12T17:13:17.727496Z | Wall time: 0.515 s

4. Run the uncorrected RNA pipeline

Run the usual pipeline to calculate PCA, UMAP, clusters, and markers. This example applies MAD QC filtering separately within each dataset and uses a human gene blacklist for feature selection. The same settings and frozen design columns are used for the Harmony run. Author cell-type labels are not used to choose settings.

The retention table shows how QC affects each study and condition. Inspect removals before reusing this filtering policy for another analysis. The UMAPs show the retained cells colored by dataset and cluster.

WARNING: 2 of 43 s_genes were not found in the assay feature names
WARNING: 1 of 54 g2m_genes were not found in the assay feature names

Started: 2026-10-12T17:13:18.245946Z | Wall time: 886.771 s

includedretainedretained_fraction
datasetorig_disease
blood_arunachalamCOVID-1923185231841.000
normal25954259531.000
blood_leeCOVID-1931463305920.972
normal17590175260.996
blood_schulte_schreppingCOVID-1945170440030.974
normal45787452500.988
blood_wilkCOVID-1928094276870.986
normal16627165090.993
Uncorrected UMAP of the four-study blood composite, colored by source dataset and by clusters. Several regions are dominated by a single study.

Started: 2026-10-12T17:28:05.021150Z | Wall time: 8.927 s

5. Compare with Harmony correction

Save a second run with harmony_batch_columns=["dataset"]. Both runs use the same cells and PCA; Harmony changes the coordinates used to construct the graph, embedding, and clusters. Source counts remain unchanged.

Compare the plots below with the uncorrected plots above. More mixing alone does not establish a better biological result: studies differ in cohort, collection, and technology, and their cell populations need not have the same composition. This notebook does not infer disease effects from the corrected embedding.

WARNING: 2 of 43 s_genes were not found in the assay feature names
WARNING: 1 of 54 g2m_genes were not found in the assay feature names
Harmony-corrected UMAP of the same blood composite, colored by source dataset and clusters. Source studies overlap more within several regions than in the uncorrected layout.

Started: 2026-10-12T17:28:13.951932Z | Wall time: 936.329 s

6. Inspect results and reopen later

Load the saved markers and inspect each study’s contribution to the corrected clusters. These marker lists are a starting point for annotation, not cell-type assignments.

group_id 1 SIGLEC1, OTOF, TCN2, CD163, APOBEC3A 2 TMEM40, GP9, CMTM5, ESAM, CLDN5 3 ENHO, CD1E, PKIB, CLEC10A, CD1C 5 LYPD2, VMO1, CDKN1C, NEURL1, CKB 6 CYP27A1, CXCL2, HOMER3, CYP1B1, TMEM176A 7 A2M-AS1, CD8A, LINC01871, TRGC2, CD8B 8 NCR1, NCAM1, SH2D1B, MYOM2, DTHD1 9 CD34, NPR3, CRHBP, CYTL1, PRSS57 10 MAL, NELL2, RETREG1, TRABD2A, TSHZ2 11 TSHZ2, ANK3, RNF157, CD28, CHRM3-AS2 12 SPC25, CDC45, MELK, MND1, PKMYT1 13 TNFRSF17, IGHG2, POU2AF1, ELL2, IGHA2 14 LINC02397, PAX5, FCRL1, PLEKHG1, EBF1 15 VPREB3, LINC00926, MS4A1, FCRLA, IGHD 16 ALAS2, AHSP, SLC4A1, CA1, HBM 17 ALPL, CMTM2, CXCR1, MME, KCNJ15 18 CLEC4C, LRRC26, LILRA4, SHD, PROC 19 CEACAM8, MMP8, LTF, BPI, ABCA13 20 KLRF1, TRDC, KLRD1, KLRB1 Name: top_markers, dtype: str
clusters12345678910...12131415161718192021
dataset
blood_arunachalam27834342251190733024657524867155499200...36614393198193088421426827297
blood_lee3135394157417052350748165307736346169...4784986023534232271106832769
blood_schulte_schrepping357988647512225350911012789261237016951...11075210458319542841881482126557352063
blood_wilk3801666504192814554789560971083017251...6603185358267871285237198590197

4 rows × 21 columns

Started: 2026-10-12T17:43:50.301734Z | Wall time: 0.828 s

Reopen the local composite and load a saved pipeline run by its label. The original CyteBase sources must remain available and unchanged because the composite still reads their counts. Both analyses are saved in the local composite.

Reopened joint_harmony: completed

Started: 2026-10-12T17:43:51.132275Z | Wall time: 33.736 s

References
  1. Wilk, A. J., Rustagi, A., Zhao, N. Q., Roque, J., Martínez-Colón, G. J., McKechnie, J. L., Ivison, G. T., Ranganath, T., Vergara, R., Hollis, T., Simpson, L. J., Grant, P., Subramanian, A., Rogers, A. J., & Blish, C. A. (2020). A single-cell atlas of the peripheral immune response in patients with severe COVID-19. Nature Medicine, 26(7), 1070–1076. 10.1038/s41591-020-0944-y
  2. Lee, J. S., Park, S., Jeong, H. W., Ahn, J. Y., Choi, S. J., Lee, H., Choi, B., Nam, S. K., Sa, M., Kwon, J.-S., Jeong, S. J., Lee, H. K., Park, S. H., Park, S.-H., Choi, J. Y., Kim, S.-H., Jung, I., & Shin, E.-C. (2020). Immunophenotyping of COVID-19 and influenza highlights the role of type I interferons in development of severe COVID-19. Science Immunology, 5(49). 10.1126/sciimmunol.abd1554
  3. Jin, K., Bardes, E. E., Mitelpunkt, A., Wang, J. Y., Bhatnagar, S., Sengupta, S., Krummel, D. P., Rothenberg, M. E., & Aronow, B. J. (2021). An interactive single cell web portal identifies gene and cell networks in COVID-19 host responses. iScience, 24(10), 103115. 10.1016/j.isci.2021.103115