Suppose I want to cluster genes from the Golub
dataset according to their expression profile. Note that I want to specifically cluster genes, and not patients.
It's advisable to do scaling before clustering if distance metric is the euclidian distance. In this case I'd do something like:
data(golub, package = "multtest")
golub_df <- data.frame(golub)
colnames(golub_df) <- factor(golub.cl, levels = c(0, 1), labels = c("ALL","AML"))
golub_scaled <- scale(golub_df)
colMeans(golub_scaled)
The last command outputs values near 0 for each column, which are patients. Is this correct, or should the mean for each gene across the patients be 0(i.e. rowMeans(golub_rescaled)
give zeros)?
Thanks in advance!