We demonstrate how to mitigate the effects of cell cycle heterogeneity in scRNA-seq data by calculating cell cycle phase scores based on canonical markers, and regressing these out of the data during pre-processing. We demonstrate this on a dataset of murine hematopoietic progenitors (Nestorowa et al., Blood 2016.You can download the files needed to run this vignette here.

library(Seurat)

# Read in the expression matrix The first row is a header row, the first column is rownames
exp.mat <- read.table(file = "../data/nestorawa_forcellcycle_expressionMatrix.txt", header = TRUE, 
    as.is = TRUE, row.names = 1)

# A list of cell cycle markers, from Tirosh et al, 2015, is loaded with Seurat.  We can
# segregate this list into markers of G2/M phase and markers of S phase
s.genes <- cc.genes$s.genes
g2m.genes <- cc.genes$g2m.genes

# Create our Seurat object and complete the initalization steps
marrow <- CreateSeuratObject(counts = exp.mat)
marrow <- NormalizeData(marrow)
marrow <- FindVariableFeatures(marrow, selection.method = "vst")
marrow <- ScaleData(marrow, features = rownames(marrow))

If we run a PCA on our object, using the variable genes we found in FindVariableFeatures above, we see that while most of the variance can be explained by lineage, PC8 and PC10 are split on cell-cycle genes including TOP2A and MKI67. We will attempt to regress this signal from the data, so that cell-cycle heterogneity does not contribute to PCA or downstream analysis.

marrow <- RunPCA(marrow, features = VariableFeatures(marrow), ndims.print = 6:10, nfeatures.print = 10)
## PC_ 6 
## Positive:  SELL, ARL6IP1, CCL9, CD34, ADGRL4, BPIFC, NUSAP1, FAM64A, CD244, C030034L19RIK 
## Negative:  LY6C2, AA467197, CYBB, MGST2, ITGB2, PF4, CD74, ATP1B1, GP1BB, TREM3 
## PC_ 7 
## Positive:  F13A1, LY86, CFP, IRF8, CSF1R, TIFAB, IFI209, CCR2, TNS4, MS4A6C 
## Negative:  HDC, CPA3, PGLYRP1, MS4A3, NKG7, UBE2C, CCNB1, NUSAP1, PLK1, FUT8 
## PC_ 8 
## Positive:  NUSAP1, UBE2C, KIF23, PLK1, CENPF, FAM64A, CCNB1, H2AFX, ID2, CDC20 
## Negative:  WFDC17, SLC35D3, ADGRL4, VLDLR, CD33, H2AFY, P2RY14, IFI206, CCL9, CD34 
## PC_ 9 
## Positive:  IGKC, JCHAIN, LY6D, MZB1, CD74, IGLC2, FCRLA, IGKV4-50, IGHM, IGHV9-1 
## Negative:  SLC2A6, HBA-A1, HBA-A2, IGHV8-7, FCER1G, F13A1, HBB-BS, PLD4, HBB-BT, IGFBP4 
## PC_ 10 
## Positive:  H2AFX, FAM64A, ZFP383, NUSAP1, CDC25B, CENPF, GBP10, TOP2A, GBP6, GFRA1 
## Negative:  CTSW, XKRX, PRR5L, RORA, MBOAT4, A630014C17RIK, ZFP105, COL9A3, CLEC2I, TRAT1
DimHeatmap(marrow, dims = c(8, 10))

Assign Cell-Cycle Scores

First, we assign each cell a score, based on its expression of G2/M and S phase markers. These marker sets should be anticorrelated in their expression levels, and cells expressing neither are likely not cycling and in G1 phase.

We assign scores in the CellCycleScoring function, which stores S and G2/M scores in object meta data, along with the predicted classification of each cell in either G2M, S or G1 phase. CellCycleScoring can also set the identity of the Seurat object to the cell-cycle phase by passing set.ident = TRUE (the original identities are stored as old.ident). Please note that Seurat does not use the discrete classifications (G2M/G1/S) in downstream cell cycle regression. Instead, it uses the quantitative scores for G2M and S phase. However, we provide our predicted classifications in case they are of interest.

marrow <- CellCycleScoring(marrow, s.features = s.genes, g2m.features = g2m.genes, set.ident = TRUE)

# view cell cycle scores and phase assignments
head(marrow[[]])
orig.ident nCount_RNA nFeature_RNA S.Score G2M.Score Phase old.ident
Prog_013 Prog 2563089 10211 -0.1170029 -0.4538757 G1 Prog
Prog_019 Prog 3030620 9991 -0.1626647 0.5971422 G2M Prog
Prog_031 Prog 1293487 10192 -0.3487900 -0.3897431 G1 Prog
Prog_037 Prog 1357987 9599 -0.4382238 0.6933502 G2M Prog
Prog_008 Prog 4079891 10540 0.5520689 0.1572967 S Prog
Prog_014 Prog 2569783 10788 0.0428207 0.3443098 G2M Prog
# Visualize the distribution of cell cycle markers across
RidgePlot(marrow, features = c("PCNA", "TOP2A", "MCM6", "MKI67"), ncol = 2)

# Running a PCA on cell cycle genes reveals, unsurprisingly, that cells separate entirely by
# phase
marrow <- RunPCA(marrow, features = c(s.genes, g2m.genes))
## PC_ 1 
## Positive:  BIRC5, MKI67, HMGB2, CDK1, CDCA3, TOP2A, CKS1B, CDCA8, UBE2C, HMMR 
##     AURKB, TACC3, TUBB4B, KIF11, CKAP2L, RRM1, NUSAP1, TPX2, NUF2, CKS2 
##     AURKA, SMC4, CDC20, CENPA, RRM2, TYMS, BUB1, NCAPD2, CCNB2, CENPF 
## Negative:  UNG, MSH2, CASP8AP2, RFC2, CDCA7, CTCF, DTL, MCM6, CHAF1B, HELLS 
##     PSRC1, BRIP1, UBR7, WDR76, GAS2L3, POLD3, BLM, G2E3, MCM4, LBR 
##     MCM2, HN1, DSCC1, CKAP5, USP1, GINS2, ANP32E, PRIM1, RPA2, FAM64A 
## PC_ 2 
## Positive:  UBE2C, FAM64A, CENPF, NUSAP1, GAS2L3, KIF2C, KIF23, CENPE, HMMR, TPX2 
##     PSRC1, AURKA, KIF11, CKS2, CCNB2, CKAP5, CDC20, CDC25C, CENPA, CKAP2L 
##     G2E3, CDCA8, HN1, KIF20B, NEK2, BUB1, DLGAP5, MKI67, GTSE1, CDCA2 
## Negative:  UHRF1, MCM6, PCNA, MCM4, MCM2, UNG, MCM5, TIPIN, HELLS, RRM2 
##     SLBP, NASP, GINS2, RPA2, CDC6, DTL, PRIM1, CCNE2, CDCA7, DSCC1 
##     CHAF1B, RAD51, CDC45, POLA1, CLSPN, ATAD2, EXO1, RRM1, TYMS, RFC2 
## PC_ 3 
## Positive:  CENPA, CCNB2, CDC6, CCNE2, CDC20, FEN1, CDCA3, RANGAP1, TUBB4B, LBR 
##     RRM1, CKS2, CDCA8, BIRC5, NEK2, RRM2, NASP, RPA2, HMGB2, HMMR 
##     UBR7, SLBP, BUB1, KIF2C, TPX2, MCM2, MCM4, TIPIN, CKAP2, GINS2 
## Negative:  TOP2A, POLA1, RFC2, AURKB, CDCA2, FAM64A, BRIP1, NDC80, TYMS, NUSAP1 
##     CDK1, GAS2L3, KIF23, SMC4, HN1, WDR76, E2F8, TTK, ATAD2, PRIM1 
##     TMPO, KIF11, CBX5, ANLN, CTCF, CKAP2L, G2E3, CKAP5, HELLS, KIF20B 
## PC_ 4 
## Positive:  CDCA7, FAM64A, RFC2, GAS2L3, UNG, MSH2, CKAP2, KIF23, MCM2, MCM4 
##     HN1, HELLS, MCM5, CDC20, USP1, PSRC1, LBR, MCM6, G2E3, POLD3 
##     DTL, KIF2C, RPA2, CKAP5, CENPE, NEK2, DLGAP5, ECT2, CCNB2, UBR7 
## Negative:  E2F8, RAD51AP1, TYMS, RRM2, RAD51, BLM, CLSPN, MKI67, NDC80, BIRC5 
##     AURKB, CDCA3, ATAD2, NUF2, CDC6, TOP2A, POLA1, CKS2, ANLN, PCNA 
##     CCNE2, ANP32E, HMGB2, CTCF, TUBB4B, RRM1, CDC45, SLBP, KIF11, CENPA 
## PC_ 5 
## Positive:  ANP32E, CASP8AP2, HELLS, TMPO, HMGB2, NCAPD2, WDR76, CTCF, CKS2, CCNB2 
##     POLA1, CKS1B, USP1, ATAD2, E2F8, SMC4, FAM64A, TIPIN, KIF20B, CDCA7 
##     UNG, SLBP, UBR7, MKI67, DTL, PSRC1, NASP, CENPA, CENPE, CDCA3 
## Negative:  FEN1, CHAF1B, HN1, CDC45, MSH2, AURKA, LBR, RAD51, CDCA2, GINS2 
##     AURKB, CDK1, UBE2C, DSCC1, GTSE1, TUBB4B, RRM2, KIF23, ANLN, G2E3 
##     EXO1, POLD3, TTK, RRM1, NUSAP1, TACC3, RAD51AP1, NEK2, CKAP2L, CDC20
DimPlot(marrow)

We score single cells based on the scoring strategy described in Tirosh et al. 2016. See ?AddModuleScore in Seurat for more information, this function can be used to calculate supervised module scores for any gene list.

Regress out cell cycle scores during data scaling

We now attempt to subtract (‘regress out’) this source of heterogeneity from the data. For users of Seurat v1.4, this was implemented in RegressOut. However, as the results of this procedure are stored in the scaled data slot (therefore overwriting the output of ScaleData), we now merge this functionality into the ScaleData function itself.

For each gene, Seurat models the relationship between gene expression and the S and G2M cell cycle scores. The scaled residuals of this model represent a ‘corrected’ expression matrix, that can be used downstream for dimensional reduction.

marrow <- ScaleData(marrow, vars.to.regress = c("S.Score", "G2M.Score"), features = rownames(marrow))
# Now, a PCA on the variable genes no longer returns components associated with cell cycle
marrow <- RunPCA(marrow, features = VariableFeatures(marrow), nfeatures.print = 10)
## PC_ 1 
## Positive:  BLVRB, CAR2, KLF1, AQP1, CES2G, ERMAP, CAR1, FAM132A, RHD, SPHK1 
## Negative:  TMSB4X, H2AFY, CORO1A, PLAC8, EMB, MPO, PRTN3, CD34, LCP1, LAPTM5 
## PC_ 2 
## Positive:  ANGPT1, ADGRG1, MEIS1, ITGA2B, MPL, APOE, DAPP1, RAB37, GATA2, F2R 
## Negative:  LY6C2, ELANE, HP, ANXA3, IGSF6, CTSG, CLEC12A, TIFAB, SLPI, ALAS1 
## PC_ 3 
## Positive:  APOE, GATA2, NKG7, MUC13, MS4A3, RAB44, HDC, CPA3, FCGR3, ELANE 
## Negative:  FLT3, DNTT, LSP1, WFDC17, MYL10, GIMAP6, LAX1, GPR171, TBXA2R, IL12A 
## PC_ 4 
## Positive:  CSRP3, DNTT, ST8SIA6, MPEG1, SCIN, LGALS1, CMAH, RGL1, MFSD2B, APOE 
## Negative:  PROCR, HLF, MPL, MMRN1, SERPINA3G, ESAM, GSTM1, D630039A03RIK, MYL10, LY6A 
## PC_ 5 
## Positive:  PF4, GP1BB, SDPR, F2RL2, RAB27B, SLC14A1, TREML1, PBX1, F2R, TUBA8 
## Negative:  CPA3, LMO4, IKZF2, IFITM1, FUT8, MS4A2, SIGLECF, CSRP3, RAB44, HDC
# When running a PCA on only cell cycle genes, cells no longer separate by cell-cycle phase
marrow <- RunPCA(marrow, features = c(s.genes, g2m.genes))
## PC_ 1 
## Positive:  CENPA, CCNB2, CDC6, CDCA3, BIRC5, CDC20, CCNE2, RRM2, RRM1, HMGB2 
##     TUBB4B, CDCA8, FEN1, CKS2, NASP, TIPIN, SLBP, RANGAP1, HMMR, RPA2 
##     MCM2, MCM4, NEK2, TPX2, BUB1, LBR, CKS1B, GINS2, KIF2C, UBR7 
## Negative:  TOP2A, AURKB, NUSAP1, FAM64A, CDCA2, RFC2, POLA1, GAS2L3, KIF23, CDK1 
##     SMC4, KIF11, HN1, BRIP1, NDC80, TYMS, TTK, CKAP2L, CKAP5, CENPF 
##     E2F8, G2E3, ATAD2, PRIM1, ANLN, WDR76, KIF20B, TMPO, CTCF, CBX5 
## PC_ 2 
## Positive:  CDCA7, CDC20, UNG, FAM64A, GAS2L3, MCM4, KIF2C, MCM2, MCM5, CKAP2 
##     PSRC1, KIF23, NEK2, RFC2, CENPE, CKAP5, DLGAP5, HN1, USP1, MSH2 
##     CCNB2, UBE2C, MCM6, DTL, CENPF, RPA2, G2E3, NUSAP1, UBR7, TPX2 
## Negative:  TYMS, BIRC5, MKI67, RRM2, AURKB, TOP2A, RAD51AP1, PCNA, RAD51, CDCA3 
##     CLSPN, NUF2, ATAD2, NDC80, POLA1, HMGB2, E2F8, CDK1, CDC45, UHRF1 
##     RRM1, KIF11, CCNE2, CDC6, BRIP1, SLBP, TACC3, TTK, ANLN, TUBB4B 
## PC_ 3 
## Positive:  HMGB2, NCAPD2, HELLS, CCNB2, FAM64A, MKI67, ANP32E, CASP8AP2, ATAD2, CKS1B 
##     TMPO, CKS2, DTL, E2F8, SMC4, CTCF, KIF20B, WDR76, UNG, POLA1 
##     PSRC1, TIPIN, USP1, CDCA3, SLBP, CENPE, CENPA, CDCA8, CDCA7, TPX2 
## Negative:  UBE2C, AURKA, HMMR, CDK1, FEN1, TUBB4B, AURKB, MCM6, RRM1, CHAF1B 
##     HN1, MCM2, GINS2, GTSE1, NUSAP1, CDC45, RRM2, NEK2, CKAP2L, TTK 
##     CDC20, ANLN, RAD51, TACC3, CDCA2, BIRC5, RAD51AP1, CENPF, CDC6, MCM5 
## PC_ 4 
## Positive:  MCM2, MCM6, TMPO, MCM5, CKS2, ANP32E, CBX5, TIPIN, CKS1B, UBE2C 
##     POLA1, HMGB2, WDR76, SLBP, PRIM1, NASP, PCNA, MCM4, AURKA, UBR7 
##     BLM, RFC2, CDCA7, SMC4, TOP2A, AURKB, TUBB4B, GINS2, CTCF, RANGAP1 
## Negative:  CCNE2, KIF23, RRM2, FAM64A, EXO1, CDC45, GAS2L3, HJURP, FEN1, CLSPN 
##     RAD51, DTL, CDC20, CDC6, PSRC1, CDCA2, LBR, NUF2, NUSAP1, DLGAP5 
##     UHRF1, RAD51AP1, DSCC1, CCNB2, CHAF1B, TACC3, CKAP5, NEK2, BIRC5, BRIP1 
## PC_ 5 
## Positive:  E2F8, BLM, CKS2, TUBB4B, ANP32E, PSRC1, CKAP5, ANLN, CDC6, NEK2 
##     CENPA, DSCC1, KIF20B, UBR7, HJURP, USP1, HN1, DLGAP5, WDR76, CCNE2 
##     G2E3, TMPO, POLA1, UNG, RRM2, EXO1, DTL, CKAP2, ATAD2, HMMR 
## Negative:  CDCA7, HELLS, CKS1B, BIRC5, CDCA8, NCAPD2, AURKB, CCNB2, NUF2, KIF23 
##     FAM64A, CKAP2L, CDCA3, MSH2, RFC2, MKI67, TIPIN, NASP, BRIP1, RAD51 
##     POLD3, TPX2, CDC45, AURKA, TACC3, MCM5, CDC25C, LBR, RRM1, MCM2
DimPlot(marrow)

As the best cell cycle markers are extremely well conserved across tissues and species, we have found this procedure to work robustly and reliably on diverse datasets.

Alternate Workflow

The procedure above removes all signal associated with cell cycle. In some cases, we’ve found that this can negatively impact downstream analysis, particularly in differentiating processes (like murine hematopoiesis), where stem cells are quiescent and differentiated cells are proliferating (or vice versa). In this case, regressing out all cell cycle effects can blur the distinction between stem and progenitor cells as well.

As an alternative, we suggest regressing out the difference between the G2M and S phase scores. This means that signals separating non-cycling cells and cycling cells will be maintained, but differences in cell cycle phase amongst proliferating cells (which are often uninteresting), will be regressed out of the data

marrow$CC.Difference <- marrow$S.Score - marrow$G2M.Score
marrow <- ScaleData(marrow, vars.to.regress = "CC.Difference", features = rownames(marrow))
# cell cycle effects strongly mitigated in PCA
marrow <- RunPCA(marrow, features = VariableFeatures(marrow), nfeatures.print = 10)
## PC_ 1 
## Positive:  BLVRB, KLF1, ERMAP, FAM132A, CAR2, RHD, CES2G, SPHK1, AQP1, SLC38A5 
## Negative:  TMSB4X, CORO1A, PLAC8, H2AFY, LAPTM5, CD34, LCP1, TMEM176B, IGFBP4, EMB 
## PC_ 2 
## Positive:  APOE, GATA2, RAB37, ANGPT1, ADGRG1, F2R, MEIS1, MPL, PDZK1IP1, DAPP1 
## Negative:  CTSG, ELANE, LY6C2, HP, CLEC12A, ANXA3, IGSF6, TIFAB, SLPI, MPO 
## PC_ 3 
## Positive:  APOE, GATA2, NKG7, MUC13, ITGA2B, TUBA8, CPA3, RAB44, SLC18A2, CD9 
## Negative:  DNTT, FLT3, WFDC17, LSP1, MYL10, LAX1, GIMAP6, IGHM, CD24A, MN1 
## PC_ 4 
## Positive:  CSRP3, ST8SIA6, SCIN, LGALS1, APOE, ITGB7, MFSD2B, RGL1, DNTT, IGHV1-23 
## Negative:  MPL, MMRN1, PROCR, SERPINA3G, HLF, ESAM, PTGS1, D630039A03RIK, NDN, PPIC 
## PC_ 5 
## Positive:  HDC, FCGR3, LMO4, IFITM1, HLF, PROCR, CSRP3, CPA3, PGLYRP1, IKZF2 
## Negative:  GP1BB, PF4, SDPR, F2RL2, TREML1, RAB27B, SLC14A1, PBX1, PLEK, TUBA8
# when running a PCA on cell cycle genes, actively proliferating cells remain distinct from G1
# cells however, within actively proliferating cells, G2M and S phase cells group together
marrow <- RunPCA(marrow, features = c(s.genes, g2m.genes))
## PC_ 1 
## Positive:  BIRC5, RRM2, MKI67, HMGB2, CDK1, RRM1, CDCA3, TOP2A, UBE2C, CKS1B 
##     PCNA, UHRF1, TYMS, MCM5, CDCA8, TIPIN, HMMR, TUBB4B, NASP, TACC3 
##     AURKB, CDC45, RAD51, KIF11, NUSAP1, TPX2, SLBP, CKAP2L, NUF2, CDC6 
## Negative:  PSRC1, CTCF, GAS2L3, MSH2, CASP8AP2, G2E3, CKAP5, HN1, FAM64A, RFC2 
##     UNG, KIF23, CDCA7, BLM, BRIP1, LBR, ANP32E, UBR7, DTL, CDC25C 
##     POLD3, CHAF1B, WDR76, CENPE, E2F8, ECT2, CKAP2, USP1, CDCA2, NDC80 
## PC_ 2 
## Positive:  TOP2A, FAM64A, RFC2, CDCA2, AURKB, NUSAP1, POLA1, KIF23, GAS2L3, BRIP1 
##     HN1, CDK1, KIF11, NDC80, TTK, SMC4, TYMS, CKAP2L, E2F8, CENPF 
##     PRIM1, WDR76, ATAD2, CKAP5, ANLN, G2E3, TMPO, CBX5, KIF20B, CTCF 
## Negative:  CENPA, CCNB2, CDC6, CDC20, CCNE2, FEN1, CDCA3, CKS2, RANGAP1, TUBB4B 
##     RRM2, BIRC5, CDCA8, NASP, RRM1, HMGB2, SLBP, LBR, NEK2, RPA2 
##     MCM2, UBR7, HMMR, MCM4, TIPIN, BUB1, TPX2, KIF2C, GINS2, UNG 
## PC_ 3 
## Positive:  E2F8, TYMS, RAD51AP1, AURKB, RRM2, RAD51, MKI67, CLSPN, TOP2A, NDC80 
##     BLM, ATAD2, BIRC5, POLA1, PCNA, NUF2, CDCA3, ANLN, CDC6, CTCF 
##     ANP32E, CKS2, HMGB2, SLBP, TUBB4B, CDC45, KIF11, CCNE2, RRM1, BRIP1 
## Negative:  CDCA7, FAM64A, GAS2L3, UNG, KIF23, CDC20, PSRC1, KIF2C, RFC2, CKAP2 
##     MCM4, MSH2, HN1, MCM2, CENPE, CCNB2, HELLS, MCM5, NEK2, USP1 
##     CKAP5, DTL, CENPF, G2E3, NUSAP1, RPA2, DLGAP5, LBR, MCM6, POLD3 
## PC_ 4 
## Positive:  HELLS, NCAPD2, FAM64A, HMGB2, CASP8AP2, CCNB2, ANP32E, CKS1B, CTCF, TMPO 
##     WDR76, CKS2, UNG, ATAD2, POLA1, SMC4, DTL, MKI67, CDCA7, KIF20B 
##     TIPIN, USP1, E2F8, PSRC1, UHRF1, CENPE, CDCA3, CDCA8, SLBP, TPX2 
## Negative:  AURKA, CHAF1B, FEN1, UBE2C, HN1, TUBB4B, HMMR, MCM6, NEK2, GTSE1 
##     ANLN, MSH2, GINS2, MCM2, CDC20, G2E3, AURKB, LBR, CDC45, NUSAP1 
##     CDK1, CDCA2, RRM1, TTK, CKAP2L, BLM, RAD51, DSCC1, CENPF, RRM2 
## PC_ 5 
## Positive:  ANP32E, MCM6, BLM, TMPO, MCM2, CKS2, UBR7, WDR76, POLA1, MCM5 
##     HN1, E2F8, RFC2, CBX5, MCM4, TUBB4B, CKAP5, UBE2C, USP1, PRIM1 
##     ANLN, SLBP, CTCF, CASP8AP2, G2E3, NEK2, UNG, AURKA, SMC4, TIPIN 
## Negative:  KIF23, CCNE2, FAM64A, GAS2L3, RAD51, CLSPN, EXO1, CDC45, NUF2, RRM2 
##     HELLS, CCNB2, FEN1, BRIP1, BIRC5, CDCA2, DTL, UHRF1, NCAPD2, POLD3 
##     HJURP, CDC25C, TACC3, RAD51AP1, LBR, CDC6, NDC80, NUSAP1, MKI67, CHAF1B
DimPlot(marrow)