Is this approach of PCA correct?

My project is based in a clinical trial in which we measured in gene expression in three groups (OO, NUTS, LFD). The individuals (n = 151) are almost equally distributed and the variables to measure are at baseline and 12 months after the intervention

I am not an expert but I have read about PCA. The idea of using PCA is to observe clusters according to the upregulation or downregulation of these genes. Until now I have done PCA in just the genes, expressed in a numeric and continuous variable, and scaled.

The way I modelled the PCA is in a matrix in which I have columns (= variables = genes), categorical variable in the 1st column and in the rownames I have the individuals.

1. I am not sure if I am overthinking and if I had to exchange the order of columns and rows? Putting the genes in the rows and make the individuals go to the columns? If I understand correctly, the eigenvalues are calculated across columns, and the are depcited there, so the initial approach is the one I considered correct
2. Besides that, I plan to explore the contribution splitting across the categorical variable (groups) to observe if the contribution of variables change among the 3 groups. Does this make sense? I have used this approach to the contribution, has anybody used this or something different in this context?
fviz_pca_var(res.PCA, col.var = "cos2",
repel = TRUE # Avoid text overlapping
)


This is my database


group      ppara  ppard  pparg  nr1h3  nr1h2   rxra   rxrb
50109018      LFD  1.9100000  0.654  1.137  0.631 -0.217  0.486 -0.020
50109019      LFD  0.0960000 -0.123 -0.027  0.282  0.547  0.101 -0.347
50109025      LFD -0.3190000  0.157  0.215 -0.131 -0.476 -0.091  0.716
50109026     NUTS  0.2755359  0.177  0.177  0.167 -0.794 -0.061  0.386
50109027      LFD -0.6283524 -0.390 -0.761 -1.076 -0.880 -0.263  0.299
50118001       OO  0.5441151  0.864  0.454  0.577  0.336  0.306  0.507



1 )Clustering all 3 groups at once and 2) genes per group

1. If I write $$\rm{X}$$ the matrix of the 7 last numerical columns, then a PCA should find the eigenvalues and eigenvectors of $$\rm{X}^TX$$, a 7x7 square matrix corresponding to your 7D parameter space. Whether that or the converse computation on the transposed matrix happens depends on the software you're using, but anyway you'll see very quickly how many eigenvalues you get, either 7 or your number of rows...