<commit_before># $Id$

package EnsEMBL::Web::ZMenu::VariationProtein;

use strict;

use base qw(EnsEMBL::Web::ZMenu);

sub content {
  my $self             = shift;
  my $hub              = $self->hub;
  my $v_id             = $hub->param('v');
  my $vtype            = $hub->param('vtype');
  my $db_adaptor       = $hub->database('variation');
  my $var_adaptor      = $db_adaptor->get_VariationAdaptor;
  my $var_feat_adaptor = $db_adaptor->get_VariationFeatureAdaptor;
  my $var              = $var_adaptor->fetch_by_name($v_id);
  my $vf               = $var_feat_adaptor->fetch_all_by_Variation($var);
  my $feature;
  my @entries;

  if (scalar @$vf == 1) {
    $feature = $vf->[0];
  } else {
    foreach (@$vf) {
      $feature = $_ if $_->dbID eq $hub->param('vf');
    }
  }
  
  if ($vtype) {
    my $type = lc $vtype;
    $type =~ s/e$//;
    $type .= 'ion'; 
    
    @entries = (
      [ ucfirst $type, $hub->param('indel') ],
      [ 'Position',    $hub->param('pos')   ],
      [ 'Length',      $hub->param('len')   ]
    );
  } else {
    @entries = ([ 'Variation type', $feature->display_consequence ]);  
  }
  
  push @entries, (
    [ 'Residue',              $hub->param('res') ],
    [ 'Alternative Residues', $hub->param('ar')  ],
    [ 'Codon',                $hub->param('cod') ],
    [ 'Alleles',              $hub->param('al')  ]
  );
  
  $self->caption('Variation Information');
  
  $self->add_entry({
    type       =>  'Variation ID',
    label_html => $feature->variation_name,
    link       => $hub->url({
      type   => 'Variation', 
      action => 'Summary',<commit_msg>alway include Variation type entry<commit_after># $Id$

package EnsEMBL::Web::ZMenu::VariationProtein;

use strict;

use base qw(EnsEMBL::Web::ZMenu);

sub content {
  my $self             = shift;
  my $hub              = $self->hub;
  my $v_id             = $hub->param('v');
  my $vtype            = $hub->param('vtype');
  my $db_adaptor       = $hub->database('variation');
  my $var_adaptor      = $db_adaptor->get_VariationAdaptor;
  my $var_feat_adaptor = $db_adaptor->get_VariationFeatureAdaptor;
  my $var              = $var_adaptor->fetch_by_name($v_id);
  my $vf               = $var_feat_adaptor->fetch_all_by_Variation($var);
  my $feature;

  if (scalar @$vf == 1) {
    $feature = $vf->[0];
  } else {
    foreach (@$vf) {
      $feature = $_ if $_->dbID eq $hub->param('vf');
    }
  }
  
  my @entries = ([ 'Variation type', $feature->display_consequence ]);
  
  if ($vtype) {
    my $type = lc $vtype;
    $type =~ s/e$//;
    $type .= 'ion';
    
    push @entries, (
      [ ucfirst $type, $hub->param('indel') ],
      [ 'Position',    $hub->param('pos')   ],
      [ 'Length',      $hub->param('len')   ]
    );
  }
  
  push @entries, (
    [ 'Residue',              $hub->param('res') ],
    [ 'Alternative Residues', $hub->param('ar')  ],
    [ 'Codon',                $hub->param('cod') ],
    [ 'Alleles',              $hub->param('al')  ]
  );
  
  $self->caption('Variation Information');
  
  $self->add_entry({
    type       =>  'Variation ID',
    label_html => $feature->variation_name,
    link       => $hub->url({
      type   => 'Variation', 
      action => 'Summary',
{'fraction_non_alphanumeric': 0.19130434782608696, 'fraction_numerical': 0.0012422360248447205, 'mean_word_length': 2.1859545004945597, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 59, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1206339', 'n_tokens_mistral': 1210, 'n_tokens_neox': 1170, 'n_words': 210}