Hello all,

I have a problem in incorporating the output of sva into limma analysis. Specifically it is my newness to matrix design thats causing the problem.

I'd like to do a simple DE analysis between two states: DIS and TE. The surrogate variables (4 of them found by sva can be seen here in my modSv file:

```
> modSv
(Intercept) DIS TE
1 1 0 0 0.170511776 -0.026039142 0.1551621788
2 1 0 0 -0.031146292 0.231081859 -0.1192856157
3 1 0 0 0.304738317 -0.114059097 0.0561335693
...
1 -0.052378086
2 0.020441932
3 -0.008361104
...
```

Now the sva manual gives an example of how to incorporate modSv into the process of making a contrast matrix, but I am not sure if their example:

```
> contrast.matrix <- cbind("C1"=c(-1,1,0,rep(0,svobj$n.sv)),"C2"=c(0,-1,1,rep(0,svobj$n.sv)
> fitContrasts = contrasts.fit(fit,contrast.matrix)
```

Is designing the same sort of matrix I would need. In this matrix of theirs the surrogate variables are not being used in the contrast, as they are just used to adjust the analysis, the "rep(0,svobj$n.sv)" is basically just saying "place the same number of 0s as their are surrogate variables as recorded in the file svobj.

My question is this: What would be the appropriate way of designing a matrix for my comparison of DIS to TE ignoring surrogate variables? Would it actually be very similar to their example?

I'd appreciate any help you can offer!

Can you show all of your code, please? If you do not even want to use the output of SVA, then just ignore modSv altogether - why did you choose to use SVA in the first place? Is there an assumed batch effect?

Take a look at Gordon's related answer on Bioconductor: https://support.bioconductor.org/p/100278/#100295