error in maanova matest() with affymetrix
1
0
Entering edit mode
Georg Otto ▴ 510
@georg-otto-956
Last seen 10.2 years ago
Hi, some time ago i tried to use maanova to analyse a microarray experiment using affymetrix chips. This did not work, since the function matest gave an error. At that time, my question to the mailing list could not be solved. Now, some versions of maaonova and R later, I tried again, resulting in the same error. Maybe this time, somebody could give me a hint how to solve this or share some methods how to analyse affymetrix experiments using maanova. Here is my code: ## Generate ExpressionSet object and import data > library(affy) > library(maanova) > cel.path<-"../stages/quantification" > targets<-new("AnnotatedDataFrame") > pData(targets)<-read.table("Targets.txt", header=TRUE, row.names=2) > Data<-ReadAffy(celfile.path =cel.path, + filenames = sampleNames(targets), + verbose=TRUE) > eset<-rma(Data) > write.exprs(eset, file="expression.txt") > design.matrix<-data.frame(Array=row.names(pData(targets)), + Stage=pData(targets)$Stage, + Sample=c(1:length(row.names(pData(targets)))), + Dye=rep(1, times=length(row.names(pData(targets))))) > write.table(design.matrix, "design.txt", sep="\t", row=FALSE, quote=FALSE) > data.raw<-read.madata("expression.txt", designfile="design.txt", cloneid=1, pmt=2, spotflag=FALSE) ## this gives a warning Warning messages: 1: No meta row information, use 1 instead! in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, 2: No meta column information, use 1 instead! in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, 3: No row information. in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, 4: No column information. in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, ## import data and perform F-test > data.maanova<-createData(data.raw, n.rep=1, log.trans=F) > model.full.mix<-makeModel(data=data.maanova, + formula=~Array+Sample+Stage, random=~Array+Sample) > anova.full.mix<-fitmaanova(data.maanova, model.full.mix) > test.Stage.mix<-matest(data.maanova, model.full.mix, term="Stage", n.perm=100) ## This gives the following error: Doing F-test on observed data ... Error in var(log(Chis)) : missing observations in cov/cor In addition: Warning message: NAs produced in: rchisq(n, df) > traceback() 4: var(log(Chis)) 3: meanvarlog(df.random) 2: matest.engine(anovaobj, term, test.method = test.method, Contrast = Contrast, is.ftest = is.ftest, verbose = FALSE) 1: matest(data.maanova, model.full.mix, term = "Stage", n.perm = 100) > sessionInfo() R version 2.5.0 (2007-04-23) x86_64-redhat-linux-gnu locale: LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US .UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US. UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8 ;LC_IDENTIFICATION=C attached base packages: [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" [7] "methods" "base" other attached packages: zebrafishcdf maanova affy affyio Biobase "1.16.0" "1.6.0" "1.14.0" "1.4.0" "1.14.0" Cheers, Georg
cdf affy maanova affyio cdf affy maanova affyio • 1.1k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 1 day ago
United States
Hi Georg, Georg Otto wrote: > Hi, > > some time ago i tried to use maanova to analyse a microarray > experiment using affymetrix chips. This did not work, since the > function matest gave an error. At that time, my question to the > mailing list could not be solved. Now, some versions of maaonova and R > later, I tried again, resulting in the same error. Maybe this time, > somebody could give me a hint how to solve this or share some methods > how to analyse affymetrix experiments using maanova. You could always look at the last section of the maanova vignette, which shows exactly how to analyze affy experiments using maanova (and _does_ mention that you cannot fit a dye or array effect, which likely is the cause of your problem). Best, Jim > > Here is my code: > > ## Generate ExpressionSet object and import data >> library(affy) >> library(maanova) > >> cel.path<-"../stages/quantification" >> targets<-new("AnnotatedDataFrame") >> pData(targets)<-read.table("Targets.txt", header=TRUE, row.names=2) > >> Data<-ReadAffy(celfile.path =cel.path, > + filenames = sampleNames(targets), > + verbose=TRUE) >> eset<-rma(Data) > >> write.exprs(eset, file="expression.txt") >> design.matrix<-data.frame(Array=row.names(pData(targets)), > + Stage=pData(targets)$Stage, > + Sample=c(1:length(row.names(pData(targets)))), > + Dye=rep(1, times=length(row.names(pData(targets))))) > >> write.table(design.matrix, "design.txt", sep="\t", row=FALSE, quote=FALSE) >> data.raw<-read.madata("expression.txt", designfile="design.txt", cloneid=1, pmt=2, spotflag=FALSE) > > ## this gives a warning > Warning messages: > 1: No meta row information, use 1 instead! in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, > 2: No meta column information, use 1 instead! in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, > 3: No row information. in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, > 4: No column information. in: read.madata("expression.txt", designfile = "design.txt", cloneid = 1, > > ## import data and perform F-test >> data.maanova<-createData(data.raw, n.rep=1, log.trans=F) >> model.full.mix<-makeModel(data=data.maanova, > + formula=~Array+Sample+Stage, random=~Array+Sample) >> anova.full.mix<-fitmaanova(data.maanova, model.full.mix) >> test.Stage.mix<-matest(data.maanova, model.full.mix, term="Stage", n.perm=100) > > ## This gives the following error: > > Doing F-test on observed data ... > Error in var(log(Chis)) : missing observations in cov/cor > In addition: Warning message: > NAs produced in: rchisq(n, df) > >> traceback() > > 4: var(log(Chis)) > 3: meanvarlog(df.random) > 2: matest.engine(anovaobj, term, test.method = test.method, Contrast = Contrast, > is.ftest = is.ftest, verbose = FALSE) > 1: matest(data.maanova, model.full.mix, term = "Stage", n.perm = 100) > >> sessionInfo() > > R version 2.5.0 (2007-04-23) > x86_64-redhat-linux-gnu > > locale: > LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_ US.UTF-8;LC_MONETARY=en_US.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_U S.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF -8;LC_IDENTIFICATION=C > > attached base packages: > [1] "tools" "stats" "graphics" "grDevices" "utils" "datasets" > [7] "methods" "base" > > other attached packages: > zebrafishcdf maanova affy affyio Biobase > "1.16.0" "1.6.0" "1.14.0" "1.4.0" "1.14.0" > > > Cheers, > > Georg > > _______________________________________________ > 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 -- 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: 754 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