Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Find regulons and co-regulated gene programs

A regulon is a transcription factor together with the genes it is predicted to regulate. SCENIC finds regulons in RNA data in two steps. Genes whose expression follows a factor’s expression become candidate targets, and motif enrichment near those genes keeps the targets that the factor can plausibly bind. Chromatin accessibility adds independent evidence: when peaks that hold a factor’s motif, or peaks that a CUT&RUN experiment saw the factor bind, are more accessible in some cells than expected, the factor is likely active there.

This tutorial uses one 10x Genomics multiome sample of about 2,700 peripheral blood mononuclear cells (PBMCs), with RNA and ATAC measured in the same cells. We will:

  1. infer RNA regulons with the SCENIC workflow;

  2. find gene programs, groups of genes that vary together as a unit, from RNA alone;

  3. score motif accessibility in the same cells with chromVAR;

  4. score the binding sites of a CUT&RUN experiment;

  5. combine both modalities into enhancer-driven regulons, as SCENIC+ does.

The first cell downloads about 1.3 GB of public files: the 10x data (CC BY 4.0), a cisTarget motif-ranking database and motif annotations from the Aerts lab, JASPAR 2024 motifs (CC BY 4.0), the GENCODE v32 genome and gene annotation, and SPI1 CUT&RUN peaks from ChIP-Atlas (CC BY-SA 4.0). Reading the motif-ranking database needs the regulons extra: pip install "cytearc[extra,regulons]".

Started: 2026-10-16T08:41:51.116746Z | Wall time: 1941.605 s

Build the store and name the populations

Convert the 10x matrix into a CyteArc store. Its RNA and ATAC peak counts become two assays over the same cells. The standard RNA pipeline then selects cells and genes, builds the neighbor graph and UMAP, and clusters the cells.

DataStore has 2711 (2711) cells with 2 assays: ATAC RNA Cell metadata: 'I', 'ids', 'names', 'ATAC_nCounts', 'ATAC_nFeatures', 'RNA_nCounts', 'RNA_nFeatures', 'RNA_percentMito', 'RNA_percentRibo' ATAC assay has 98319 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'feature_type', 'genome', 'interval', 'nCells' RNA assay has 36601 features and following metadata: 'I', 'ids', 'names', 'dropOuts', 'feature_type', 'genome', 'interval', 'nCells'

Started: 2026-10-16T09:14:12.728378Z | Wall time: 100.740 s

Name the clusters with a small panel of canonical markers. Each cluster takes the panel whose mean expression, scaled across clusters, is highest. These names make the results easier to read; they are not a substitute for the annotation workflow in Annotate cell types and states.

CD4 T cell 858 CD14 monocyte 719 CD8 T cell 525 B cell 192 CD16 monocyte 121 NK cell 102 Dendritic cell 66 Plasmacytoid DC 29 Name: count, dtype: int64

Started: 2026-10-16T09:15:53.471245Z | Wall time: 0.829 s

Infer RNA regulons

GRNBoost2 asks, for every gene, how well each transcription factor’s expression predicts it, using gradient-boosted trees on raw counts. ds.regulons.grn runs it with the pySCENIC settings and saves the network as an artifact. It is the slowest step, so this page fits it on 500 sampled cells, the highly variable genes, and every transcription factor detected in at least 1% of cells. Use all cells and expressed genes in a real analysis.

TFtargetimportancecorrelation
0IRF7CLEC4C76.8031280.864336
1IRF7LINC0147876.5344870.736089
2IRF7PTPRS71.8073990.713395
3IRF7RHEX71.7328400.746469
4IRF7TCF468.9161180.801061

Started: 2026-10-16T09:15:54.303503Z | Wall time: 225.439 s

Each row is a link from a factor to a target gene. importance measures how much the factor helps predict the gene, and correlation gives the direction. pySCENIC turns each factor’s strongest activating links into several candidate modules, then keeps only the targets that a motif annotated to that factor ranks highly. The database ranks every gene by the best match of each motif from 10 kb upstream of its transcription start site to 10 kb past its end.

source KLF4(+) 212 BACH1(+) 209 KLF6(+) 198 SPI1(+) 177 FOXN2(+) 120 CHD1(+) 118 KLF12(+) 110 BCL6(+) 104 NR3C1(+) 103 IKZF1(+) 101 dtype: int64

Started: 2026-10-16T09:19:39.744849Z | Wall time: 18.689 s

Score every regulon in every analysed cell with AUCell. A cell scores high when the regulon’s genes are among its most strongly expressed genes. The regulon specificity score (RSS) then measures how concentrated each regulon’s activity is in each population; 1 means the regulon is active only, and evenly, in that population.

most specific regulons
group
NK cellTBX21(+), EOMES(+), IKZF2(+)
CD14 monocyteATF3(+), STAT2(+), CEBPD(+)
B cellEBF1(+), PATZ1(+), TCF4(+)
CD8 T cellEOMES(+), TBX21(+), ETS1(+)
CD4 T cellETS1(+), NFATC2(+), BACH2(+)
CD16 monocyteBATF3(+), CEBPB(+), CEBPA(+)
Plasmacytoid DCRUNX2(+), GABPB1(+), ELK1(+)
Dendritic cellRUNX2(+), CEBPD(+), ZNF467(+)

Started: 2026-10-16T09:19:58.437152Z | Wall time: 11.032 s

Three PBMC UMAP panels show AUCell scores of the ATF3, EBF1, and TBX21 regulons, which are highest in the monocyte, B-cell, and NK-cell clusters respectively.

Started: 2026-10-16T09:20:09.472122Z | Wall time: 0.594 s

The most specific regulons are known lineage factors: TBX21 and EOMES in NK cells, EBF1 in B cells, CEBPA and CEBPB in CD16 monocytes, and ETS1 and BACH2 in CD4 T cells.

Regulons that are active in the same cells may act together. The connection specificity index (CSI) of two regulons is the fraction of all regulons that correlate less with both of them than they do with each other. Clustering the CSI groups the regulons into modules, as SCENIC analyses do.

regulonsmost active in
module
1ATF3(+), BACH1(+), BATF3(+), BCL6(+), CEBPA(+), CEBPB(+), CEBPD(+), CHD1(+)CD14 monocyte
2ARID3A(+), ATF5(+), CHURC1(+), CLOCK(+), CTBP1(+), EBF1(+), ELK1(+), ETV3(+)Plasmacytoid DC
3BACH2(+), BHLHE40(+), BPTF(+), EOMES(+), ETS1(+), HDAC1(+), IKZF2(+), IKZF3(+)CD8 T cell
4CTCF(+), EGR3(+), ELF4(+), FOXJ2(+), GMEB2(+), MAFF(+), MAFK(+), MAX(+)CD14 monocyte
5BCLAF1(+), ELF1(+), ELK3(+), ETV7(+), NFE2L2(+), NRF1(+), TAF6(+), ZBTB11(+)NK cell

Started: 2026-10-16T09:20:10.068575Z | Wall time: 0.103 s

Find co-regulated gene programs

A regulon starts from a known factor. A gene program starts from the genes: genes that rise and fall together across many groups of similar cells are likely regulated as a unit, whether or not we know the factor. This needs only RNA, so it applies to any scRNA-seq dataset.

Pool the analysed cells into about a hundred small groups (metacells) to average out sampling noise; ds.regulons.profiles sums each metacell’s counts into log counts per million, for RNA and for ATAC. Then connect each variable gene to the genes it correlates with most across metacells and split that graph into programs with Leiden.

sizeleading_genes
source
P1212ABLIM1, BCL11B, CAMK4, LEF1, TC2N, RASGRF2, ZEB1, IL7R
P2210RIN2, GLT1D1, CLEC7A, PLXDC2, SLC24A4, WDFY3, VCAN-AS1, KLF4
P3126LINC02397, CD19, KLHL14, FCRL2, PAX5, FCRLA, IGHD, FCRL5
P498PTGDR, PPP2R2B, CST7, XCL2, PDGFD, LGR6, S1PR5, FCRL6
P580MEF2C, SYK, KYNU, TBC1D9, WDFY4, ARHGAP24, CD74, IRF8
P623LINC01478, LRRC26, P3H2, PHEX, TNFRSF21, CLEC4C, SCAMP5, DNASE1L3

Started: 2026-10-16T09:20:10.174422Z | Wall time: 41.989 s

Each program lists its genes by membership, the correlation of a gene with the program’s average profile, so the leading genes are the most typical. They already suggest identities: T-cell genes in P1 (BCL11B, LEF1, IL7R), monocyte genes in P2 (CLEC7A, KLF4), B-cell genes in P3 (CD19, PAX5), cytotoxic genes in P4 (CST7, XCL2), antigen-presentation genes in P5 (CD74, IRF8), and plasmacytoid DC genes in P6 (CLEC4C, LRRC26). Score each program in every cell with AUCell, as for the regulons.

Heatmap of the mean AUCell score of programs P1 to P6 in eight PBMC populations. P2 is brightest in CD14 monocytes, P3 in B cells, P4 in NK cells, and P6 in plasmacytoid DCs, while P1 marks T cells and P5 spans B cells, monocytes, and both kinds of dendritic cells.

Started: 2026-10-16T09:20:52.166418Z | Wall time: 0.936 s

Each program is most active where its genes suggest: P2 in monocytes and dendritic cells, P3 in B cells, P4 in NK cells, and P6 in plasmacytoid DCs, while P1 marks T cells and P5 the antigen-presenting B cells, monocytes, and both kinds of dendritic cells.

Which factors might drive a program? The programs were found without any factor, so compare them with the regulons: a program that shares many genes with a regulon is a candidate unit of that factor. The test counts shared genes among the variable genes that both could contain.

overlapping regulons
query
P1ETS1(+), KLF12(+), IKZF3(+)
P2KLF4(+), KLF6(+), BACH1(+)
P3TCF4(+), IKZF3(+)
P4TBX21(+), IKZF2(+), EOMES(+)
P5TCF4(+), BACH1(+), KLF4(+)
P6TCF3(+), ARID3A(+)

Started: 2026-10-16T09:20:53.104723Z | Wall time: 0.113 s

The overlaps tie programs to lineage factors: the T-cell program to ETS1, the monocyte program to KLF4, the NK program to TBX21 and EOMES, and the B-cell program to TCF4 and IKZF3.

A second route needs no regulons: test each program’s own genes for motif enrichment with the database that pruned the regulons. Large programs enrich many weak motifs, so keep the factors whose own expression follows the program across metacells. Both routes nominate candidates to test, not demonstrated regulators.

programTFmotifNEScorrelation
52P1ETS1tfdimers__MD003643.2804180.916811
205P1IKZF3metacluster_133.23.1396640.850138
208P1KLF12metacluster_133.23.1396640.772299
476P3EBF1transfac_pro__M049243.0470110.901221
500P4GFI1tfdimers__MD000303.2017210.683839
1144P5TCF4tfdimers__MD001643.0763860.884050
745P5PLAGL1metacluster_133.23.2875230.825758
887P5SPI1metacluster_24.23.2574800.794866

Started: 2026-10-16T09:20:53.219798Z | Wall time: 1.544 s

Four of the six programs have an enriched motif whose factor follows them closely. The factors agree with the overlaps for the T-cell program (ETS1, IKZF3, and KLF12) and the antigen-presentation program (TCF4), while the motifs name EBF1 for the B-cell program, which its overlaps miss. A shared regulon is stronger evidence than motif enrichment of a large program.

Score motif accessibility in the same cells

chromVAR asks whether a cell has more ATAC fragments in the peaks that hold a motif than its sequencing depth and those peaks’ average accessibility predict. It compares each motif’s peaks with background peaks of similar GC content and accessibility. First find the peaks that contain each motif, and assign them to the factor that the motif is named after. To keep this page short, scan the JASPAR motifs of a panel of immune factors; scan the whole collection for discovery.

sourceSPI1KLF4CTCFMEF2CEBF1RUNX3IRF8CEBPAPOU2F2EOMESNFKB1IRF4TCF7GATA3TBX21LEF1CEBPBPAX5
peaks with a match4315531982285072635317695137271280612461123951142711343111621066498688928881932933108

Started: 2026-10-16T09:20:54.765962Z | Wall time: 30.210 s

Heatmap of mean chromVAR z-scores, from -5 in blue to 5 in red, of 18 factors' motif peaks in eight PBMC populations. CEBPA, CEBPB, and SPI1 are high in monocytes and dendritic cells, POU2F2 in B cells, IRF4 and IRF8 in B cells and plasmacytoid DCs, TBX21 and EOMES in NK cells, and TCF7 and LEF1 in T cells.

Started: 2026-10-16T09:21:24.978118Z | Wall time: 32.032 s

Motif accessibility agrees with the RNA regulons. The CEBPA and CEBPB motifs are most accessible in monocytes; SPI1 (PU.1) in monocytes and dendritic cells; POU2F2 in B cells; IRF4 and IRF8 in B cells and plasmacytoid DCs; TBX21 and EOMES in NK cells; and TCF7 and LEF1 in T cells. Related factors share motifs, so each column measures a motif family rather than one factor. The PAX5 motif does not separate B cells here and the EBF1 motif does so only weakly, so a missing deviation is not evidence that a factor is inactive.

Score CUT&RUN binding sites

A CUT&RUN experiment for one factor maps where that factor was bound, without relying on a motif. Map the SPI1 (PU.1) peaks from primary monocytes onto the ATAC peaks and score them in the same way. Any set of regions works: CUT&Tag or ChIP-seq peaks, or peaks of another dataset.

2,519 ATAC peaks overlap an SPI1 CUT&RUN peak
SPI1 CUT&RUN peaksSPI1 motif
B cell-1.341.30
CD14 monocyte10.694.36
CD16 monocyte10.755.69
CD4 T cell-6.87-3.65
CD8 T cell-6.83-3.67
Dendritic cell11.327.15
NK cell-4.64-2.68
Plasmacytoid DC0.323.97

Started: 2026-10-16T09:21:57.012559Z | Wall time: 27.833 s

The sites that SPI1 occupies in monocytes separate myeloid cells from lymphocytes more sharply than its motif does, because the motif also counts sites that the factor does not use. B cells and plasmacytoid DCs, where the motif is moderately accessible, show no enrichment of these monocyte sites: binding sites differ between cell types even for one factor.

Build enhancer-driven regulons

With RNA and ATAC from the same cells, we can ask which peaks near a gene track its expression. SCENIC+ links each peak within 150 kb of a gene body to that gene by a gradient-boosting importance and a rank correlation across metacells. A factor’s eRegulon keeps its links whose peaks hold its motif (or its binding sites) and whose genes rank high in the factor’s GRNBoost2 network, tested by preranked GSEA.

peaksgenes
source
CEBPA_direct_+/+14164
CEBPB_direct_+/+3632
CTCF_direct_+/+22183
EBF1_direct_+/+18267
EOMES_direct_+/+4422
GATA3_direct_+/+6835
IRF4_direct_+/+9044
IRF8_direct_+/+222100
KLF4_direct_+/+606154
LEF1_direct_+/+7639
MEF2C_direct_+/+679173
PAX5_direct_+/+2621
POU2F2_direct_+/+317129
RUNX3_direct_+/+9754
SPI1_CUTRUN_+/+14783
SPI1_direct_+/+1097197
TBX21_direct_+/+7938
TCF7_direct_+/+13063

Started: 2026-10-16T09:22:24.847892Z | Wall time: 667.507 s

An eRegulon name gives its factor, the evidence for binding (direct motif annotation or CUTRUN peaks), and two signs: whether the factor’s expression rises (+) or falls (-) with its target genes, and whether the linked peaks open (+) or close (-) with them. The table lists the +/+ eRegulons, activators whose target peaks open with the targets; the other sign classes are kept in eregulons. Each row also carries the NES and adjusted_p of the module that kept it; SCENIC+'s defaults keep every module with a positive NES, so filter on adjusted_p for stricter eRegulons. Score the target genes of each eRegulon as before.

most active inmean AUCell
CEBPA_direct_+/+CD16 monocyte0.523
CEBPB_direct_+/+CD16 monocyte0.660
CTCF_direct_+/+NK cell0.205
EBF1_direct_+/+B cell0.457
EOMES_direct_+/+NK cell0.452
GATA3_direct_+/+NK cell0.293
IRF4_direct_+/+Plasmacytoid DC0.634
IRF8_direct_+/+Plasmacytoid DC0.524
KLF4_direct_+/+CD14 monocyte0.584
LEF1_direct_+/+CD4 T cell0.444
MEF2C_direct_+/+CD14 monocyte0.305
PAX5_direct_+/+B cell0.500
POU2F2_direct_+/+CD16 monocyte0.432
RUNX3_direct_+/+NK cell0.423
SPI1_CUTRUN_+/+CD16 monocyte0.571
SPI1_direct_+/+CD16 monocyte0.503
TBX21_direct_+/+NK cell0.507
TCF7_direct_+/+CD4 T cell0.375

Started: 2026-10-16T09:33:32.357471Z | Wall time: 0.993 s

The activator eRegulons of lineage factors are most active where expected: the CEBP, SPI1, and KLF4 eRegulons in monocytes, EBF1 and PAX5 in B cells, EOMES, TBX21, and RUNX3 in NK cells, IRF4 and IRF8 in plasmacytoid DCs, and LEF1 and TCF7 in CD4 T cells. The SPI1 eRegulon built from CUT&RUN peaks agrees with the one built from motifs.

What to report

  • Regulons, programs, and eRegulons are hypotheses. GRNBoost2 is stochastic: rerun ds.regulons.grn with another random_seed and report the regulons that persist.

  • Use reference files that match the data: the genome build and gene annotation of the peaks, and a cisTarget database for the same species and gene names.

  • A motif is shared by related factors, so a motif score names a family; pair it with the factor’s expression or binding data before naming the factor.

  • Binding data describe the cells that were profiled; the SPI1 peaks here come from monocytes.

The methods page summarizes how these methods were validated against pySCENIC 0.12.1 and chromVAR, and the regulons API reference lists every function.