NSP.scaling_factor

NSP.scaling_factor#

missionbio.demultiplex.protein.nsp.NSP.scaling_factor

NSP.scaling_factor(reads: ndarray, jitter: float = 0.5) Tuple[float, list]#

Identifies the appropriate scaling factor for oversequenced runs.

Parameters:
  • reads – np.ndarray The protein read counts to be normalized. The shape should be (#cells, #antibodies)

  • jitter – float The jitter value passed to NSP.arcsinh. 0.5 is the default instead of self.jitter since small values of jitter can result in formation of peaks for small read count values like 0, 1, 2, 3… jitter=0.5 ensures that the gap between 0 and 1 is covered by sufficient random noise to avoid calling small value peaks as the scaling factor.

Returns:

float

The factor to scale down the reads by.

list

The indices of the antibodies in which the peak amplification was observed at the identified scaling factor.


< Class NSP