<commit_before>package EnsEMBL::Web::ZMenu::Transcript::RefSeq;

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

sub content {
  my $self = shift;
  
  $self->SUPER::content;
  
  my $gene    = $self->object->gene;
  my $gene_id = $gene->stable_id;
  
  $self->caption($gene_id);

  $self->add_entry({
    type     => 'RefSeq gene',
    label    => $gene_id,
    link     => $self->hub->get_ExtURL_link($gene_id, 'REFSEQ_GENEIMP', $gene_id),
    extra    => { abs_url => 1 },
    position => 3,
  });

  my $biotype = ucfirst lc $gene->biotype;
  $biotype    =~ s/_/ /;
  $biotype    =~ s/rna/RNA/;

  $self->modify_entry_by_type({
    type  => 'Gene type',
    label => $biotype,
  });
  
  $self->delete_entry_by_type('Transcript');
}

1;<commit_msg>no gene page, link out to refseq protein page rather than e! page<commit_after>package EnsEMBL::Web::ZMenu::Transcript::RefSeq;

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

sub content {
  my $self = shift;
  
  $self->SUPER::content;
  
  my $object      = $self->object;
  my $gene        = $object->gene;
  my $gene_id     = $gene->stable_id;
  my $transcript  = $object->Obj;
  my $translation = $transcript->translation;
  $self->caption($gene_id);

  $self->add_entry({
    type     => 'RefSeq gene',
    label    => $gene_id,
    link     => $self->hub->get_ExtURL_link($gene_id, 'REFSEQ_GENEIMP', $gene_id),
    extra    => { abs_url => 1 },
    position => 2,
  });

  my $biotype = ucfirst lc $gene->biotype;
  $biotype    =~ s/_/ /;
  $biotype    =~ s/rna/RNA/;

  $self->modify_entry_by_type({
    type  => 'Gene type',
    label => $biotype,
  });

  if ($translation) {
    $self->delete_entry_by_type('Protein product');
    my $stable_id = $translation->stable_id;
    $self->add_entry({
      type     => 'RefSeq protein',
      label    => $stable_id,
      link     => $self->hub->get_ExtURL_link($stable_id, 'REFSEQ_PROTIMP', $stable_id),
      extra    => { abs_url => 1 },
      position => 3
    });
  }

  $self->delete_entry_by_type('Gene');
  $self->delete_entry_by_type('Transcript');
}

1;
{'fraction_non_alphanumeric': 0.17804295942720763, 'fraction_numerical': 0.0038186157517899762, 'mean_word_length': 3.0307692307692307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 55, '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': '1076682', 'n_tokens_mistral': 846, 'n_tokens_neox': 792, 'n_words': 147}