Question: R script for getting Common DEG genes from all comparisons by limma analysis
0
2.6 years ago by
rkp0
rkp0 wrote:

Dear All,

I want to find the probe id of Common genes that are differentially expressed between all the comparisons by limma analysis. Any suggestions will be greatly appreciated.

With kind regards,

Rajesh

microarray limma R bioconductor • 455 views
modified 2.6 years ago by Gordon Smyth38k • written 2.6 years ago by rkp0
Answer: R script for getting Common DEG genes from all comparisons by limma analysis
0
2.6 years ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

I assume you have already run something like this:

fit2 <- contrasts.fit(fit, contrast.matrix)
fit2 <- eBayes(fit2)

To find the genes that are DE for all contrasts:

results <- decideTests(fit2)
i <- rowSums(results != 0) == ncol(fit2)
fit2$genes[i,] ADD COMMENTlink written 2.6 years ago by Gordon Smyth38k Dear Gordon, Thank you very much for providing script but I have not found DEG for all contrast. It is showing NULL > results <- decideTests(fit2) > i <- rowSums(results != 0) == ncol(fit2) > fit2$genes[i,]
NULL

Presumably you haven't assigned anything to fit2\$genes. In a routine analysis, this should be a data frame containing annotation information for each row, e.g., probe IDs, gene symbols. See, for example, Section 4.8 of the limma user's guide. Otherwise, you could just use i to subset a vector of probe IDs corresponding to each row of fit2. For example, if you had previously defined the row names to be the probe IDs, then you could do rownames(fit2)[i].