# Significant gene set testing - limma

While I have used my title, it is more of a general statistics question regarding how these significance tests are carried out, these include decideTests and mroast / roast among others.

To give a brief overview of my experimental design, I am analysing bulk RNASeq datasets and there are two main factors in the design matrix: patientID and casetimeViremia; where the latter identifies whether a patient is viremia positive or negative at a particular time point (1-4). This leaves us with 5 different possibilities for casetimeViremia: 1-min, 2-plus, 3-min, 3-plus, 4-min.

The design matrix was created in R by running:

model.matrix(~patientID + casetimeViremia, data = dgeObject\$samples)

Where dgeObject is an object of the function DGEList.

For the purpose of answering this biological question, we wish to conduct the differential expression testing by seeing whether all the previously mentioned casetimeViremia timepoints are separately and significantly expressed relative to each person's first timepoint, which is labelled as: 1-min.

Now, I understood that should I wish to conduct this test, I do not need to specify a contrast matrix in the mroast function and can just do this by calling the column number of interest.. But in that case, how does mroast know that I wish to do the contrast relative to the 1-min timepoint? And, just wondering, should I wish to define a contrast matrix, how would I do this given that there are two colnames missing from the design, in this case one patientID and the 1-min timepoint?

Thank you all for your time.

The mroast function has an argument to specify which contrast do you want to test, quoting from the help page:

contrast
contrast for which the test is required. Can be an integer specifying a column of design, or the name of a column of design, or a numeric contrast vector of length equal to the number of columns of design.

So if you have the contrast of 1-min timepoint positive vs 1-min timepoint negative you can use this.
Read the help pages in detail, specially the help pages in limma are quite extensive and detailed to answer most questions if not all about how to use the software.

• thanks for your response! I have read the help pages and they were of no help in understanding this process. I even tried looking at the source code for the function but it was not available. – h3ab74 Mar 29 at 16:47
• what exactly do you mean by "if you have the contrast of 1-min timepoint positive vs 1-min timepoint negative you can use this."? I understand that I can call the column 2-plus however, how does just calling on this column within the function specify that the contrast must be done relative to the 1-min timepoint? – h3ab74 Mar 29 at 16:49
• A contrast is a comparison if you use a colum of the design you can compare 1-min timepoint vs the others but I assume that this is not what you want. It would be helpful if you posted your design matrix and your question (and your differential analysis ) – llrs Mar 29 at 23:10
• So are you saying that should I call on any of the other columns in the design, it would default the contrast to {thatTimepoint - 1-min} ? This is in fact what I want, I just want to understand the mechanism behind it. And, hypothetically speaking, how I could run other contrasts should I wish to in the future. Also, good point, I will upload part of the design matrix in a few hours to give a better idea. Thanks again. – h3ab74 Mar 30 at 18:19
• If you want to understand the mechanism look the code. I didn't mention the default of the contrast, and in fact it is the last column of the design matrix – llrs Mar 31 at 15:00