GitHub
Back to all tutorials

Integration

scMultiome Integration

This tutorial focuses on WNN integration for one paired RNA + ATAC multiome dataset. The basic scMultiome loading, RNA analysis, ATAC analysis, coverage, peak-gene, and TF steps are covered in the scMultiome Analysis tutorial.

Input data

Use the same 10x Genomics PBMC multiome dataset from the scMultiome Analysis tutorial: PBMC from a Healthy Donor - Granulocytes Removed Through Cell Sorting (10k), processed with Cell Ranger ARC. If you already prepared that folder, reuse it here.

Open the 10x Genomics dataset page

mkdir -p pbmc_multiome_10k
cd pbmc_multiome_10k

BASE=https://cf.10xgenomics.com/samples/cell-arc/2.0.0/pbmc_granulocyte_sorted_10k
SAMPLE=pbmc_granulocyte_sorted_10k

curl -O ${BASE}/${SAMPLE}_filtered_feature_bc_matrix.h5
curl -O ${BASE}/${SAMPLE}_filtered_feature_bc_matrix.tar.gz
curl -O ${BASE}/${SAMPLE}_analysis.tar.gz
curl -O ${BASE}/${SAMPLE}_atac_peak_annotation.tsv
curl -O ${BASE}/${SAMPLE}_atac_fragments.tsv.gz
curl -O ${BASE}/${SAMPLE}_atac_fragments.tsv.gz.tbi
curl -O ${BASE}/${SAMPLE}_summary.csv
curl -O ${BASE}/${SAMPLE}_web_summary.html

tar -xzf ${SAMPLE}_filtered_feature_bc_matrix.tar.gz
tar -xzf ${SAMPLE}_analysis.tar.gz

mv ${SAMPLE}_filtered_feature_bc_matrix.h5 filtered_feature_bc_matrix.h5
mv ${SAMPLE}_atac_peak_annotation.tsv atac_peak_annotation.tsv
mv ${SAMPLE}_atac_fragments.tsv.gz atac_fragments.tsv.gz
mv ${SAMPLE}_atac_fragments.tsv.gz.tbi atac_fragments.tsv.gz.tbi
mv ${SAMPLE}_summary.csv summary.csv
mv ${SAMPLE}_web_summary.html web_summary.html

These command-line steps are only for the public demo download. For your own Cell Ranger ARC output folder, select the folder directly and do not rename files.

1. Load the multiome dataset

  1. Open CellPilot.
  2. In the Data Type menu, choose scMultiome.
  3. Choose Single sample.
  4. Click Browse and select the prepared Cell Ranger ARC output folder.
  5. Wait for CellPilot to load the paired RNA and ATAC data.

WNN requires paired measurements from the same cells. CellPilot uses the RNA gene expression matrix, the ATAC peak matrix, barcode information, and the ATAC peak annotations already loaded for the standard scMultiome workflow.

2. Run WNN integration

WNN stands for Weighted Nearest Neighbor. This workflow follows the idea from the Seurat WNN tutorial and the multimodal integration paper by Hao and colleagues in Cell, with CellPilot-specific modifications for browser/desktop JavaScript execution.

Run WNN analysis

You can also ask:

Integrate RNA and ATAC
Run weighted nearest neighbor analysis
Create a joint UMAP for both modalities

3. What CellPilot does

CellPilot builds the WNN result from the already loaded multiome object:

  1. Prepare RNA analysis state and obtain RNA PCA embeddings.
  2. Run the ATAC TF-IDF and LSI pipeline if ATAC LSI embeddings are not already available.
  3. Align ATAC LSI cells to RNA PCA cells by barcode, because RNA filtering can change the RNA cell order.
  4. Remove the first ATAC LSI dimension before integration because it is often associated with sequencing depth.
  5. Build separate cosine kNN graphs in RNA PCA space and ATAC LSI space.
  6. Estimate cell-specific RNA and ATAC modality weights from neighborhood compactness.
  7. Build a weighted combined neighbor graph and run UMAP on the precomputed WNN graph.
  8. Run Louvain clustering on the weighted shared-nearest-neighbor graph.

Compared with the Seurat tutorial, CellPilot keeps this workflow in JavaScript, does not z-score the PCA/LSI embeddings before neighbor search, and proportionally selects RNA and ATAC neighbors according to each cell's learned modality weights.

4. Review the three-panel WNN view

When WNN finishes, CellPilot opens a three-panel layout: RNA UMAP, ATAC UMAP, and WNN integrated UMAP. The first two panels show modality-specific structure, while the WNN panel shows the joint RNA + ATAC co-embedding.

Clicking a cluster in one panel highlights the same cells in the other panels, so you can see whether a WNN cluster is supported mainly by RNA structure, ATAC structure, or both.

Tell me about WNN cluster 2
Find markers for WNN cluster 2
Rename WNN cluster 2 to CD4 T cells

Because RNA, ATAC, and WNN have independent cluster sets, CellPilot may ask which view you mean when a command is ambiguous.

5. Compare WNN with RNA and ATAC

The goal of WNN is not to replace RNA or ATAC analysis. Instead, it lets each cell borrow information from the modality that best resolves its local state. In PBMC multiome data, WNN can sharpen immune cell-state separation by combining gene expression with chromatin accessibility.

Find markers for RNA cluster 1
Find markers for ATAC cluster 3
Find markers for WNN cluster 2
Highlight RNA cluster 1 on ATAC
Highlight ATAC cluster 3 on RNA

Use RNA and ATAC clusters to understand modality-specific signals, then use WNN clusters to annotate the integrated cell states.

6. Plot genes on the WNN embedding

After WNN is active, CellPilot can show RNA expression and ATAC gene activity while preserving the WNN co-embedding. This helps validate WNN clusters with known PBMC markers.

Plot MS4A1
Dotplot MS4A1 CD3D LST1 NKG7
Coverage plot MS4A1
Change color to green black red

The color command changes the active plot color scale, so run it after creating the feature plot, dot plot, or coverage plot.

7. Rerun WNN if needed

CellPilot's default WNN run uses 20 neighbors, UMAP min_dist = 0.3, and Louvain resolution 0.3. If you change the RNA or ATAC analysis first, run WNN again so the integrated co-embedding reflects the current modality-specific embeddings.

Run WNN analysis

For RNA-only or ATAC-only reclustering, CellPilot treats those as separate modality-specific updates rather than WNN updates.

8. Save and revisit

CellPilot stores WNN results with the project so the RNA, ATAC, and WNN panels can be restored later. Saved WNN state includes the individual RNA and ATAC UMAPs, WNN co-embedding, WNN clusters, and cluster labels.