NSP#

missionbio.mosaic.algorithms.nsp.NSP

class NSP(jitter: float = 0.5, random_state: Optional[int] = None, sample_size: int = inf)#

Noise corrected and Scaled Protein counts (NSP)

This is a novel normalization method for Tapestri protein data. It is based on the assumption that the background and signal are linearly dependent on the total read counts. The method fits a linear model to the background and signal and then corrects the read counts for the linear dependence.

Functions#

transform(reads[, scale])

Normalize read counts.

scaling_factor(reads)

Identifies the appropriate scaling factor for oversequenced runs.

plot()

Plot the signal and background

Parameters:
jitterfloat

The standard deviation of the jitter to be added to the read counts before applying the normalization. The jitter is sampled from a normal distribution cenetered at 0. This is only applicable for NSP and asinh

random_state: int

The random state to use for the NSP and asinh methods.

sample_sizeint

The number of cells to use to estimate the signal and background linear models. All cells are used when set to np.inf.