pegasus.calculate_z_score¶
- pegasus.calculate_z_score(data, n_bins=50)[source]¶
Calculate the standardized z scores of the count matrix.
- Parameters
data (
MultimodalData
,UnimodalData
, oranndata.AnnData
object.) – Single cell expression data.n_bins (
int
, optional, default:50
) – Number of bins on expression levels for grouping genes.
- Returns
A 2D numpy array of shape
(n_cells, n_features)
, which represents the standardized z-score expression matrix.- Return type
numpy.array
Examples
>>> pg.calculate_z_score(data) >>> pg.calculate_z_score(data, n_bins=100)