Dear professor Gordon Smyth, thank you very much for your answer. I would like to use this opportunity to express my gratitude for all your efforts and scientific contributions in this field, we are so grateful for all of your efforts!
Regarding my question, perhaps I haven't formulated it correctly or clear enough. My question is about extracting NOT only the number of differentially expressed genes, but actually the results of differnential expression. I mean the log fold change of each gene, with the p adjusted value etc per contrast. So, the code you suggsetd, would give me the following in my case:
dt <- decideTests(fit3, method="global")
summary(dt)
contrast 1 contrast 2 contrast 3 contrast 4 contrast 5
Down 72 72 52 110 53
NotSig 84 104 115 142 227
Up 201 181 190 105 77
However, what I get using the toptable function as I wrote in the question would be similar to this(using one contrast as an example):
dpe_craids<-topTable(fit3, coef="CRAIDSvsNoCOM",number = nrow(fit3))
head(dpe_craids)
hgnc_name logFC AveExpr t P.Value adj.P.Val B
WFDC2 0.7802672 10.179460 23.46939 7.709328e-107 2.752230e-104 232.9594
TNFRSF19 1.2463862 5.994430 22.54186 1.278411e-99 2.281963e-97 216.3990
TGFBR2 0.8634129 7.544950 22.24706 2.327319e-97 2.769509e-95 211.2150
TNFRSF10B 1.0812091 7.285260 21.80680 5.132057e-94 4.580361e-92 203.5468
TNFRSF11A 1.1757852 6.955970 20.93647 1.595200e-87 1.138973e-85 188.6576
EPHA2 0.7546227 4.609625 20.30856 6.105032e-83 3.632494e-81 178.1491
And this is what I am looking for per contrast instead of the write.fit function which gives me NO log fold changes. It does give me the following colnames p-values,p.adjusted, t statistics and coef values per contrast, and column named A,F, F.p.value, in the same file.
Am I missing something here? Perhaps the idea of usinng decidetests is that I should use the adjusted p values from decidetests when method =global, but the log fold change should be obtained by the toptable function?
I have exactly the same problem! I just want to get the genes from the decideTest using method=global!!
I've got it! https://bioconductor.org/packages/devel/workflows/vignettes/RNAseq123/inst/doc/limmaWorkflow.html
here's the answer The top DE genes can be listed using topTreat for results using treat (or topTable for results using eBayes). By default topTreat arranges genes from smallest to largest adjusted p-value with associated gene information, log-FC, average log-CPM, moderated t-statistic, raw and adjusted p-value for each gene. The number of top genes displayed can be specified, where n=Inf includes all genes. Genes Cldn7 and Rasef are amongst the top DE genes for both basal versus LP and basal versus ML.