[Bioc-devel] annaffy/saveHTML problem

Colin A. Smith colin at colinsmith.org
Fri Sep 7 12:16:03 CEST 2007


This is now fixed in annaffy 1.9.2.

The problem related to how annaffy creates S4 objects. Because almost  
every tiny piece of data in annaffy is a separate S4 object, it  
needed to create those objects very quickly. Alas, new() was just not  
up to the task, having far too much overhead from calls to  
initialize, etc. As a workaround, annaffy used attributes() and class 
() to manually construct the S4 objects in a much more efficient manner.

In R 2.4.0, S4 objects got a special bit set internally that flags  
objects as being S4. Everything was fine until R 2.6.0 started  
checking this bit for dispatching primitive methods. Thus show(),  
[(), etc. stopped working, resulting in the observed behavior.

I tried to do the "right" thing by using new() instead, but that made  
it almost an order of magnitude slower. annaffy now calls asS4() to  
set the magic bit anywhere it manually creates S4 objects. All seems  
to be right with the world again.

Anyway, I just wanted to post this extended description just in case  
anyone else is hacking S4 objects together like me.

-Colin

On Aug 31, 2007, at 14:55 , Li, Xuejun wrote:

> Hello everyone,
>
> Can anyone help me to solve this problem?
>
> I have been using the saveHTML function (from annaffy) in R-2.5.1, and
> it worked fine.  However, this function doesn't work properly under  
> the
> R 2.6.0 Pre-release.  For example, if I type the following code under
> the R-2.5.1:
>
> library(annaffy)
> probeid<-c("1415779_s_at", "1415943_at", "1415944_at")
> anncols <- aaf.handler()[c(1,2,8)]
> anntable <- aafTableAnn(probeid, "mouse430a2", anncols)
> saveHTML(anntable, "example.html", title = "Simple Example")
>
>
> Under R-2.5.1, the code above will create a table in HTML like the one
> below:
>
> Probe 	 	Symbol 	LocusLink
> 1415779_s_at 	Actg1 	11465
> 1415943_at 		Sdc1 		20969
> 1415944_at 		Sdc1 		20969
>
> However, under R 2.6.0 Pre-release, it will create the following  
> table:
>
> Probe 		Symbol 			LocusLink
> 1415779_s_at 	Actg1, Sdc1, Sdc1 	11465, 20969, 20969
> 1415943_at 		Actg1, Sdc1, Sdc1 	11465, 20969, 20969
> 1415944_at 		Actg1, Sdc1, Sdc1 	11465, 20969, 20969
>
> It seems like the Symbol and LocusLink doesn't merge correctly to  
> Probe.
> I wonder how I can change my parameters in saveHTML function in  
> order to
> create a correct table.  Thanks!!!
>
>
>
> Arthur Xuejun Li
> Dept of Biostatistics
> City Of Hope
> 1500 E. Duarte Rd., Duarte CA 91010
> Ph.: (626)256-4673 ext.65121



More information about the Bioc-devel mailing list