0

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:

enter image description here

only color by species or sample.

zx8754
  • 52,746
  • 12
  • 114
  • 209
mmgit
  • 1
  • 1
  • Hi, what code have you tried? Can you provide a reproducible example? https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – william3031 Mar 17 '23 at 00:34

0 Answers0