Prepare the data for normalization
Source:R/get_final_ranking_values.R
prepare_data_normalization.Rd
`prepare_data_normalization` checks if the data structure is right and if it has the appropriate slots
Usage
prepare_data_normalization(
sum_exp,
assay_to_use,
stable_genes = NULL,
most_variable_genes = "small",
verbose = 1
)
Arguments
- sum_exp
Summarized experiment object. It should contain a "rank" slot that will be used to calculate the average rank of the stable genes.
- assay_to_use
A string. Which assay to use when calculating the average expression of the stable genes.
- stable_genes
A vector. A list with 44 genes that will be used to the qPCR-like normalization if NULL (default).
- most_variable_genes
A vector. Most variable genes determined by some procedure. Default is "small" and uses an internal list of 1000 genes to calculate the embedding. If using for calculating the regressed data, use the "big" option.
- verbose.
An integer. If verbose equals to 1, then it prints the number of stable genes, total genes in the dataframe and total number of samples
Details
The function check if the object is a summarized experiment object first, so the normalization procedures can be saved later on. It also checks if the assay_to_use is available on the summarized experiment object, without this it cannot proceed with the normalization. Lastly it proceeds to subset the dataframe to only contain the necessary genes to calculate the ranking obtained in the procedure described in the paper.