scanpy.external.tl.cyclone

scanpy.external.tl.cyclone(adata, marker_pairs=None, *, 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 : Optional[Mapping[str, Collection[Tuple[str, str]]]] (default: None)

Mapping of categories to lists of marker pairs. See sandbag() output.

iterations : int (default: 1000)

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

min_iter : int (default: 100)

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

min_pairs : int (default: 50)

An integer scalar specifying the minimum number of pairs for score estimation.

Return type:

DataFrame

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 contains 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 < 0.5.