Time course....makeConstrasts()
3
0
Entering edit mode
Khan, Sohail ▴ 490
@khan-sohail-1137
Last seen 9.7 years ago
Dear all, I have an Affy time course experiment as follows: 0hr - 2hr - 4hr, I have 2 replicates for the 2hr and 4hr and only one (chip) for 0hr. Would I be able to analyze this experiment using limma? (I know its not a good idea). Actually I tried analyzing this in limma, and got the following error when constructing contrasts: Error in parse(file, n, text, prompt) : parse error I am assuming this is due to the design matrix having only one chip for the 0hr time point. Thanks for your suggestions/advice. Sohail Khan Scientific Programmer COLD SPRING HARBOR LABORATORY Genome Research Center 500 Sunnyside Boulevard Woodbury, NY 11797 (516)422-4076
affy limma affy limma • 961 views
ADD COMMENT
0
Entering edit mode
@sean-davis-490
Last seen 4 months ago
United States
On 3/14/06 3:19 PM, "Khan, Sohail" <khan at="" cshl.edu=""> wrote: > Dear all, > > I have an Affy time course experiment as follows: > 0hr - 2hr - 4hr, I have 2 replicates for the 2hr and 4hr and only one (chip) > for 0hr. Would I be able to analyze this experiment using limma? (I know its > not a good idea). > Actually I tried analyzing this in limma, and got the following error when > constructing contrasts: > Error in parse(file, n, text, prompt) : parse error > I am assuming this is due to the design matrix having only one chip for the > 0hr time point. Thanks for your suggestions/advice. Sohail, You can do this in limma. The parse error is most likely due to the way you constructed the call to makeContrasts. Perhaps you would like to post the code that you are using to make your design matrix and the contrast matrix, along with the output and errors? As an aside, you probably want to get in the habit of posting sessionInfo() when you post to the list. It really does help in many cases. Sean
ADD COMMENT
0
Entering edit mode
Khan, Sohail ▴ 490
@khan-sohail-1137
Last seen 9.7 years ago
Thanks Sean. My code and the sessionInfo: Thanks Sean. Here is my code and sessionInfo. targets FileName Target 1 DF_02.CEL 0hr 2 DF_04.CEL 2hr 3 DF_05.CEL 2hr 4 DF_07.CEL 4hr 5 DF_08.CEL 4hr > lev <- c("0hr","2hr","4hr") > lev [1] "0hr" "2hr" "4hr" > f <- factor(targets$Target, levels=lev) > f [1] 0hr 2hr 2hr 4hr 4hr Levels: 0hr 2hr 4hr > design <- model.matrix(~0+f) > colnames(design) <- lev > design 0hr 2hr 4hr 1 1 0 0 2 0 1 0 3 0 1 0 4 0 0 1 5 0 0 1 attr(,"assign") [1] 1 1 1 attr(,"contrasts") attr(,"contrasts")$f [1] "contr.treatment" > fit <- lmFit(eset, design) > cont.wt <- makeContrasts( + "2hr-0hr", + "4hr-2hr", + levels=design) Error in parse(file, n, text, prompt) : parse error > sessionInfo() R version 2.1.1, 2005-06-20, i386-pc-mingw32 attached base packages: [1] "splines" "tools" "methods" "stats" "graphics" "grDevices" "utils" "datasets" "base" other attached packages: hgu133a2probe hgu133a2cdf limma affydata affyPLM gcrma matchprobes affy reposTools Biobase "1.10.0" "1.10.0" "2.0.8" "1.4.1" "1.3.3" "1.1.4" "1.0.22" "1.6.7" "1.5.19" "1.5.12" > -Sohail
ADD COMMENT
0
Entering edit mode
Khan, Sohail wrote: > Thanks Sean. > > My code and the sessionInfo: > Thanks Sean. > > Here is my code and sessionInfo. > > targets > FileName Target > 1 DF_02.CEL 0hr > 2 DF_04.CEL 2hr > 3 DF_05.CEL 2hr > 4 DF_07.CEL 4hr > 5 DF_08.CEL 4hr > >>lev <- c("0hr","2hr","4hr") >>lev > > [1] "0hr" "2hr" "4hr" > >>f <- factor(targets$Target, levels=lev) >>f > > [1] 0hr 2hr 2hr 4hr 4hr > Levels: 0hr 2hr 4hr > >>design <- model.matrix(~0+f) >>colnames(design) <- lev >>design > > 0hr 2hr 4hr > 1 1 0 0 > 2 0 1 0 > 3 0 1 0 > 4 0 0 1 > 5 0 0 1 > attr(,"assign") > [1] 1 1 1 > attr(,"contrasts") > attr(,"contrasts")$f > [1] "contr.treatment" > > >>fit <- lmFit(eset, design) >>cont.wt <- makeContrasts( > > + "2hr-0hr", > + "4hr-2hr", > + levels=design) The problem is here - you cannot have your contrasts start with numbers or you will have a parse error. Either rename your design matrix columns to something like Hr0, Hr2, etc and use makeContrasts(Hr2 - Hr0, Hr4 - Hr2, levels=design) or build your contrasts matrix by hand cont.wt <- matrix(c(-1,1,0,0,-1,1), nr=3, nc=2, dimnames=list(colnames(design), paste(c("2hr", "4hr"), c("0hr","2hr"), sep= " - "))) HTH, Jim > Error in parse(file, n, text, prompt) : parse error > > >>sessionInfo() > > R version 2.1.1, 2005-06-20, i386-pc-mingw32 > > attached base packages: > [1] "splines" "tools" "methods" "stats" "graphics" "grDevices" "utils" "datasets" "base" > > other attached packages: > hgu133a2probe hgu133a2cdf limma affydata affyPLM gcrma matchprobes affy reposTools Biobase > "1.10.0" "1.10.0" "2.0.8" "1.4.1" "1.3.3" "1.1.4" "1.0.22" "1.6.7" "1.5.19" "1.5.12" > > > -Sohail > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD REPLY
0
Entering edit mode
Khan, Sohail ▴ 490
@khan-sohail-1137
Last seen 9.7 years ago
Thank you Jim, that fixed the problem.. -Sohail -----Original Message----- From: James W. MacDonald [mailto:jmacdon@med.umich.edu] Sent: Tuesday, March 14, 2006 5:14 PM To: Khan, Sohail Cc: Bioconductor Subject: Re: [BioC] Time course....makeConstrasts() Khan, Sohail wrote: > Thanks Sean. > > My code and the sessionInfo: > Thanks Sean. > > Here is my code and sessionInfo. > > targets > FileName Target > 1 DF_02.CEL 0hr > 2 DF_04.CEL 2hr > 3 DF_05.CEL 2hr > 4 DF_07.CEL 4hr > 5 DF_08.CEL 4hr > >>lev <- c("0hr","2hr","4hr") >>lev > > [1] "0hr" "2hr" "4hr" > >>f <- factor(targets$Target, levels=lev) >>f > > [1] 0hr 2hr 2hr 4hr 4hr > Levels: 0hr 2hr 4hr > >>design <- model.matrix(~0+f) >>colnames(design) <- lev >>design > > 0hr 2hr 4hr > 1 1 0 0 > 2 0 1 0 > 3 0 1 0 > 4 0 0 1 > 5 0 0 1 > attr(,"assign") > [1] 1 1 1 > attr(,"contrasts") > attr(,"contrasts")$f > [1] "contr.treatment" > > >>fit <- lmFit(eset, design) >>cont.wt <- makeContrasts( > > + "2hr-0hr", > + "4hr-2hr", > + levels=design) The problem is here - you cannot have your contrasts start with numbers or you will have a parse error. Either rename your design matrix columns to something like Hr0, Hr2, etc and use makeContrasts(Hr2 - Hr0, Hr4 - Hr2, levels=design) or build your contrasts matrix by hand cont.wt <- matrix(c(-1,1,0,0,-1,1), nr=3, nc=2, dimnames=list(colnames(design), paste(c("2hr", "4hr"), c("0hr","2hr"), sep= " - "))) HTH, Jim > Error in parse(file, n, text, prompt) : parse error > > >>sessionInfo() > > R version 2.1.1, 2005-06-20, i386-pc-mingw32 > > attached base packages: > [1] "splines" "tools" "methods" "stats" "graphics" "grDevices" "utils" "datasets" "base" > > other attached packages: > hgu133a2probe hgu133a2cdf limma affydata affyPLM gcrma matchprobes affy reposTools Biobase > "1.10.0" "1.10.0" "2.0.8" "1.4.1" "1.3.3" "1.1.4" "1.0.22" "1.6.7" "1.5.19" "1.5.12" > > > -Sohail > > _______________________________________________ > Bioconductor mailing list > Bioconductor at stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor -- James W. MacDonald, M.S. Biostatistician Affymetrix and cDNA Microarray Core University of Michigan Cancer Center 1500 E. Medical Center Drive 7410 CCGC Ann Arbor MI 48109 734-647-5623
ADD COMMENT

Login before adding your answer.

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