**0**wrote:

I have made a Contrasts matrix as

design <- model.matrix(~0+f)

colnames(design) <- levels(f)

design

fit <- lmFit(eset,design)

names(fit)

cont.matrix <- makeContrasts(C9T9="Control9-Treated9",C24T24="Control24-Treated24",........................................,levels=design)

cont.matrix

fit2 <- contrasts.fit(fit, cont.matrix)

fit2 <- eBayes(fit2)

colnames(fit2)

topTable(fit2,coef=1)

topTable(fit2,coef="C9T9")

I have total of 8 comparisons and successfully extracted up and down-regulated genes from each comparisons using topTable, beside also identified the total number of up and down-regulated genes from each comparisons using

summary(decideTests(fit2))

but I am facing problem to identify/extract common genes that are DE in each of comparisons. Therefore, It is my kind request to all of you, please provides any suggestions for extracting of common genes that are DE in each of the comparisons.

Thanking you.

Kind regards,

Rajesh

Hi Aaron,

Thank you very much for your reply but I am unable to find genes that are DE in all comparisons. It given the probe id of all the genes present in datasets instead of DEG.

> is.de <- decideTests(fit2, method="global")

> de.in.all <- rowSumsis.de!=0) == ncol is.de)

> length(de.in.all)

[1] 22810

> up.in.all <- rowSumsis.de == 1) == ncol is.de)

> length(up.in.all)

[1] 22810

0Please use the "add comment" button to reply to existing answers, rather than adding a new answer.

`de.in.all`

is a logical vector, so its length will obviously be the same as the number of genes. The relevant bit of information is in which elements are`TRUE`

, i.e.,`which(de.in.all)`

if you want the indices of the relevant genes.17k> is.de <- decideTests(fit2, method="global")

> de.in.all <- rowSumsis.de!=0) == ncolis.de)

> length(de.in.all)

[1] 22810

> up.in.all <- rowSumsis.de == 1) == ncolis.de)

> length(up.in.all)

[1] 22810

0