Hi there,
I'm encountering a memory error with exomeCopy which might be file-specific (i.e. it's not happening with any of my other batches).
I'm running it on a cluster.

Initially I had three batches pooled together and I had this error message in my .Rout file

----------------
> for (f1 in bamfiles){
+  sample<-gsub('.bam','',f1)
+  exome.samples<-c(exome.samples,sample)
+  rdata[[sample]] <- countBamInGRanges(f1,target.sub)
+ }
Error in value[[3L]](cond) :
  Realloc could not re-allocate memory (20971520 bytes)
  file: /SAN/biomed/biomed14/ICH2/k/bam_batch_3/K_5165129.bam
  index: /SAN/biomed/biomed14/ICH2/k/bam_batch_3/K_5165129.bam
Calls: countBamInGRanges ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
------------------

The index doesn't seem to point to a .bam.bai file, but I checked of course and the .bai is there, same way as for the other bams I'm counting in.
Then I separated the batches, and run again.
Two of three didn't display any error,  while the third one (the one that .bam file belongs to) had this (slightly different) error

-------------------------
> for (f1 in bamfiles){
+  sample<-gsub('.bam','',f1)
+  exome.samples<-c(exome.samples,sample)
+  rdata[[sample]] <- countBamInGRanges(f1,target.sub)
+ }

 *** caught segfault ***
address 0x4, cause 'memory not mapped'

Traceback:
 1: .Call(.bamfile_open, path(con), index(con), "rb")
 2: open.BamFile(BamFile(file, index), "rb")
 3: open(BamFile(file, index), "rb")
 4: scanBam(bam.file, param = ScanBamParam(what = scan.what, which = range(granges.subset)))
 5: scanBam(bam.file, param = ScanBamParam(what = scan.what, which = range(granges.subset)))
 6: countBamInGRanges(f1, target.sub)
aborting ...
-------------------------

Any idea where I could look better, in order to track this error?

thanks for your help,
Francesco



> sessionInfo()
R version 2.15.0 (2012-03-30)
Platform: x86_64-unknown-linux-gnu (64-bit)

locale:
 [1] LC_CTYPE=en_US.iso885915       LC_NUMERIC=C
 [3] LC_TIME=en_US.iso885915        LC_COLLATE=en_US.iso885915
 [5] LC_MONETARY=en_US.iso885915    LC_MESSAGES=en_US.iso885915
 [7] LC_PAPER=C                     LC_NAME=C
 [9] LC_ADDRESS=C                   LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.iso885915 LC_IDENTIFICATION=C

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

other attached packages:
[1] exomeCopy_1.2.0     Rsamtools_1.8.5     Biostrings_2.24.1
[4] GenomicRanges_1.8.7 IRanges_1.14.4      BiocGenerics_0.2.0

loaded via a namespace (and not attached):
[1] bitops_1.0-4.1 stats4_2.15.0  zlibbioc_1.2.0

	[[alternative HTML version deleted]]

