Common function for PCA-using parts of the app
Arguments
- matrix
Matrix (not logged)
- do_log
Boolean- apply log transform to input matrix?
- scale_features
Boolean, passed to
prcomp()'sscale.argument to scale each feature to unit variance before running the PCA. Defaults toFALSE, matchingDESeq2::plotPCA()'s convention for variance-stabilised input: VST/rlog transforms already equalise per-feature variance, so further scaling mostly up-weights noisy, near-constant features rather than revealing structure. Set toTRUEfor matrices without a variance-stabilising transform, where features can otherwise dominate the PCA purely by having larger scale. (Unrelated tointeractive_heatmap'sscaleargument, which selects row/column/none display scaling.)
