[Bioc-sig-seq] scanBam memory issue

Martin Morgan mtmorgan at fhcrc.org
Fri Jul 22 21:59:07 CEST 2011


On 07/22/2011 10:25 AM, Steve Lianoglou wrote:
> Hi,
>
> On Wed, Jul 20, 2011 at 7:28 AM, Francesco Lescai<f.lescai at ucl.ac.uk>  wrote:
>> Hi there,
>> I know this issue has been already touched, perhaps several times, but the
>> solutions I found in the list (i.e. param=ScanBamParam(which=<...>) doesn't
>> seem to work.
>> (https://stat.ethz.ch/pipermail/bioc-sig-sequencing/2010-December/001755.html)
>>
>> I have bam files from Human Exomes, about 45 millions reads.
>> I imported RefSeq exons as genomic ranges using the import function of
>> rtracklayer from the bed file.
>>
>> This is my command and the error I get
>>> load("refseq.exon.fixed.RData")
>>> UCLG_20_1<-scanBam("UCLG_20_1.fq.novo.rmdup.bam_sorted.bam",
>>> param=ScanBamParam(which=refseq.exon.fixed))

The big stuff in these files is the nucleotide sequence and quality 
scores, and for many analyses these are not necessary. Use the 'what' 
argument (see ?ScanBamParam, and scanBamWhat()) or readGappedAlignments 
to get just the data you're interested in.

Martin

>> Error: cannot allocate vector of size 156 Kb
>> Execution halted
>>
>> My R version is
>> R version 2.11.1 (2010-05-31)
>> running on linux machines within a cluster environment.
>>
>> Any idea? being it in a cluster it becomes a bit difficult to tweak memory
>> settings..
>
> It looks like your machines don't have enough memory to load in all
> the reads at once -- perhaps you can load in the reads on a chromosome
> by chromosome basis.
>
> If your machines are running linux -- I'm pretty sure there is no need
> to tweak any memory settings, you just need to have enough physical
> memory is all.
>
> Also -- see if you can't get your sysadmins (or whoever) to upgrade to
> latest version of R ;-)
>
> -steve
>


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioc-sig-sequencing mailing list