NSP#
missionbio.demultiplex.protein.nsp.NSP
- class NSP(jitter: float = 0.5, random_state: Optional[int] = None, sample_size: float = 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[, jitter])Identifies the appropriate scaling factor for oversequenced runs.
plot
()Plot the signal and background
- param jitter:
float 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
- param random_state:
int The random state to use for the NSP and asinh methods.
- param sample_size:
int The number of cells to use to estimate the signal and background linear models. All cells are used when set to np.inf.