Skip to main content

Matlab example for Local Enrichment Analysis (LEA) analysis with real data


Snijder, Berend; Severin, Yannik (2022), Matlab example for Local Enrichment Analysis (LEA) analysis with real data, Dryad, Dataset,


Phenotypic plasticity is essential to the immune system, yet the factors that shape it are not fully understood. Here, we comprehensively analyze immune cell phenotypes including morphology across human cohorts by single-round multiplexed immunofluorescence, automated microscopy, and deep learning. Using the uncertainty of convolutional neural networks to cluster the phenotypes of 8 distinct immune cell subsets, we find that the resulting maps are influenced by donor age, gender, and blood pressure, revealing distinct polarization and activation-associated phenotypes across immune cell classes. We further associate T-cell morphology to transcriptional state based on their joint donor variability, and validate an inflammation-associated polarized T-cell morphology, and an age-associated loss of mitochondria in CD4+ T-cells. Taken together, we show that immune cell phenotypes reflect both molecular and personal health information, opening new perspectives into the deep immune phenotyping of individual people in health and disease.


This dataset accompanies the manuscript "Multiplexed high-throughput immune cell imaging reveals molecular health-associated phenotypes" by Yannik Severin et al., Science Advances, 2022. It includes:

- knnlea.m: Matlab function for the presented Local Enrichment Analysis method

- LEA_Example_Data.mat containing data from the manuscript to reproduce a LEA analysis

- LEA_Example_Script.mat that runs through the analysis steps

- README.txt

Usage notes

Code is compatible with Matlab v2020. The corresponding open-source alternative is Octave (


Swiss National Science Foundation, Award: PP00P3_163961