Normalizes raw counts from counts slot in TapestriExperiment and returns the object with normalized counts in the normcounts slot.
Also calculates the standard deviation for each probe using normalized counts and adds it to rowData.
Arguments
- TapestriExperiment
TapestriExperimentobject.- method
Character, normalization method. Default "mb".
- scaling.factor
Numeric, optional number to scale normalized counts if
method == "libNorm". DefaultNULL.
Details
"mb" method performs the same normalization scheme as in Mission Bio's mosaic package for python:
Counts for each barcode are normalized relative to their barcode's mean and probe counts are normalized relative to their probe's median.
"libNorm" method preforms library size normalization, returning the proportion of counts of each probe within a cell.
The proportion is multiplied by scaling.factor if provided.
Examples
tap.object <- newTapestriExperimentExample() # example TapestriExperiment object
#> ℹ Moving gRNA probe to `altExp` slot "grnaCounts".
#> ℹ Moving barcode probe to `altExp` slot "barcodeCounts".
#> ℹ Moving chrY probe(s) probe_231, probe_232, probe_233, probe_234, probe_235, probe_236, probe_237, probe_238, probe_239, and probe_240 to `altExp` slot "chrYCounts".
tap.object <- calcNormCounts(tap.object)
