scanpy.api.tl.cyclone

scanpy.api.tl.cyclone(adata, marker_pairs, gene_names, sample_names, iterations=1000, min_iter=100, min_pairs=50)

Assigns scores and predicted class to observations [Scialdone15] [Fechtner18].

Calculates scores for each observation and each phase and assigns prediction based on marker pairs indentified by sandbag.

This reproduces the approach of [Scialdone15] in the implementation of [Fechtner18].

Parameters
adata : AnnData

The annotated data matrix.

marker_pairs : dict

Dictionary of marker pairs. See sandbag() output.

gene_names : list

List of genes.

sample_names : list

List of samples.

iterations : int, optional (default: 1000)

An integer scalar specifying the number of iterations for random sampling to obtain a cycle score.

min_iter : int, optional (default: 100)

An integer scalar specifying the minimum number of iterations for score estimation

min_pairs : int, optional (default: 50)

An integer scalar specifying the minimum number of iterations for score estimation

Returns

A DataFrame with samples as index and categories as columns with scores for each category for each sample and a additional column with the name of the max scoring category for each sample.

If marker pairs contain only the cell cycle categories G1, S and G2M an additional column pypairs_cc_prediction will be added. Where category S is assigned to samples where G1 and G2M score are below 0.5.