[BioC] Problems with Affy names / BGA

aedin aedin at jimmy.harvard.edu
Sun Nov 26 22:56:03 CET 2006


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=""),header=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=""),header=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 


More information about the Bioconductor mailing list