diff --git a/modules/Bio/EnsEMBL/Pipeline/Production/DensityGenerator.pm b/modules/Bio/EnsEMBL/Pipeline/Production/DensityGenerator.pm index 1e1dca42a24693dd9ba647c2a9eea142c2d4a0b7..da1592199f87f2627cb05306189153e67ebdabb6 100644 --- a/modules/Bio/EnsEMBL/Pipeline/Production/DensityGenerator.pm +++ b/modules/Bio/EnsEMBL/Pipeline/Production/DensityGenerator.pm @@ -50,7 +50,9 @@ sub run { -end => $block->end, -density_type => $density_type, -density_value => $feature); - push(@features, $df); + if ($feature > 0) { + push(@features, $df); + } } } else { my $feature = $self->get_density($slice, $option); @@ -60,7 +62,9 @@ sub run { -end => $slice->end, -density_type => $density_type, -density_value => $feature); - push(@features, $df); + if ($feature > 0) { + push(@features, $df); + } } if ($count >= $total || $iteration == $max_run) { last; diff --git a/modules/Bio/EnsEMBL/Pipeline/Production/StatsGenerator.pm b/modules/Bio/EnsEMBL/Pipeline/Production/StatsGenerator.pm index ce53ed026748df0d6e5b5bf5d38ca929ce36651e..12abcf69244eec8536a381a3927f38db5a238004 100644 --- a/modules/Bio/EnsEMBL/Pipeline/Production/StatsGenerator.pm +++ b/modules/Bio/EnsEMBL/Pipeline/Production/StatsGenerator.pm @@ -26,7 +26,9 @@ sub run { while (my $slice = shift @sorted_slices) { foreach my $code (keys %attrib_codes) { my $count = $self->get_feature_count($slice, $code, $attrib_codes{$code}); - $self->store_attrib($slice, $count, $code); + if ($count > 0) { + $self->store_attrib($slice, $count, $code); + } $sum += $count; } if ($sum >= $total) {