normalizeGiotto#
Last Updated: Jan 14, 2025
Description#
fast normalize and/or scale expresion values of Giotto object
Usage#
normalizeGiotto(
gobject,
spat_unit = NULL,
feat_type = NULL,
expression_values = "raw",
norm_methods = c("standard", "pearson_resid", "osmFISH"),
library_size_norm = TRUE,
scalefactor = 6000,
log_norm = TRUE,
log_offset = 1,
logbase = 2,
scale_feats = TRUE,
scale_genes = NULL,
scale_cells = TRUE,
scale_order = c("first_feats", "first_cells"),
theta = 100,
update_slot = "scaled",
verbose = TRUE
)
Arguments#
|
giotto object |
|
spatial unit |
|
feature type |
|
expression values to use |
|
normalization method to use |
|
normalize cells by library size |
|
scale factor to use after library size normalization |
|
transform values to log-scale |
|
offset value to add to expression matrix, default = 1 |
|
log base to use to log normalize expression values |
|
z-score genes over all cells |
|
deprecated, use scale_feats |
|
z-score cells over all genes |
|
order to scale feats and cells |
|
theta parameter for the pearson residual normalization step |
|
slot or name to use for the results from osmFISH and pearson residual normalization |
|
be verbose |
Details#
Currently there are two ‘methods’ to normalize your raw counts data.
1. Data normalization for total library size and scaling by a custom scale-factor.
Log transformation of data.
Z-scoring of data by genes and/or cells.
1. First normalize genes, for each gene divide the counts by the total gene count and multiply by the total number of genes.
2. Next normalize cells, for each cell divide the normalized gene counts by the total counts per cell and multiply by the total number of cells.
First calculate expected values based on Pearson correlations.
Next calculate z-scores based on observed and expected values.
By default the latter two results will be saved in the Giotto slot for scaled expression, this can be changed by changing the update_slot parameters
Value#
giotto object