I ran SVA to get surrogate variables. I want to visualise my data taking into consideration the surrogate variables. I came to know tha modifying the original expression matrix is not a good idea (Remove Surrogate Variables and Batch). How can I go about doing this?
Take a look at this biostars post. I have already provided a code snippet and some explanation of how to proceed and what features of the SVs should be taken into account.
Hint: You find SVs and make a new expression matrix with information of SVs as a corrected one and then visualize it with a PCA plot. If you want to use SVs in your model matrix for DE testing then you have to use the initial mod and a new model to incorporate the confounders in your new model. However, test the SVs well as to not overfit.