muon.prot.pp.dsb#

muon.prot.pp.dsb(data: Union[anndata._core.anndata.AnnData, mudata._core.mudata.MuData], data_raw: Optional[Union[mudata._core.mudata.MuData, anndata._core.anndata.AnnData]] = None, pseudocount: numbers.Integral = 10, denoise_counts: bool = True, isotype_controls: Optional[Iterable[str]] = None, empty_counts_range: Optional[Tuple[numbers.Real, numbers.Real]] = None, cell_counts_range: Optional[Tuple[numbers.Real, numbers.Real]] = None, add_layer: bool = False, random_state: Optional[Union[int, numpy.random.mtrand.RandomState]] = None) Union[None, mudata._core.mudata.MuData]#

Normalize protein expression with DSB (Denoised and Scaled by Background)

Normalized data will be written to data (if it is an AnnData object) or data.mod['prot'] (if it is a MuData object) as an X matrix or as a new layer named dsb.

References

Mulè et al, 2020 (doi:10.1101/2020.02.24.963603)

Parameters
  • data – AnnData object with protein expression counts or MuData object with prot modality. If data_raw is None, must be a MuData object containing raw (unfiltered, including empty droplets) data for both prot and rna modalities. If data_raw is not None, must contain filtered (non-empty droplets) data.

  • data_raw – AnnData object with protein expression counts or MuData object with ‘prot’ modality containing raw (unfiltered, including empty droplets) data.

  • pseudocount – Pseudocount to add before log-transform.

  • denoise_counts – Whether to perform denoising.

  • isotype_controls – Names of the isotype controls. If None, isotype controls will not be used.

  • empty_counts_range – If data_raw is None, i.e. data contains the unfiltered data, this specifies the minimum and maximum log10-counts for a droplet to be considered empty.

  • cell_counts_range – If data_raw is None, i.e. data contains the unfiltered data, this specifies the minimum and maximum log10-counts for a droplet to be considered not empty.

  • add_layer – Whether to add a 'dsb' layer instead of assigning to the X matrix.

  • random_state – Random seed.

Returns

None if data_raw is not None (in this case the normalized data are written directly to data), otherwise a MuData object containing filtered data (non-empty droplets).