Core analysis
scRNA-seq Analysis
This tutorial analyzes one 10x Genomics scRNA-seq dataset in CellPilot: loading an H5 count file, reading the clusters, naming cell types, plotting marker genes, and changing analysis parameters. 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, so you can compare your screen with each step.
Input data
The example is the 10x Genomics 10k Mouse Kidney Cells, scFFPE singleplex dataset: a filtered feature-barcode matrix in H5 format with 9,616 cells and 19,059 genes. Download it in a terminal (or open the link in a browser):
curl -O https://cf.10xgenomics.com/samples/cell-exp/7.1.0/10k_mouse_kidney_scFFPE_singleplex_10k_mouse_kidney_scFFPE_singleplex/10k_mouse_kidney_scFFPE_singleplex_10k_mouse_kidney_scFFPE_singleplex_count_sample_filtered_feature_bc_matrix.h5
For your own data, CellPilot reads the filtered_feature_bc_matrix.h5 from Cell Ranger, or a 10x MatrixMarket folder (matrix.mtx.gz, features.tsv.gz or genes.tsv.gz, barcodes.tsv.gz). No renaming is needed.
1. Load the dataset
- Open CellPilot.
- In the Data Loader & Model panel, set Data Type to scRNA-seq and Data to Single sample.
- Click Browse and select the downloaded H5 file (or the folder that contains it).
- Wait for the analysis to finish; the status messages in the chat show each step.
CellPilot runs the standard single-cell workflow on your computer (bakana / scran.js): quality control, normalization, highly variable genes, PCA, a nearest-neighbor graph, UMAP, graph-based clustering, and marker detection. Quality control is automatic: cells more than 3 median absolute deviations (MADs) from the median in total counts, detected genes, or mitochondrial fraction are removed.
Cluster numbers come from the clustering of this dataset. If your numbers differ slightly (another CellPilot version can split the cells a little differently), use the cell type names from step 3 rather than the numbers below.
2. Explore a cluster
Ask about any cluster by its number:
Tell me about cluster 6
Find markers for cluster 6
The first command answers in the chat with the cluster size and its top marker genes. The second opens the full marker table in the Analysis View: genes ranked by how specifically they are expressed in the cluster compared with all other cells (Wilcoxon rank-sum test). avg_log2FC is the fold change, pct.1 and pct.2 the fraction of cells expressing the gene inside and outside the cluster. Click a gene name to plot it.
3. Identify cell types
Annotate all clusters
CellPilot compares every cluster with built-in reference atlases and reports the most similar cell type, how confident the match is, and the genes it shares with the reference. It first finds the organ (here, kidney) and then only considers that organ's cell types plus immune cells. The comparison runs on your computer; it is a similarity to published atlases, not an AI judgement. Clusters marked ? are not clear-cut; ask what is cluster N to see the genes that tell the candidates apart.
CellPilot then asks whether to rename the clusters with these names. Reply yes to use them. In this tutorial we reply no and name the main kidney cell types ourselves in the next step. For this dataset the annotation gives, among others:
| Clusters | Cell type | Short name used below |
|---|---|---|
| 1, 3, 6, 9 | proximal tubule (PT-S2, PT-S1, PT-S3, PT-S1/S2) | PT |
| 5, 12 | thick ascending limb of the loop of Henle (medullary, cortical) | TAL |
| 15 | podocyte | Pod |
| 0, 4, 16 | endothelial cells (peritubular capillary, vasa recta) | — |
| 2, 17 | distal convoluted tubule (DCT2, DCT1) | — |
| 13, 14 | collecting duct (type B intercalated cells, inner medullary collecting duct) | — |
| 8, 11, 18 | fibroblasts, pericytes / smooth muscle, macrophages | — |
4. Rename clusters
Give clusters biological names. Several clusters can share one name, and several renames can be chained in one message:
Rename cluster 1, 3, 6 and 9 to PT, then rename cluster 5 and 12 to TAL, then rename cluster 15 to Pod
The UMAP, plots, and marker searches now use the new names. A name shared by several clusters works as one group:
Find markers for PT
CellPilot keeps the original cluster numbers internally; cluster 1 still works after renaming. A name that matches no cluster (for example Find markers for PT before any cluster is called PT) is answered with a short note instead of a result.
5. Plot marker genes
Gene names are typed as they appear in the dataset (mouse genes here, e.g. Slc5a2; human genes are upper case, e.g. SLC5A2):
Plot Slc5a2
Violin plot Slc5a2
Dotplot Slc5a2 Umod Nphs2 Pecam1 Ptprc
Change color to green black red
Plot colors the UMAP by expression; Violin plot shows the expression per cluster; Dotplot compares several genes across clusters (dot size: fraction of cells expressing the gene; color: mean expression). Violin and dot plots use your cluster names. Change color recolors the last expression or dot plot.
Plot Slc5a2: SGLT2, expressed in the early proximal tubule.
Violin plot Slc5a2: highest in the PT group.
Dotplot: Slc5a2 (PT), Umod (TAL), Nphs2 (podocytes), Pecam1 (endothelium), Ptprc (immune cells).
Change color to green black red applied to the dot plot.6. Adjust analysis parameters
See the settings of any step, then change them in plain words. CellPilot reruns only the steps that need it.
List parameters for cell filtering
Rerun the analysis by setting min gene = 500
Rerun umap with min dist = 0.4
Recluster the cells using resolution = 2.0
| Command | What happens |
|---|---|
List parameters for cell filtering | Shows the quality-control settings and how many cells were kept (8,302 of 9,616). |
Rerun the analysis by setting min gene = 500 | Also removes cells with fewer than 500 detected genes, on top of the automatic quality control, and reruns the whole analysis: 8,065 cells remain. You can also set min UMIs or mito, e.g. filter cells with mito above 15%. |
Rerun umap with min dist = 0.4 | Recomputes only the UMAP layout (larger values spread the points more); clusters stay the same. |
Recluster the cells using resolution = 2.0 | Recomputes the clusters: higher resolution gives more, smaller clusters (27 clusters here), lower gives fewer. |
Rerunning the analysis or reclustering creates new clusters, so cluster names you gave earlier are cleared; annotate or rename again afterwards.
List parameters for cell filtering after setting min gene = 500: the automatic thresholds (162 counts, 2.6% mitochondrial reads) are kept and the gene minimum is raised to 500.
Recluster the cells using resolution = 2.0: 27 clusters.7. Save and revisit results
CellPilot saves the analysis (UMAP, clusters, and cluster names) as cellpilot_results.json next to the data. When you load the same dataset again, CellPilot asks whether to load the previous results, so you can continue where you left off without rerunning the analysis.