From 5e12e7d6d3b0558819cb291dcf5876f276ee1737 Mon Sep 17 00:00:00 2001 From: Nuno Agostinho Date: Fri, 2 Jun 2023 15:43:24 +0100 Subject: [PATCH] Fix no_stats consequences --- modules/Bio/EnsEMBL/VEP/OutputFactory.pm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/VEP/OutputFactory.pm b/modules/Bio/EnsEMBL/VEP/OutputFactory.pm index 0fbefb886..65798bed7 100755 --- a/modules/Bio/EnsEMBL/VEP/OutputFactory.pm +++ b/modules/Bio/EnsEMBL/VEP/OutputFactory.pm @@ -952,7 +952,16 @@ sub VariationFeature_to_output_hash { # check_ref tests $hash->{CHECK_REF} = 'failed' if defined($vf->{check_ref_failed}); - $self->stats->log_VariationFeature($vf, $hash) unless $self->{no_stats}; + unless ($self->{no_stats}) { + $self->stats->log_VariationFeature($vf, $hash); + } else { + # get overlap consequences to fix codon/nucleotide changes + for my $vfo (@{ $vf->get_all_VariationFeatureOverlaps }) { + for my $allele (@{ $vfo->get_all_alternate_VariationFeatureOverlapAlleles }) { + $allele->get_all_OverlapConsequences; + } + } + } return $hash; }