Skip to content

Commit

Permalink
Merge pull request #304 from Ensembl/bugfix/exon_bounds
Browse files Browse the repository at this point in the history
Reduce memory usage in ExonBounds datacheck
  • Loading branch information
james-monkeyshines committed Sep 15, 2020
2 parents 16ee4cb + 22035f1 commit 4d5514d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/Bio/EnsEMBL/DataCheck/Checks/ExonBounds.pm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ sub tests {
/;

my $helper = $self->dba->dbc->sql_helper;
my $all_exons = $helper->execute(-SQL => $all_exons_sql);
my $exon_iterator = $helper->execute(
-SQL => $all_exons_sql,
-ITERATOR => 1
);

my $last_transcript_id;
my $last_exon_id;
Expand All @@ -108,7 +111,8 @@ sub tests {

my @exon_overlaps;

foreach my $exon (@$all_exons) {
while ($exon_iterator->has_next) {
my $exon = $exon_iterator->next;
my ($transcript_id, $exon_id, $start, $end, $strand) = @$exon;

if (defined $last_transcript_id && $last_transcript_id == $transcript_id) {
Expand Down

0 comments on commit 4d5514d

Please sign in to comment.