Commit 6b1e0236 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

added failsafe, do not get repeat features if slice is too big

parent 3df1c466
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment