Hi, I have a question about some of the R syntax present in the DeSeq2 vignette. The following comes directly from the section regarding the removal of batch effects:
mat <- assay(vsd) mm <- model.matrix(~condition, colData(vsd)) mat <- limma::removeBatchEffect(mat, batch=vsd$batch, design=mm) assay(vsd) <- mat plotPCA(vsd)
What does line 4 of this code do? More broadly, it seems like this syntax is "assigning" the object
mat to the function
assay(vsd), and I am having trouble making sense of that. Does this language replace the entire function of
assay() with the limma function listed above?
Unfortunately, neither the vignette nor google seems to have an answer for me so far. Apologies if this is a basic question, and thanks so much for any clarification!