Introduction¶
As the tutorial mentioned, scaling data is a prerequisite step for dimensionality reduction like Principal Component Analysis (PCA), where data per gene across cells is centered and standardized.
This method ensures that all genes are given equal weight and are placed on the same scale (z-scores), allowing for accurate downstream comparisons.
Methods¶
The scaled-row value () is calculated for each gene and cell . The data is scaled vertically by gene across all cells, using values from the normalized matrix (log-normalize matrix in the case of the tutorial).
First, the mean value of each gene () is computed as the average of log-normalized values across all cells for gene , where is the total number of cells. From that, standard deviation is calculated for each gene. The normalized values are standardized using the mean and the standard deviation of each gene and clipped at a maximum threshold (), which defaults to 10, controlled by the scale.max argument.
Summary¶
While Normalization minimizes technical noise to enable accurate cell-to-cell comparisons, scaling standardizes the data to allow for direct comparisons across different genes. See ScaleData.R for more details.