Limma creating model.matrix
1
0
Entering edit mode
viritha kaza ▴ 580
@viritha-kaza-4318
Last seen 9.6 years ago
Hi group, I have a patient dataset of 6 control and 11 disease. so the code that I have written is: >library(affy) >library(limma) >eset<-as.matrix(read.table("GSEXXXX_series_matrix.txt",header = TRUE,sep = "\t", row.names = 1, as.is = TRUE) > design <- model.matrix(~-1 + factor(c(1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2))) > fit<-lmFit(eset,design) >colnames(design) <- c("CTR","DIS") >cont.matrix<-makeContrasts(DISvsCTR=DIS-CTR,levels=design) >fit<-contrasts.fit(fit,cont.matrix) # here I am getting the warning message: #In contrasts.fit(fit, cont.matrix) : row names of contrasts don't match col names of coefficients. I guess this is because in my eset has 1st column row names. How do I accomodate that? Thanks, Viritha [[alternative HTML version deleted]]
• 3.1k views
ADD COMMENT
0
Entering edit mode
viritha kaza ▴ 580
@viritha-kaza-4318
Last seen 9.6 years ago
Hi group, I just got to know the error. I am giving the colnames(design) after lmFit(eset,design). If I interchange this.It works fine. Thanks, Viritha On Thu, Apr 14, 2011 at 2:01 PM, viritha kaza <viritha.k@gmail.com> wrote: > Hi group, > I have a patient dataset of 6 control and 11 disease. > so the code that I have written is: > > >library(affy) > >library(limma) > >eset<-as.matrix(read.table("GSEXXXX_series_matrix.txt",header = TRUE,sep = > "\t", row.names = 1, as.is = TRUE) > > design <- model.matrix(~-1 + > factor(c(1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2))) > > fit<-lmFit(eset,design) > >colnames(design) <- c("CTR","DIS") > >cont.matrix<-makeContrasts(DISvsCTR=DIS-CTR,levels=design) > >fit<-contrasts.fit(fit,cont.matrix) > > # here I am getting the warning message: > #In contrasts.fit(fit, cont.matrix) : row names of contrasts don't match > col names of coefficients. > > I guess this is because in my eset has 1st column row names. > How do I accomodate that? > Thanks, > Viritha > > > [[alternative HTML version deleted]]
ADD COMMENT

Login before adding your answer.

Traffic: 493 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