Skip to content

Tutorials

Every tutorial on this page is executed against the real dataset it names, on the machine that builds this site — the numbers and the figures are what the code produced, not what it should produce. Each fetches its own data through piaso.data, so you can run it as written.

scRNA-seq

what it covers
Human PBMC scRNA-seq end to end (AnnData)Counts → two-tailed QC → clusters → cell types, on human blood. A whole cluster turns out to be mitochondrial reads. The place to start.
Human PBMC scRNA-seq end to end (cytome)The same human analysis streamed from disk, so memory does not scale with cell count.
Mouse brain scRNA-seq end to end (AnnData)Cell Ranger counts → QC → doublets → clusters → cell types, on mouse brain nuclei.
Mouse brain scRNA-seq end to end (cytome)The same mouse analysis, streamed.
Multiple samplesPer-library doublets, per-sample QC, and what a batch effect does and does not look like.
Cells vs nucleiThe same tissue prepared both ways — a real batch effect, measured, and where it comes from.

Methods

what it covers
GDRMarker-gene-guided dimensionality reduction — an embedding built on cell identity rather than variance.
Cell type prediction with GDRTransferring labels from an annotated reference.
projectGDRFreeze a reference’s GDR space and project new data into it — the reference’s coordinates stay fixed.
LeidenLocalRe-clustering inside one cluster, without re-running the whole analysis.

Annotation

what it covers
Marker-based cell type predictionLabel cells from a reference’s markers, checked against held-out labels (91.5%) and against PIASOmarkerDB.
PIASOmarkerDB API clientQuery 36 curated marker studies from Python, and go from a gene list back to the cell types that match.

Gene sets and sequence

what it covers
Gene set scoring (PIASOscore)Scoring a gene set — or a whole pathway database — against matched control sets, with per-cell p-values.
KEGG and drug-target gene sets320 pathways and 659 drug target sets scored per cell, then asked which cell type each belongs to.
Motif analysisGenome → promoters → PWM scan → enrichment, and the background choice that decides the answer.

Cell-cell interaction

what it covers
SCALARLigand-receptor pairs between cell types, with a KNN-matched permutation null. 1.7M interactions in under a minute.

Plotting and data

what it covers
Plottingpiaso.pl end to end: embeddings, dot plots, violins, splits.
Colour palettesThe built-in palettes, and how to set your own.
Datasets and genome referencespiaso.data: what is available, and how caching works.
cytome basicsThe file format itself — what it stores and how to read it.

Which one first?

Start with Human PBMC scRNA-seq end to end (AnnData) if your data is human, and Mouse brain scRNA-seq end to end (AnnData) if it is mouse. Either introduces every function the others reuse; the pair differs in what the QC step has to do, which is the part that does not transfer between samples. Median mitochondrial content is 12.0% in the human PBMC sample and 0.011% in the mouse nuclei, so on the human page every threshold bites and one cluster turns out to be mitochondrial reads, while on the mouse page the same thresholds are inert and the highest-mitochondrial cluster is endothelium that should be kept.

Then:

  • more cells than fit in memory → the cytome version of the same page;
  • more than one library → multiple samples.

Each AnnData page has a cytome twin running deliberately the same analysis. Reading a pair side by side is the fastest way to see what changes when the matrix stays on disk: almost nothing in the calls, everything in where the results live.

From the previous release

Nineteen more tutorials are published under /tutorials/previous/ — CellRanger pre-processing, SCALAR, the PIASOmarkerDB client, KEGG and ChEMBL gene sets, GDR on scATAC-seq, pancreatic endocrinogenesis, MNIST and one million cells.

They were recovered from the PIASO v1.1.0 documentation and have not been re-run against this release, so each carries a banner saying so. They are worth reading for the analysis; check any call against the API reference before relying on it.

The original v1.1.0 site remains available at https://genecell.github.io/PIASO/ if you need the pages exactly as they were published, with their original outputs.