Question: Differential expression analysis using Limma (Not on cel files)
0
5.3 years ago by
Germany
Bioinformatist Newbie250 wrote:

Hi,

Instead of using limma on cel files downloaded from GEO, I now have gene expression data for differential expression of genes under various condition (8 replicates) in txt file in following format:

Gene Name      Condition1    Condition 2 ..... Condition 8

Gene A             11.235          10.4657 ......   9.34567

Gene B             15.324           11.334  ......  16.3245

I was following this tutorial but as it uses cel files as input so I was encountering problem in fitting the linear model on my expression dataset.

Can someone guide me how I can further proceed with limma if I have data in such format?

modified 5.2 years ago • written 5.3 years ago by Bioinformatist Newbie250

are you looking for differential expression between two conditions or relative expression of genes in each condition?

looking for differential expression between two conditions and for each condition I have 4 replicates.

1
5.3 years ago by
geek_y11k
Barcelona
geek_y11k wrote:

Here is Limma tutorial for RNA-Seq or for a count matrix. Chapter 15. Here is a case study.

But what are those numbers in your data ? Already normalised ?

Yes, log2  normalized expression values.

Geek_y you didn't tell me what to do in case my data is already log2 normalized expression values...!!

0
5.2 years ago by
Germany
Bioinformatist Newbie250 wrote:

So, here is the solution:

``````library(simpleaffy)
library(limma)
setwd("path to your working directory where series_matrix_file is located")

minimalSet <- ExpressionSet(assayData=xx)
minimalSet
ex <- exprs(minimalSet)
qx <- as.numeric(quantile(ex, c(0., 0.25, 0.5, 0.75, 0.99, 1.0), na.rm=T))
LogC <- (qx[5] > 100) ||
(qx[6]-qx[1] > 50 && qx[2] > 0) ||
(qx[2] > 0 && qx[2] < 1 && qx[4] > 1 && qx[4] < 2)
if (LogC) { ex[which(ex <= 0)] <- NaN
exprs(minimalSet) <- log2(ex) }
groups<-as.factor(c(rep("Control",3),rep("Treated",3)))
groups
design<-model.matrix(~0+groups)
colnames(design)=levels(groups)
design
fit<-lmFit(minimalSet, design)
cont.matrix<-makeContrasts(Treated-Control, levels=design)
fit2<-contrasts.fit(fit, cont.matrix)
ebfit<-eBayes(fit2)
topTable(ebfit, coef=1)
nrow(topTable(ebfit, coef=1, number=25000, lfc=1))