how to analyse a matrix of genes vs samples with limma
1
0
Entering edit mode
@federico-abascal-2006
Last seen 10.2 years ago
Estimated colleagues, It is probably a simple question, but I am new to limma and I don't find the answer. I have a matrix with columns corresponding to different experiments or samples, and rows corresponding to genes. In a separate vector of factors I have a label indicating to which class each sample belongs to (it could be mutant or WT, for instance). I read that, in order to load data with limma, you have to create a design matrix in which a filename for each experiment (or sample) is given... but I have all the experiments in the same matrix, not in separate files. So, my (simple) question is: is there a way to go from my matrix to limma? Thank you very much, Federico
GO limma GO limma • 820 views
ADD COMMENT
0
Entering edit mode
Ido M. Tamir ▴ 320
@ido-m-tamir-1268
Last seen 10.2 years ago
On Thursday 13 December 2007 09:38:02 Federico Abascal wrote: > Estimated colleagues, > I have a matrix with columns corresponding to different experiments or > samples, and rows corresponding to genes. In a separate vector of > factors I have a label indicating to which class each sample belongs to > (it could be mutant or WT, for instance). I read that, in order to load > data with limma, you have to create a design matrix in which a filename > for each experiment (or sample) is given... but I have all the > experiments in the same matrix, not in separate files. So, my (simple) > question is: is there a way to go from my matrix to limma? lmFit can deal with a matrix of background corrected normalized M values. An example is given in the examples. The difficult part is constructing the design matrix correctly, and this only needs the column names. # Simulate gene expression data for 100 probes and 6 microarrays # Microarray are in two groups # First two probes are differentially expressed in second group # Std deviations vary between genes with prior df=4 sd <- 0.3*sqrt(4/rchisq(100,df=4)) y <- matrix(rnorm(100*6,sd=sd),100,6) rownames(y) <- paste("Gene",1:100) y[1:2,4:6] <- y[1:2,4:6] + 2 design <- cbind(Grp1=1,Grp2vs1=c(0,0,0,1,1,1)) options(digit=3) fit <- lmFit(y,design) fit <- eBayes(fit) fit as.data.frame(fit[1:10,2]) etc... best wishes, ido
ADD COMMENT

Login before adding your answer.

Traffic: 541 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6