stream2.pp.normalize

stream2.pp.normalize(adata, method='lib_size', scale_factor=10000.0, save_raw=True)[source]

Normalize count matrix.

Parameters:
  • adata (AnnData) – Annotated data matrix.

  • method (str, optional (default: ‘lib_size’)) –

    Choose from {{‘lib_size’,’tf_idf’}}. Method used for dimension reduction.

    ’lib_size’: Total-count normalize (library-size correct).

    ’tf_idf’: TF-IDF (term frequency–inverse document frequency)

    transformation.

Returns:

  • updates adata with the following fields.

  • X (numpy.ndarray (adata.X)) – Store #observations × #var_genes normalized data matrix.