dynamo.pp.lambda_correction

dynamo.pp.lambda_correction(adata, lambda_key='lambda', inplace=True, copy=False)[source]

Use lambda (cell-wise detection rate) to estimate the labelled RNA.

Parameters:
  • adata (AnnData) – An adata object generated from dynast.

  • lambda_key (str) – The key to the cell-wise detection rate. Defaults to “lambda”.

  • inplace (bool) – Whether to inplace update the layers. If False, new layers that append ‘_corrected” to the existing will be used to store the updated data. Defaults to True.

  • copy (bool) – Whether to copy the adata object or update adata object inplace. Defaults to False.

Raises:
  • ValueError – The lambda_key cannot be found in adata.obs.

  • ValueError – The adata object has to include labeling layers.

  • ValueErrordata_type is set to ‘splicing_labeling’ but the existing layers in the adata object don’t meet the requirements.

  • ValueErrordata_type is set to ‘labeling’ but the existing layers in the adata object don’t meet the requirements.

Return type:

Optional[AnnData]

Returns:

A new AnnData object that are updated with lambda corrected layers if copy is true. Otherwise, return None.