I am confused about what is a "sample" and what is a "variable" in a k-means model. Let's take a gene expression dataset which includes measurements from 1000 genes for 100 patients. When we are clustering the patients to 10 groups based on their gene expression, it is usually presented that the patients are the "samples" or the "data points" and genes are the "variables" or "features". Then vice versa, if we are clustering the genes to 10 groups based on their expression in those 100 patients, are the genes now the "samples" or are they still "variables"?
In case you wonder why I am concerned about those definitions, I am trying to compute the BIC (Bayesian Information Criterion) for different number of clusters for each of those 2 clustering tasks, and I am confused about what should be $n$ and $k$ in the BIC formula (https://en.wikipedia.org/wiki/Bayesian_information_criterion) for each of those 2 tasks.