muon.prot.pp.dsb
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) ordata.mod['prot']
(if it is a MuData object) as an X matrix or as a new layer nameddsb
.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. Ifdata_raw
isNone
, must be aMuData
object containing raw (unfiltered, including empty droplets) data for bothprot
andrna
modalities. Ifdata_raw
is notNone
, 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
isNone
, 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
isNone
, 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
ifdata_raw
is notNone
(in this case the normalized data are written directly todata
), otherwise aMuData
object containing filtered data (non-empty droplets).