I have questions about the pvalues in the result from glmQLFTest.
For example, I have 4 treatments A, B, C, D, each has 3 replicates, and I want to compare any treatment pairs, i.e.: A-B, A-C, A-D, B-C, B-D, C-D. I use a matrix, generated by "makeContrasts" to define all the contrasts, then use "glmQLFTest" to test all the comparisons. In the resulting table, does the "PValue" refers to all the comparisons "logFC.A.B", "logFC.A.C", ..., "logFC.C.D" together as a whole? Or a specific comparison?
PValue refers to all the contrasts as a whole. If you want to get separate p-values for each contrast separately, then run glmQLFTest separately for each column of the contrast matrix.
the first line of output will say LR test on 3 degrees of freedom, which is intended to alert you that the test is for all differences between the four treatments. You will also see multiple logFC columsn in the topTags table, one for each column of the contrast matrix, which again alerts you that the test is for multiple contrasts.
If on the other hand you test a single contrast, then the first line of output will tell you which contrast is being tested and there will be single logFC column in the topTags table.
If I only interested in 2 comparisons like A-C, A-D, one option is to use glmQLFTest to test all the 6 pairs, then extract A-C, A-D from the resulting table. Another option is to use glmQLFTest only test A-C, A-D. Which option is better?
I see. If I only test A-C, A-D using glmQLFTest, should I fit only A, C, D in glmQLFit, or fit all A-D then specify the coef as A-C, A-D in glmQLFTest?
If I only interested in 2 comparisons like A-C, A-D, one option is to use glmQLFTest to test all the 6 pairs, then extract A-C, A-D from the resulting table. Another option is to use glmQLFTest only test A-C, A-D. Which option is better?
Regards,
There is only one option. You need to test the comparisons you are actually interested in.
Now I understand. In the resulting table, can I filter out the genes by FDR and logFC at the same time? Or only by one of the two?
Filtering by logFC is strongly discouraged, because it tends to select low count genes with high variability.
I see. If I only test A-C, A-D using glmQLFTest, should I fit only A, C, D in glmQLFit, or fit all A-D then specify the coef as A-C, A-D in glmQLFTest?
I got the answer from another post. It seems the replies cannot be deleted, so it is still here.