Scales the intensities of all features using
$$\widetilde{x}_{ij}=\frac{x_{ij}-\overline{x}_{i}}{s_i}\cdot \frac{\overline{x}_{i}}{s_i}$$
where \(\widetilde{x}_{ij}\) is the intensity of sample \(j\), feature \(i\) after scaling,
\(x_{ij}\) is the intensity of sample \(j\), feature \(i\) before scaling, \(\overline{x}_{i}\) is the mean of intensities of feature \(i\) across all samples
and \({s_i}\) is the standard deviation of intensities of feature \(i\) across all samples. Note that \(\frac{\overline{x}_{i}}{s_i} = \frac{{1}}{CV}\) where CV is the coefficient of variation across all samples.
scale_vast_grouped is a variation of this function that uses a group-specific coefficient of variation.
In other words, it performs autoscaling (scale_auto) and divides by the coefficient of variation, thereby reducing the importance of features with a poor reproducibility.
scale_vast(data)A tibble with vast scaled intensities.
A tidy tibble created by read_featuretable.
R. A. Van Den Berg, H. C. Hoefsloot, J. A. Westerhuis, A. K. Smilde, M. J. Van Der Werf, BMC Genomics 2006, 7, 142, DOI 10.1186/1471-2164-7-142.
J. Sun, Y. Xia, Genes & Diseases 2024, 11, 100979, DOI 10.1016/j.gendis.2023.04.018.
toy_metaboscape %>%
scale_vast()
Run the code above in your browser using DataLab