3.1 years ago by

Greece/Athens/National Hellenic Research Foundation

Dear Babumanish837,

what do you mean that you know to use t.test for two features ?

lets say you have the two groups you mentioned.

**e <- exprs(eset)** # your expression set

**test <- do.call("rbind", lapply(rownames(e), function(x) t.test(e[x,Index2], e[x,Index1])[c("estimate","statistic","p.value")]))** # where Index2 and Index1 represent the indices-columns of the samples belonging to your group (and optional paired=TRUE if you want paired analysis). And this will return for each probeset the according statistics.

**But anyway**, you should perform limma analysis. You can use then **topTable **to get your **DE probesets according to your criteria**, and as topTable returns a data.frame, you could order and subset your results:

i.e. **study <- factor(rep(c("A","B"),each=6))** # lets say your factor indicating your groups is called study

**design <- model.matrix(~study)**

**fit <- lmFit(eset, design)**

**fit2 <- eBayes(fit)**

**selected <- topTable(fit2, coef=2, number=nrow(fit2), adjust.method="fdr", sort.by="none")**

and then subset by any values you want: for example, **selected_2 <- subset(selected, select=c(t,logFC,adjusted.P.Val))**

and finally order for instanse by the moderated t.statistic :

**ordered <- selected_2[order(abs(subset$t), decreasing=TRUE),][1:200,] **# to keep the top200 probesets with the biggest moderated t.statistic

I hope this helps !!