[Bioc-devel] Package size limitation
hpages at fhcrc.org
hpages at fhcrc.org
Fri Aug 1 19:25:14 CEST 2008
Hi Henrik,
Quoting Henrik Bengtsson <hb at stat.berkeley.edu>:
[...]
>
> Now to a trick: If you do want to distribute an AffyBatch object, have
> a look at your intensities. If your chip type is a 3x3 pixel per
> probe array, and the Affymetrix image analysis (typically) took the
> 75% quantile (7:th ordered pixel), you will actually see only integer
> probe signals. Note, this is not a rounding error but it just happens
> "by chance". If this is the case with your data, you could create an
> object holding the signals as integers and not doubles without loosing
> anything. That object would be roughly half the size. I don't think
> compression algorithms can pick this up.
Yes they do:
> xx <- sample(1000000L, 5000000, replace=TRUE)
> typeof(xx)
[1] "integer"
> object.size(xx)
[1] 20000040
> yy <- as.double(xx)
> typeof(yy)
[1] "double"
> object.size(yy)
[1] 40000040
> save(xx, file="xx.rda")
> save(yy, file="yy.rda")
Then from the shell:
hpages at lamprey:~> ls -lh *.rda
-rw-r--r-- 1 hpages compbio 16M 2008-08-01 10:19 xx.rda
-rw-r--r-- 1 hpages compbio 18M 2008-08-01 10:19 yy.rda
H.
More information about the Bioc-devel
mailing list