Question: R script for getting Common DEG genes from all comparisons by limma analysis
0
gravatar for rkp
2.9 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 • 487 views
ADD COMMENTlink modified 2.9 years ago by Gordon Smyth39k • written 2.9 years ago by rkp0
Answer: R script for getting Common DEG genes from all comparisons by limma analysis
0
gravatar for Gordon Smyth
2.9 years ago by
Gordon Smyth39k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth39k 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.9 years ago by Gordon Smyth39k

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

 

ADD REPLYlink written 2.9 years ago by rkp0

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].

ADD REPLYlink modified 2.9 years ago • written 2.9 years ago by Aaron Lun25k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 352 users visited in the last hour