From 6b1e0236f33b3122575518c0b925e87d104f6567 Mon Sep 17 00:00:00 2001
From: Magali Ruffier <mr6@ebi.ac.uk>
Date: Wed, 29 Aug 2012 13:37:22 +0000
Subject: [PATCH] added failsafe, do not get repeat features if slice is too
 big

---
 modules/Bio/EnsEMBL/Pipeline/Production/PercentRepeat.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/modules/Bio/EnsEMBL/Pipeline/Production/PercentRepeat.pm b/modules/Bio/EnsEMBL/Pipeline/Production/PercentRepeat.pm
index 66c4be0db7..d3a260ad21 100644
--- a/modules/Bio/EnsEMBL/Pipeline/Production/PercentRepeat.pm
+++ b/modules/Bio/EnsEMBL/Pipeline/Production/PercentRepeat.pm
@@ -11,6 +11,7 @@ use warnings;
 
 sub get_density {
   my ($self, $block) = @_;
+  if ($block->length > 5000000) { return 0; }
   my $repeat_count = 0;
   my @repeats = @{ $block->get_all_RepeatFeatures() };
   @repeats = map { $_->[1] } sort { $a->[0] <=> $b->[0] } map { [$_->start, $_] } @repeats;
-- 
GitLab