, s_genes, g2m_genes, copy=False, **kwargs)

Score cell cycle genes [Satija15].

Given two lists of genes associated to S phase and G2M phase, calculates scores and assigns a cell cycle phase (G1, S or G2M). See score_genes() for more explanation.

adata : AnnData

The annotated data matrix.

s_genes : list

List of genes associated with S phase.

g2m_genes : list

List of genes associated with G2M phase.

copy : bool, optional (default: False)

Copy adata or modify it inplace.

**kwargs : optional keyword arguments

Are passed to score_genes(). ctrl_size is not possible, as it’s set as min(len(s_genes), len(g2m_genes)).


Depending on copy, returns or updates adata with the following fields.

S_scoreadata.obs, dtype object

The score for S phase for each cell.

G2M_scoreadata.obs, dtype object

The score for G2M phase for each cell.

phaseadata.obs, dtype object

The cell cycle phase (S, G2M or G1) for each cell.

See also



See this notebook.