Skip to main content

Single-cell

Single-cell RNA-seq measures genes in each cell on its own, often thousands of cells at once. In a note you can remove bad cells, group cells that look alike, name the cell types and follow cells as they change.

Prompts to try

Copy a prompt into a new note and send it. When the result is back, send the follow-up.

  1. Find low-quality cells. Send:

    Load the pbmc3k dataset from TENxPBMCData. It is about 2,700 blood immune cells (PBMCs) from one healthy donor, sequenced by 10x Genomics.

    Then:

    Compute per-cell QC metrics with scater, using the genes whose symbol starts with "MT-" as the mitochondrial set.
  2. Name the cell types. Send:

    Load the pbmc4k dataset from TENxPBMCData. It is about 4,000 blood cells from a healthy donor, sequenced by 10x Genomics. Use the gene symbols as row names.

    Then:

    Run QC with scrapper, taking the mitochondrial genes from the "MT-" symbols, then normalise, pick variable genes, run a PCA, cluster and make a UMAP.

    Then:

    Label each cell with SingleR against the Monaco reference, once with the main labels and once with the fine labels.
  3. Compare treated and untreated cells, patient by patient. Send:

    Load Kang18_8vs8 from muscData. It is blood cells from 8 lupus patients, split and either left untreated or stimulated with interferon-beta for 6 hours, then sequenced on 10x.

    Then:

    Why should the patient, not the cell, be the unit of replication here?
  4. Follow cells as they mature. Send:

    Load the mouse embryo part of LaMannoBrainData from scRNAseq. It is developing mouse ventral midbrain from embryonic day 11.5 to 18.5, studied for its dopaminergic neurons.

    Then:

    Which column has the cell types? Keep the radial glia, progenitors, neuroblasts and dopaminergic neurons.

What a note can do

Notes keep the data in a SingleCellExperiment, one R object for the counts and the cell information. They follow the OSCA books and the scrapper book.

  • Get data. Load public data from scRNAseq, TENxPBMCData, muscData, SingleCellMultiModal, TabulaMurisSenisData or HCAData. Raw 10x output and scanpy .h5ad files can be read too.
  • Quality control. Find damaged cells with scater and scuttle, tell real cells from empty droplets with DropletUtils, and find doublets (two cells read as one) with scDblFinder.
  • Normalise and cluster. Make cells comparable with scran or scrapper, then group cells that look alike (bluster) and draw a UMAP map of all cells.
  • Merge samples. Remove differences between batches or donors with fastMNN (batchelor) or Harmony.
  • Name cell types. SingleR compares each cell with a reference from celldex.
  • Trajectories. slingshot and TSCAN order cells along a path, such as a stem cell becoming a mature cell.
  • Compare conditions. Add up cells per patient (pseudo-bulk) and test with edgeR.
  • More than RNA. Surface proteins (CITE-seq) and sample hashtags.

Notes start from count matrices, such as 10x output or .h5ad files, not from sequencing reads. Steps on raw reads run in Reports on Roihu; CSC’s list of biology tools shows what is there.

Plots come from scater.

Example notes

The plot of mitochondrial percentage against library size in the 'What makes a cell low quality? 3k blood cells' note.