Milo is a method for differential abundance analysis on KNN graph from single-cell datasets.

Build Status Coverage


  1. Basic Milo example on simulated dataset
  2. Milo example on mouse gastrulation dataset: this includes a demo for downstream analysis functions.
  3. Integrating Milo in scanpy/anndata workflow

The vignettes and the reference manual can be browsed at

Example work flow

An example of the Milo work flow to get started:

milo.meta <- sim_trajectory$meta
milo.obj <- Milo(sim_trajectory$SCE)

Build a graph and neighbourhoods.

milo.obj <- buildGraph(milo.obj, k=20, d=30)
milo.obj <- makeNhoods(milo.obj, k=20, d=30, refined=TRUE, prop=0.2)

Calculate distances, count cells according to an experimental design and perform DA testing.

milo.obj <- calcNhoodDistances(milo.obj, d=30)
milo.obj <- countCells(milo.obj, samples="Sample", <- Condition + Sample, data=milo.meta)) <-[$Freq > 0, ]

milo.res <- testNhoods(milo.obj, design=~Condition,


For any question, feature request or bug report please create a new issue in this repository.