pegasus.log_norm

pegasus.log_norm(data, norm_count=100000.0, base_matrix=None, target_matrix=None, select=True)[source]

Normalize each cell by total counts, and then apply natural logarithm to the data.

Parameters
  • data (pegasusio.MultimodalData) – Use current selected modality in data, which should contain one RNA expression matrix.

  • norm_count (int, optional, default: 1e5.) – Total counts of one cell after normalization.

  • base_matrix (str, optional, default: None.) – The key name of the matrix to perform log_norm. If None, the current matrix.

  • target_matrix (str, optional, default: None.) – The key name of the matrix to store the log_normed results. If None, base_matrix + “.log_norm”.

  • select (bool, optional, default: None.) – Select the log_normed matrix as the current matrix (can be accessed via data.X).

Return type

None

Returns

  • None

  • Add the log-normalized matrix to data.matrices. Add the normalization scale vector to data.obs["scale"] and norm_count parameter to data.uns["norm_count"].

  • Note that if the detected base_matrix`==`X, we’ll change the name to counts instead.

Examples

>>> pg.log_norm(data)