muon.prot.pp.dsb

Contents

muon.prot.pp.dsb#

muon.prot.pp.dsb(data: AnnData | MuData, data_raw: MuData | AnnData | None = None, pseudocount: Integral = 10, denoise_counts: bool = True, isotype_controls: Iterable[str] | None = None, empty_counts_range: Tuple[Real, Real] | None = None, cell_counts_range: Tuple[Real, Real] | None = None, add_layer: bool = False, random_state: int | RandomState | None = None) None | 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).