pegasus.log1p

pegasus.log1p(data, base_matrix=None, target_matrix=None, select=True)[source]

Apply the Log(1+x) transformation on the given count matrix.

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

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

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

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

Return type

None

Returns

  • None

  • Add the log1p matrix to data.matrices.

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

Examples

>>> pg.log1p(data)