Hi!
I have RNA-seq data that I have put into DeSeq2 (R) for analysis and I would like to create heatmaps. I have also run my data using the gsea software from the broad institute and I would like to replicate the heatmaps that come out of that in R. I assume that what the software does, is normalise the data using Z score. I have already log2 transformed the data using two methods:
- vst transformation
- a simple equation as seen in a previous post ( tdata <- log2(counts + 1))
There are previous forums on Z score normalisation, but they don't explain how to actually do this in R. Would anyone know the code for performing this normalisation?
Thank you in advance!
There is a base R function for this:
scale()
. Just keep in mind that it scales columns so you may have to feed your transposed matrix (t(matrix)
).thank you!
Hello there,
maybe you can have a look at this site : https://www.r-bloggers.com/2020/02/how-to-compute-the-z-score-with-r/
thank you !