Limma error message
2
0
Entering edit mode
@richard-friedman-513
Last seen 10.3 years ago
Dear Bioconductor List, I am using limma to fit a linear model with what I believe is called a disconnected design: > data <- ReadAffy() > eset<-rma(data) > design<-model.matrix(~ -1+factor(c(1,1,1,2,2,2,3,3,3,4,4,4))) > colnames(design) <- c("1A_L5V4_No_Pon_A","1C_L5V4_Pon_A_DHT_24hrs","2A_L5S2_No_Pon_A","2C_ L5 S2_Pon_A_DHT_24hrs") > fit<-lmFit(eset,design) > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs -2A_L5S2_No_Pon_A -1C_L5V4_Pon_A_DHT_24hrs +1A_L5V4_No_Pon_A,levels=design) I get the error message: Error: syntax error in " contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs" I would greatly appreciate any suggestions. Thanks and best wishes, Rich ------------------------------------------------------------ Richard A. Friedman, PhD Associate Research Scientist Herbert Irving Comprehensive Cancer Center Oncoinformatics Core Lecturer Department of Biomedical Informatics Box 95, Room 130BB or P&S 1-420C Columbia University Medical Center 630 W. 168th St. New York, NY 10032 (212)305-6901 (5-6901) (voice) friedman at cancercenter.columbia.edu http://cancercenter.columbia.edu/~friedman/ In memoriam, John Stewart Williamson
Cancer limma Cancer limma • 907 views
ADD COMMENT
0
Entering edit mode
Seth Falcon ★ 7.4k
@seth-falcon-992
Last seen 10.3 years ago
Richard Friedman <friedman at="" cancercenter.columbia.edu=""> writes: > Dear Bioconductor List, > > I am using limma to fit a linear model with what > I believe is called a disconnected design: > > > > data <- ReadAffy() > > eset<-rma(data) > > design<-model.matrix(~ -1+factor(c(1,1,1,2,2,2,3,3,3,4,4,4))) > > colnames(design) > <- > c("1A_L5V4_No_Pon_A","1C_L5V4_Pon_A_DHT_24hrs","2A_L5S2_No_Pon_A","2 C_L5 > S2_Pon_A_DHT_24hrs") > > fit<-lmFit(eset,design) > > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs > -2A_L5S2_No_Pon_A -1C_L5V4_Pon_A_DHT_24hrs > +1A_L5V4_No_Pon_A,levels=design) > > I get the error message: > > Error: syntax error in " > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs" > > I would greatly appreciate any suggestions. I suspect the issue is that symbols in R (variable names) cannot begin with numbers and so 2C_L5S2_Pon_A_DHT_24hrs is perhaps a bad choice. Does the error go away if you do something like: colnames(design) <- paste("x", colnames(design), sep="") + seth -- Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center http://bioconductor.org
ADD COMMENT
0
Entering edit mode
Francois Pepin ★ 1.3k
@francois-pepin-1012
Last seen 10.3 years ago
Hi Richard, the problem is with the names of your samples. Limma treats the sample names as R variables when it makes the contrast, and R variables cannot start with digits. Just add a letter in front when setting the colnames of the design matrix and when doing the contrast and it should get rid of the error. Francois On Wed, 2007-04-11 at 17:58 -0400, Richard Friedman wrote: > Dear Bioconductor List, > > I am using limma to fit a linear model with what > I believe is called a disconnected design: > > > > data <- ReadAffy() > > eset<-rma(data) > > design<-model.matrix(~ -1+factor(c(1,1,1,2,2,2,3,3,3,4,4,4))) > > colnames(design) > <- > c("1A_L5V4_No_Pon_A","1C_L5V4_Pon_A_DHT_24hrs","2A_L5S2_No_Pon_A","2 C_L5 > S2_Pon_A_DHT_24hrs") > > fit<-lmFit(eset,design) > > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs > -2A_L5S2_No_Pon_A -1C_L5V4_Pon_A_DHT_24hrs > +1A_L5V4_No_Pon_A,levels=design) > > I get the error message: > > Error: syntax error in " > contrast.matrix<-makeContrasts(2C_L5S2_Pon_A_DHT_24hrs" > > I would greatly appreciate any suggestions. > > Thanks and best wishes, > Rich > ------------------------------------------------------------ > Richard A. Friedman, PhD > Associate Research Scientist > Herbert Irving Comprehensive Cancer Center > Oncoinformatics Core > Lecturer > Department of Biomedical Informatics > Box 95, Room 130BB or P&S 1-420C > Columbia University Medical Center > 630 W. 168th St. > New York, NY 10032 > (212)305-6901 (5-6901) (voice) > friedman at cancercenter.columbia.edu > http://cancercenter.columbia.edu/~friedman/ > > In memoriam, John Stewart Williamson > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor > Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

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