Hi all,

Apologies if this has been asekd before, I have searched the archives and
not found an answer.
I am running R2.6.0 on Windows XP
I wish to read in ~150 cel files and then extract QC information using
simpleaffy and the qc function using the following loop.
Is there a way to clean up memory within a program. I thought I would
achieve this by using the loop to overwrite the variables each time. Failing
that is there a different way or a work around allowing me to obtain the
information within one session without having to close and start again from
where it failed.

Many thanks in advance

claire

> memory.limit(size = 3072)
> fn <- list.celfiles()
> output <- matrix(nrow=length(fn),ncol=9)
> for (i in 37:length(fn)) {
+    cat("Reading file: ",paste(fn[i],i,"of",length(fn),collapse="\n"),"\n")
+    eset <- ReadAffy(filenames=fn[i]);
+    qc.eset = qc(eset)
+    output[i,1] <- qc.eset@average.background
+    output[i,2] <- qc.eset@percent.present
+    output[i,3] <- qc.eset@scale.factors
+    output[i,4:9] <- qc.eset@qc.probes
+ }


However after 36 iterations I get the following error message
> Error in read.affybatch(filenames = l$filenames, phenoData = l$phenoData,
:
  Calloc could not allocate (1699741697 of 1) memory
> traceback()
3: .Call("ReadHeader", as.character(filenames[[1]]), PACKAGE = "affyio")
2: read.affybatch(filenames = l$filenames, phenoData = l$phenoData,
       description = l$description, notes = notes, compress = compress,
       rm.mask = rm.mask, rm.outliers = rm.outliers, rm.extra = rm.extra,
       verbose = verbose, sd = sd, cdfname = cdfname)
1: ReadAffy(filenames = fn[i])

> memory.size()
[1] 238.3641
> sessionInfo()
R version 2.6.0 (2007-10-03)
i386-pc-mingw32

locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
Kingdom.1252;LC_MONETARY=English_United
Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252

attached base packages:
[1] splines   tools     stats     graphics  grDevices utils     datasets
[8] methods   base

other attached packages:
 [1] hgu133plus2cdf_1.16.0 simpleaffy_2.14.05    gcrma_2.10.0
 [4] matchprobes_1.10.0    genefilter_1.16.0     survival_2.32
 [7] affy_1.16.0           preprocessCore_1.0.0  affyio_1.6.1
[10] Biobase_1.16.0

loaded via a namespace (and not attached):
[1] annotate_1.16.0     AnnotationDbi_1.0.5 DBI_0.2-3
[4] rcompgen_0.1-15     RSQLite_0.6-3

	[[alternative HTML version deleted]]

