<commit_before>package Bio::EnsEMBL::GlyphSet::haplotype_links;
use strict;
use vars qw(@ISA);
use Bio::EnsEMBL::GlyphSet_simple;
@ISA = qw(Bio::EnsEMBL::GlyphSet_simple);

sub my_label { return "Haplotypes"; }

sub features {
    my ($self) = @_;
    my $container_length = $self->{'container'}->length();
    return $self->{'container'}->get_all_MapFrags( 'haplotype' );
}

sub href {
    my ($self,$f)= @_;
    return "/$ENV{'ENSEMBL_SPECIES'}/$ENV{'ENSEMBL_SCRIPT'}?l=".$f->name;
}
sub zmenu {
    my ($self, $f ) = @_;
    return if $self->{'container'}->length() > ( $self->{'config'}->get( 'bacs', 'threshold_navigation' ) || 2e7) * 1000;
    my ($chr,$start, $end) = $f->name=~ /^(\w+):(\w+)-(\w+)/;
    return { 
        'caption'   => "Haplotype block",
        "Chr: $chr $start-$end" => "",
        'Jump to haplotype' => $self->href($f),
    };
}

sub image_label {
    my ($self, $f ) = @_;
    my ($chr,$start, $end) = $f->name =~ /^(\w+):(\w+)-(\w+)/;
    return ("Chr: $chr $start-$end",'overlaid');
}

1;

<commit_msg>changed label<commit_after>package Bio::EnsEMBL::GlyphSet::haplotype_links;
use strict;
use vars qw(@ISA);
use Bio::EnsEMBL::GlyphSet_simple;
@ISA = qw(Bio::EnsEMBL::GlyphSet_simple);

sub my_label { return "Haplotype blocks"; }

sub features {
    my ($self) = @_;
    my $container_length = $self->{'container'}->length();
    return $self->{'container'}->get_all_MapFrags( 'haplotype' );
}

sub href {
    my ($self,$f)= @_;
    return "/$ENV{'ENSEMBL_SPECIES'}/$ENV{'ENSEMBL_SCRIPT'}?l=".$f->name;
}
sub zmenu {
    my ($self, $f ) = @_;
    return if $self->{'container'}->length() > ( $self->{'config'}->get( 'bacs', 'threshold_navigation' ) || 2e7) * 1000;
    my ($chr,$start, $end) = $f->name=~ /^(\w+):(\w+)-(\w+)/;
    return { 
        'caption'   => "Haplotype block",
        "Chr: $chr $start-$end" => "",
        'Jump to haplotype' => $self->href($f),
    };
}

sub image_label {
    my ($self, $f ) = @_;
    my ($chr,$start, $end) = $f->name =~ /^(\w+):(\w+)-(\w+)/;
    return ("Chr: $chr $start-$end",'overlaid');
}

1;


{'fraction_non_alphanumeric': 0.25409047160731474, 'fraction_numerical': 0.006737247353224254, 'mean_word_length': 3.589403973509934, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 35, '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': '6807949', 'n_tokens_mistral': 881, 'n_tokens_neox': 837, 'n_words': 152}