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