I have a csv file with TpM values in this format:
Gene | sample1 |
---|---|
FUN_016238-T1 | 6.8690496 |
FUN_003161-T1 | 1.3314202 |
And on with many genes and 28 samples.
I have been able to do prcomp on this data following normalization
pca_master_norm <- log2(pca_master[,2:29] + 1))
However, I cannot seem to color my PCA plot by sample nor, when I add some columns at the beginning indicating species/experiment/etc., I cannot color by those either. Is there a simple way to do this?
My goal is to get something like this - example pca:
only color by species or sample.