Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • B Bio-DB-HTS
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • Requirements
    • Requirements
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ensembl-gh-mirror
  • Bio-DB-HTS
  • Issues
  • #39

Closed
Open
Created Jan 27, 2017 by Marek Szuba@mks

BufferOverflow error

Created by: Schmurf87

Hi, I have a code which is trying to retrieve each 2690 phase 3 samples.cram from 1000 genomes ftp to get their coverage (and analyse it before going to the next sample).

Here is the function which have the purpose to retrieve coverage for a given sample and chromosome:

sub loadingSampleCov {
	my $chr = shift;
	my $sample = shift;

	my $sam = Bio::DB::HTS->new(-bam  => 'ftp://ftp.1000genomes.ebi.ac.uk/vol1/'.$sample->adresse,						
								);	

    my $coverage = \$sam->get_features_by_location(-type=>'coverage',-seq_id=>$chr); 
    #return $coverage;
}

For example, the "$sample->adresse" could be equal to "ftp/data_collections/1000_genomes_project/data/CEU/NA12828/alignment/NA12828.alt_bwamem_GRCh38DH.20150718.CEU.low_coverage.cram".

The code I ran simply loop on each sample and call the above function, like that:

my $progress = Term::ProgressBar->new(scalar(@samples));
my $c = 0;
for my $sample(@samples){	
	$c++;
	print "$c: sample ".$sample->id."\n";
	loadingSampleCov($chr, $sample);
	$progress->update($_);
	print ".. Done ! \n";
} 

Unfortunatly, when arrives the 339 sample, the script throws the following error.

I tried to remove the 339 sample (NA11840) from the list of sample but the script still throws the same error at the new 339 sample.

I ran this code on a 16GB computer, and the max ram (see the end of the error message, under the Maximum resident set size (kbytes) line) is 5.5GB, which is not limitant.

Maybe there is a way to empty the buffer after each sample, in order to avoid this error...

Thank you in advance for your help.

Assignee
Assign to
Time tracking