GitHub
Back to all tutorials

Core analysis

scMultiome Analysis

This tutorial analyzes one 10x Genomics Multiome dataset (gene expression and chromatin accessibility measured in the same cells) in CellPilot: preparing the Cell Ranger ARC output folder, reading RNA and ATAC clusters, naming cell types, comparing genes and gene activity, coverage tracks, linking peaks to genes and TF motifs. Joint RNA + ATAC clustering (WNN) is covered in the scMultiome Integration tutorial. Every command is typed in the chat box of the AI Assistant panel; no code or API key is needed. The screenshots come from CellPilot 2.1.0 running this exact dataset.

Input data

The example is the 10x Genomics PBMC from a Healthy Donor - Granulocytes Removed Through Cell Sorting (10k) dataset, processed with Cell Ranger ARC 2.0. The commands below download the files CellPilot uses (about 3.5 GB, mostly the fragments file); you can also download them from 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

1. Prepare the folder

Downloads from the 10x website carry the sample name in every file name. Unpack the archives and remove that prefix, so the folder looks like a Cell Ranger ARC outs folder (your own Cell Ranger ARC output already has these names):

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

The folder now contains filtered_feature_bc_matrix.h5 (genes and peaks of each cell), filtered_feature_bc_matrix/, analysis/ (Cell Ranger ARC's clusters and UMAPs), atac_peak_annotation.tsv (links peaks to genes), summary.csv (the genome build) and atac_fragments.tsv.gz with its index (for coverage plots). The two .tar.gz files are no longer needed.

2. Load the dataset

  1. Open CellPilot.
  2. In the Data Loader & Model panel, set Data Type to scMultiome and Data to Single sample.
  3. Click Browse and select the prepared folder (not a single file inside it).
  4. Wait for the RNA and ATAC data to load.

CellPilot shows two views side by side: the RNA View (gene expression) and the ATAC View (chromatin accessibility), each with its own UMAP and clusters. On first load both come from Cell Ranger ARC's analysis/ folder, so they match the 10x web summary; the cells are the ones Cell Ranger ARC called.

What you should see: 11,898 cells, 14 RNA clusters and 18 ATAC clusters; the data panel shows 10X Multiome with 11,898 cells, 36,601 genes and 143,887 peaks.
CellPilot after loading the 10k PBMC Multiome dataset
After loading: RNA View (left) and ATAC View (right), each colored by its own clusters.

3. Explore RNA and ATAC clusters

The RNA and ATAC views number their clusters separately, so name the view with the cluster number. For ambiguous requests ("Tell me about cluster 1"), CellPilot asks whether you mean RNA or ATAC.

Tell me about RNA cluster 1
Find markers for RNA cluster 1
Tell me about ATAC cluster 3
Find markers for ATAC cluster 3

For an RNA cluster CellPilot reports marker genes; for an ATAC cluster, marker peaks (regions more accessible in the cluster than in all other cells). RNA marker genes open in the RNA View and ATAC marker peaks in the ATAC View.

RNA cluster 1 has 1,776 cells; ATAC cluster 3 has 944 cells.
Marker genes of RNA cluster 1
Find markers for RNA cluster 1: marker genes.
Marker peaks of ATAC cluster 3
Find markers for ATAC cluster 3: marker peaks.

4. Compare RNA and ATAC clusters

Highlight RNA cluster 1 on ATAC
Highlight ATAC cluster 3 on RNA

RNA and ATAC are measured in the same cells, so a cluster of one view can be shown on the other: the cells of RNA cluster 1 are colored on the ATAC UMAP, and the cells of ATAC cluster 3 on the RNA UMAP. This shows whether expression-defined and accessibility-defined groups agree, and helps decide what each cluster is before naming the cell types in the next step. After annotation the ATAC View carries the RNA cell types, so the two views already share the same names and colors.

ATAC cluster 3 highlighted on the RNA view
Highlight ATAC cluster 3 on RNA: its cells on the RNA UMAP (left) and the cluster on the ATAC UMAP (right).

5. Identify cell types

Annotate all clusters

CellPilot compares every RNA cluster with built-in reference atlases and lists the most similar cell type with its supporting genes; the ATAC clusters are not annotated. Every cluster here is an immune cell type closest to blood cells, so CellPilot reports the organ as blood and names the cell types from blood, bone marrow and lymphoid-organ atlases (never from, say, the gut atlas's immune cells). If your immune cells were sorted from a tissue, name the organ first (for example this sample is lung). The table appears in the chat, so the RNA and ATAC views stay on screen. This is a similarity to published atlases computed on your computer, not an AI judgement. Reply yes to rename the RNA clusters with these names; clusters with the same name are merged, and the ATAC View then shows the RNA cell type of each cell, so you can see how the two modalities agree.

Cell type annotation table of the RNA clusters
The annotation table in the chat (scroll it to see all 14 clusters).
The organ is reported as blood. After yes: CD4 T (clusters 1, 5 and 14), CD14 Mono (2, 3 and 10), CD8 T (4 and 7), B, CD16 Mono, NK, cDC, CD4 T S100A9+, and one cluster marked CD8 T/NK? because it is not clear-cut between the two.
RNA and ATAC views labelled with cell types
After yes: the cell type names on the RNA View (left) and the RNA cell type of each cell on the ATAC View (right).

You can change cluster names at any time, for example if an automatic name looks wrong: Rename cluster 1 to CD4 T cells.

6. Plot genes and gene activity

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

Each plot shows the gene's expression on the RNA View and its gene activity (accessibility of the peaks linked to it) on the ATAC View. MS4A1 marks B cells, CD3D T cells, LST1 monocytes and NKG7 NK cells.

MS4A1 expression and gene activity
Plot MS4A1: RNA expression (left) and ATAC gene activity (right), both highest in the B cells.
Violin plots of MS4A1
Violin plot MS4A1: RNA (left) and gene activity (right).
Dot plots of four lineage genes
Dotplot MS4A1 CD3D LST1 NKG7, recolored with Change color to green black red.

7. View coverage tracks

Coverage plot MS4A1

With atac_fragments.tsv.gz and its index in the folder, CellPilot draws the accessibility track of each ATAC cluster around the gene in the Peak View, with the ATAC clusters next to it.

MS4A1 coverage tracks by ATAC cluster
Coverage plot MS4A1: ATAC clusters (left) and the MS4A1 coverage of each cluster (right).

8. Link peaks to genes and find TF motifs

Link peaks to genes
Show peak-gene links for MS4A1
Run TF motif analysis for cluster 2
Prioritize TF for cluster 2

Link peaks to genes correlates the accessibility of each peak with the expression of nearby genes across the same cells (a port of Signac's LinkPeaks) and reports the significant links. Show peak-gene links for MS4A1 draws the peaks linked to MS4A1. Run TF motif analysis tests which transcription factor (TF) motifs are enriched in the peaks linked to an RNA cluster's marker genes, compared with background peaks, and ranks the factors by motif enrichment (log2 fold change) × the factor's expression × the correlation of its expression with the linked peaks.

28,769 significant peak–gene links across 6,780 genes; MS4A1 has 20 links.
Peak-gene links of MS4A1
Show peak-gene links for MS4A1.
TF motif enrichment of cluster 2
Run TF motif analysis for cluster 2.

9. Adjust analysis parameters

List parameters
Rerun clustering for RNA with resolution = 1.2
Rerun clustering for ATAC with resolution = 1.2
Rerun RNA UMAP with min dist = 0.4
Rerun ATAC UMAP with min dist = 0.4

Clustering and UMAP can be rerun for each view separately. Reclustering replaces Cell Ranger ARC's clusters with CellPilot's own (RNA: graph clustering on PCA; ATAC: TF-IDF, LSI and Louvain clustering on the peaks); higher resolution gives more clusters. Reclustering clears the names of that view.

After these commands, how many clusters are there answers: RNA: 17 clusters; ATAC: 18 clusters. The first ATAC re-clustering takes a few minutes (CellPilot computes the ATAC LSI once); later ATAC re-clustering and UMAP take seconds.

10. Save and revisit results

CellPilot saves the analysis (both views and the cluster names) as cellpilot_results.json in the data folder. When you load the same folder again, CellPilot asks whether to load the previous results, so you can continue where you left off.