Question: Problems with Affy names / BGA
0
gravatar for Heike Pospisil
12.7 years ago by
Heike Pospisil310 wrote:
Dear list, I am dealing with between group analysis (BGA) from the made4 package and I have a problem with some of the affy names: I tried bga.suppl(training.set[list,], supdata=test.set[list,], classvec=cl_train, supvec=cl_test) 'training.set' and 'test.set' are expression sets, and 'cl_train' and 'cl_test' the corresponding classification vectors. 'list' contains some selected affy IDs. >list [1] "217367_s_at" "202880_s_at" "1565905_at" "236347_at" ... I tried bga with different lists, and in most cases, this works fine. But however, sometimes the following error message appears: Error in "dimnames<-.data.frame"(`*tmp*`, value = list(c("217367_s_at", : invalid 'dimnames' given for data frame It has definitively to do with the selected identifiers, and I have the impression that made4 can not manage identifiers with an minus sign inside, such as: AFFX-HUMGAPDH/M33197_M_at AFFX-BioDn-3_at I am running ade4 (Version: 1.4-2) and made4 (Version: 1.8.0) under R 2.3.1 Has somebody an idea how to handle this problem? Thanks in advance, Heike -- Dr. Heike Pospisil | pospisil at zbh.uni-hamburg.de University of Hamburg | Center for Bioinformatics Bundesstrasse 43 | 20146 Hamburg, Germany phone:+49-40-42838-7303 | fax: +49-40-42838-7312
classification affy made4 • 622 views
ADD COMMENTlink modified 12.7 years ago by Aedin Culhane510 • written 12.7 years ago by Heike Pospisil310
Answer: Problems with Affy names / BGA
0
gravatar for Aedin Culhane
12.7 years ago by
Aedin Culhane510
United States
Aedin Culhane510 wrote:
Dear Heike I have not encountered this problem with Affy data, but it sounds like a R error caused by moving between a matrix and data.frame. I convert affy data using data.frame(exprs(arraydata)), as ade4 expects data in data.frame. Can you email me a subset of the data which is giving you this problem. Or can you run a traceback() on this, so I can pin-point the problem. Thanks a million Aedin >I tried bga with different lists, and in most cases, this works fine. >But however, sometimes the following error message appears: >Error in "dimnames<-.data.frame"(`*tmp*`, value = list(c("217367_s_at", > > invalid 'dimnames' given for data frame > -- Aed?n Culhane, Research Associate in Prof. J Quackenbush Lab Harvard School of Public Health, Dana-Farber Cancer Institute 44 Binney Street, SM822 ****Please note change of address**** Department of Biostatistics and Computational Biology, Dana-Farber Cancer Institute Boston, MA 02115 USA Phone: +1 (617) 632 2468 Fax: +1 (617) 582 7760 Email: aedin at jimmy.harvard.edu Web URL: http://www.hsph.harvard.edu/researchers/aculhane.html
ADD COMMENTlink written 12.7 years ago by Aedin Culhane510
Answer: Problems with Affy names / BGA
0
gravatar for Aedin Culhane
12.7 years ago by
Aedin Culhane510
United States
Aedin Culhane510 wrote:
Dear Heike, This was a bug in made4. I have corrected this in the devel version of made4. I attach this bug-fix in the enclosed R code. Please source this file and bga should run without problems. As an aside, if read.table will automatically create a data.frame, so you don't need to do as.data.frame. data<-as.data.frame(read.table(file=paste(dir,"data2.txt",sep=""),head er=TRUE,row.names="ID")) > data1 <-read.table("data2.txt",header=TRUE,row.names="ID") > class(data1) [1] "data.frame" made4 will read in ExpressionSet, matrix, data.frame or most bioconductor data classes. So you don't need to convert to a data.frame before running bga. Although possible, its generally not advised to call an object the same name as a function. list<-rownames(data)[1:26] I am very sorry about the bug. Thanks a million for brining it to my attention. Kinds Regards Aedin Heike Pospisil wrote: > Dear Aedin, > > thank you for your fast reply. > >> I have not encountered this problem with Affy data, but it sounds like >> a R error caused by moving between a matrix and data.frame. > > > Yes, this could be. But I did not find the error :-( > >> I convert affy data using data.frame(exprs(arraydata)), as ade4 >> expects data in data.frame. > > > So did I. > >> Can you email me a subset of the data which is giving you this >> problem. Or can you run a traceback() on this, so I can pin-point the >> problem. > > > I prepared a fictitious expression set and attached it in two versions: > - example.Rdata is the ExpressionSet > - data2.txt contains the expressions as a matrix > > You can load either the Rdata or the txt file: > ############################################# > ##### Load Data ###### > ############################################# > dir<-your.download.directory > data<-as.data.frame(read.table(file=paste(dir,"data2.txt",sep=""),he ader=TRUE,row.names="ID")) > > ######## or ############### > load(paste(dir,"example.Rdata",sep="")) > data1<-exprs(data2) > data<-as.data.frame(data1) > > > ############################################# > ##### BGA ##### > ############################################# > cl_training<-c(0,0,1,1) > cl_testing<-c(0,0,1,1) > > list<-rownames(data)[1:26] > bga.suppl(data[list,1:4], supdata=data[list,5:8],classvec=cl_training, > supvec=cl_testing) > > It works very fine with the first 26 probe sets. But it crashes if I > select the first 27 probes: > > list<-rownames(data)[1:27] > bga.suppl(data[list,1:4], supdata=data[list,5:8],classvec=cl_training, > supvec=cl_testing) > > Error in "dimnames<-.data.frame"(`*tmp*`, value = list(c("65884_at", > "66053_at", : > invalid 'dimnames' given for data frame > > Hope, it is clear what I meant and I hope you can load my dummy data. > > Would be great if you could help me. > > Thanks a lot and best wishes, > Heike > > -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: bga.bugfix.R Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20061126/ 0d91392a/attachment.pl
ADD COMMENTlink written 12.7 years ago by Aedin Culhane510
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: 129 users visited in the last hour