I was trying to figure out how to perform Spearman rank test between expression value of a gene and a continuous outcome in DESeq2.
One way I did was to extract the normalized count from counts(dds, normalized=TRUE), and then run cor.test in R.
Alternatively, I put the continuous variable in the DESeq2 design formula and ran DESeq(dds). I could get the p and adjust p from the results.
It seems the latter approach could take advantage of the shrinkage estimator in DESeq2, and generate more significant genes. However, is there a way to get the Spearman correlation coefficient and p value from the DESeq2 output? Thanks!
Thanks so much, Michael! Good to know that.