rapids_singlecell.tl.score_genes_cell_cycle#
- rapids_singlecell.tl.score_genes_cell_cycle(adata, *, s_genes, g2m_genes, out=False, copy=False, **kwargs)[source]#
Score cell cycle genes [SNS+15].
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.- Parameters:
- adata
AnnData The annotated data matrix.
- s_genes
Sequence[str] List of genes associated with S phase.
- g2m_genes
Sequence[str] List of genes associated with G2M phase.
- out
CellCycleOut|bool(default:False) A mapping from output names to accessors writes only the outputs it names, e.g.
{'phase': A.obs['cc_phase']}(seeCellCycleOut). IfTrue, the outputs are returned as aCellCycleResult. IfFalse, they are written to.obs['S_score'],.obs['G2M_score']and.obs['phase'].- **kwargs
Are passed to
score_genes().ctrl_sizeis not possible, as it’s set asmin(len(s_genes), len(g2m_genes)).
- adata
- Return type:
- Returns:
The outputs as a
CellCycleResultifout=True, elseNone. By default sets the following fields:adata.obs['S_score']pandas.Series(dtypeobject)The score for S phase for each cell.
adata.obs['G2M_score']pandas.Series(dtypeobject)The score for G2M phase for each cell.
adata.obs['phase']pandas.Series(dtypeobject)The cell cycle phase (
S,G2MorG1) for each cell.
See also