Question: pamr / R graphics recording
0
gravatar for Katleen De Preter
14.9 years ago by
Belgium
Katleen De Preter130 wrote:
Hello, I'm trying to use the pamr package on Affymetrix RMA normalised data. Pamr.train-function works on the data. However, I got following errors with pamr.plotcen and pamr.listgenes. Do anyone know what may be the problem? And another (R-related) question: how can I automatically (before starting a script) record all generated graphes??? > pamr.plotcen(mData.train, mData.data, threshold=4.0) Error in text(xy.coords(x, y, recycle = TRUE), labels, adj, pos, offset, : zero length 'labels' > pamr.listgenes(mData.train, mData.data, threshold=4.0) Error in pamr.listgenes(mData.train, mData.data, threshold = 4) : length of dimnames [2] not equal to array extent used R-SCRIPT: library(pamr) library(affy) load("C:/Documents and Settings/Katleen/Mijn documenten/WERK/Analyse affymetrix/analyse ALLE CEL FILES/R/nbNBdata.RData") NBselect<-nbNBdata[,nbNBdata$classnameb%in%c("NB1","NB2B","NB2A")] classname <- pData(phenoData(NBselect))$classnameb mData.data <- pamr.knnimpute(list(x = exprs(NBselect), y = classname)) mData.train <- pamr.train(mData.data) mData.results<- pamr.cv(mData.train, mData.data) pamr.plotcv(mData.results) pamr.confusion(mData.results, threshold=4.0) pamr.plotcvprob(mData.results, mData.data, threshold=4.0) pamr.plotcen(mData.train, mData.data, threshold=4.0) pamr.geneplot(mData.train, mData.data, threshold=5.3) pamr.listgenes(mData.train, mData.data, threshold=4.0) Best regards, Katleen -- No virus found in this outgoing message. Checked by AVG Anti-Virus.
pamr • 859 views
ADD COMMENTlink modified 14.9 years ago by Min-Han Tan40 • written 14.9 years ago by Katleen De Preter130
Answer: pamr / R graphics recording
0
gravatar for James W. MacDonald
14.9 years ago by
United States
James W. MacDonald52k wrote:
Katleen De Preter wrote: > Hello, > > I'm trying to use the pamr package on Affymetrix RMA normalised data. > Pamr.train-function works on the data. However, I got following errors > with pamr.plotcen and pamr.listgenes. Do anyone know what may be the > problem? > And another (R-related) question: how can I automatically (before > starting a script) record all generated graphes??? By record do you mean 'save to disk' or do you mean 'record to the history buffer so I can scroll between them'? If you want to save them to disk, there are at least two ways to do this. You can use either win.metafile() or pdf() to save the files as either .wmf or .pdf files. pdf(onefile=FALSE) [plot stuff] dev.off() This will result in several plots being dumped into your current directory. You may be able to pass a vector of names to this function also. Another way would be to use savePlot(). See below. If you want to simply record the plots so you can cycle through them, simply do: x11() and then go to History/Recording in the GUI menu. You can then cycle through your plots using the Page Up/ Page Down keys. > > > pamr.plotcen(mData.train, mData.data, threshold=4.0) > Error in text(xy.coords(x, y, recycle = TRUE), labels, adj, pos, offset, : > zero length 'labels' I don't see anything in the current version of pamr that would cause this. What version are you using? You might want to update to 1.22. > > > pamr.listgenes(mData.train, mData.data, threshold=4.0) > Error in pamr.listgenes(mData.train, mData.data, threshold = 4) : > length of dimnames [2] not equal to array extent You need to give more help here. Try running traceback() after the error to see where the error occured. > > used R-SCRIPT: > library(pamr) > library(affy) > load("C:/Documents and Settings/Katleen/Mijn documenten/WERK/Analyse > affymetrix/analyse ALLE CEL FILES/R/nbNBdata.RData") > NBselect<-nbNBdata[,nbNBdata$classnameb%in%c("NB1","NB2B","NB2A")] > classname <- pData(phenoData(NBselect))$classnameb > mData.data <- pamr.knnimpute(list(x = exprs(NBselect), y = classname)) > mData.train <- pamr.train(mData.data) > mData.results<- pamr.cv(mData.train, mData.data) > pamr.plotcv(mData.results) savePlot("CV Plot", "wmf") ## see ?savePlot for the available formats for the saved plot > pamr.confusion(mData.results, threshold=4.0) savePlot("Confusion", "wmf") > pamr.plotcvprob(mData.results, mData.data, threshold=4.0) savePlot("blahblah", "pdf") ## you get the point > pamr.plotcen(mData.train, mData.data, threshold=4.0) > pamr.geneplot(mData.train, mData.data, threshold=5.3) > pamr.listgenes(mData.train, mData.data, threshold=4.0) > > Best regards, > > Katleen > > -- James W. MacDonald University of Michigan Affymetrix and cDNA Microarray Core 1500 E Medical Center Drive Ann Arbor MI 48109 734-647-5623 ********************************************************** Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues.
ADD COMMENTlink written 14.9 years ago by James W. MacDonald52k
Answer: pamr / R graphics recording
0
gravatar for Min-Han Tan
14.9 years ago by
Min-Han Tan40
Min-Han Tan40 wrote:
Hi Katleen, I think I know why. You have to specify values for geneids and genenames in your initial train.data, otherwise you get the error message you reported for both pamr.plotcen and pamr.listgenes. See following output as illustration: > train.data<-list(x=exprData.clean,y=dx) > pam.trained<-pamr.train(train.data) 123456789101112131415161718192021222324252627282930 > pamr.plotcen(pam.trained,train.data,threshold=5) Error in text(xy.coords(x, y, recycle = TRUE), labels, adj, pos, offset, : zero length 'labels' train.data<-list(x=exprData.clean,y=dx,geneids=rownames(exprData.clean ),genenames=rownames(exprData.clean)) > pam.trained<-pamr.train(train.data) 123456789101112131415161718192021222324252627282930 > pamr.plotcen(pam.trained,train.data,threshold=5) NULL Regards, Min-Han Tan Van Andel Institute On Sat, 15 Jan 2005 18:33:39 +0100, Katleen De Preter <katleen.depreter@ugent.be> wrote: > Hello, > > I'm trying to use the pamr package on Affymetrix RMA normalised data. > Pamr.train-function works on the data. However, I got following errors > with pamr.plotcen and pamr.listgenes. Do anyone know what may be the > problem? > And another (R-related) question: how can I automatically (before > starting a script) record all generated graphes??? > > > pamr.plotcen(mData.train, mData.data, threshold=4.0) > Error in text(xy.coords(x, y, recycle = TRUE), labels, adj, pos, offset, : > zero length 'labels' > > > pamr.listgenes(mData.train, mData.data, threshold=4.0) > Error in pamr.listgenes(mData.train, mData.data, threshold = 4) : > length of dimnames [2] not equal to array extent > > used R-SCRIPT: > library(pamr) > library(affy) > load("C:/Documents and Settings/Katleen/Mijn documenten/WERK/Analyse > affymetrix/analyse ALLE CEL FILES/R/nbNBdata.RData") > NBselect<-nbNBdata[,nbNBdata$classnameb%in%c("NB1","NB2B","NB2A")] > classname <- pData(phenoData(NBselect))$classnameb > mData.data <- pamr.knnimpute(list(x = exprs(NBselect), y = classname)) > mData.train <- pamr.train(mData.data) > mData.results<- pamr.cv(mData.train, mData.data) > pamr.plotcv(mData.results) > pamr.confusion(mData.results, threshold=4.0) > pamr.plotcvprob(mData.results, mData.data, threshold=4.0) > pamr.plotcen(mData.train, mData.data, threshold=4.0) > pamr.geneplot(mData.train, mData.data, threshold=5.3) > pamr.listgenes(mData.train, mData.data, threshold=4.0) > > Best regards, > > Katleen > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > > _______________________________________________ > Bioconductor mailing list > Bioconductor@stat.math.ethz.ch > https://stat.ethz.ch/mailman/listinfo/bioconductor >
ADD COMMENTlink written 14.9 years ago by Min-Han Tan40
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 378 users visited in the last hour