<commit_before>=head1 LICENSE

 Copyright (c) 1999-2011 The European Bioinformatics Institute and
 Genome Research Limited.  All rights reserved.

 This software is distributed under a modified Apache license.
 For license details, please see

   http://www.ensembl.org/info/about/code_licence.html

=head1 CONTACT

 Please email comments or questions to the public Ensembl
 developers list at <<EMAIL>>.

 Questions may also be sent to the Ensembl help desk at
 <<EMAIL>>.

=cut

package Bio::EnsEMBL::Variation::OverlapConsequence;

use strict;
use warnings;

use Bio::EnsEMBL::Variation::Utils::VariationEffect;

sub new {
    my $class = shift;
    return bless {}, $class;
}

sub new_fast {
    my ($class, $hashref) = @_;
    return bless $hashref, $class;
}

sub SO_accession {
    my ($self, $SO_accession) = @_;
    $self->{SO_accession} = $SO_accession if $SO_accession;
    return $self->{SO_accession};
}

sub SO_term {
    my ($self, $SO_term) = @_;
    $self->{SO_term} = $SO_term if $SO_term;
    return $self->{SO_term};
}

sub feature_SO_term {
    my ($self, $feature_SO_term) = @_;
    $self->{feature_SO_term} = $feature_SO_term if $feature_SO_term;
    return $self->{feature_SO_term};
}

sub feature_class {
    my ($self, $feature_class) = @_;
    $self->{feature_class} = $feature_class if $feature_class;
    return $self->{feature_class} || '';
}

sub predicate {
    my ($self, $predicate) = @_;
    
    $self->{predicate} = $predicate if $predicate;
    
    if ($self->{predicate} && ref $self->{predicate} ne 'CODE') {
        my $name = $self->{predicate};

        if (defined &$name && $name =~ /^Bio::EnsEMBL::Variation::Utils::VariationEffect/) {
            $self->{predicate} = \&$name;
        }
        else {
            die "Can't find a subroutine called $name in the VariationEffect module?";
        }
    }
    
    return $self->{predicate};
}

sub rank {
    my ($self, $rank) = @_;
    $self->{rank} = $rank if $rank;
    return $self->{rank};
}

sub display_term {
    my ($self, $display_term) = @_;
    $self->{display_term} = $display_term if $display_term;
    return $self->{display_term} || $self->SO_term;
}

sub NCBI_term {
    my ($self, $NCBI_term) = @_;
    $self->{NCBI_term} = $NCBI_term if $NCBI_term;
    return $self->{NCBI_term};
}

sub is_definitive {
    my ($self, $is_definitive) = @_;
    $self->{is_definitive} = $is_definitive if defined $is_definitive;
    return $self->{is_definitive};
}

sub get_all_parent_SO_terms {
    my ($self) = @_;
    
    if (my $adap = $self->{adaptor}) {
        if (my $goa = $adap->db->get_SOTermAdaptor) {<commit_msg>add description and label methods<commit_after>=head1 LICENSE

 Copyright (c) 1999-2011 The European Bioinformatics Institute and
 Genome Research Limited.  All rights reserved.

 This software is distributed under a modified Apache license.
 For license details, please see

   http://www.ensembl.org/info/about/code_licence.html

=head1 CONTACT

 Please email comments or questions to the public Ensembl
 developers list at <<EMAIL>>.

 Questions may also be sent to the Ensembl help desk at
 <<EMAIL>>.

=cut

package Bio::EnsEMBL::Variation::OverlapConsequence;

use strict;
use warnings;

use Bio::EnsEMBL::Variation::Utils::VariationEffect;

sub new {
    my $class = shift;
    return bless {}, $class;
}

sub new_fast {
    my ($class, $hashref) = @_;
    return bless $hashref, $class;
}

sub SO_accession {
    my ($self, $SO_accession) = @_;
    $self->{SO_accession} = $SO_accession if $SO_accession;
    return $self->{SO_accession};
}

sub SO_term {
    my ($self, $SO_term) = @_;
    $self->{SO_term} = $SO_term if $SO_term;
    return $self->{SO_term};
}

sub feature_SO_term {
    my ($self, $feature_SO_term) = @_;
    $self->{feature_SO_term} = $feature_SO_term if $feature_SO_term;
    return $self->{feature_SO_term};
}

sub feature_class {
    my ($self, $feature_class) = @_;
    $self->{feature_class} = $feature_class if $feature_class;
    return $self->{feature_class} || '';
}

sub predicate {
    my ($self, $predicate) = @_;
    
    $self->{predicate} = $predicate if $predicate;
    
    if ($self->{predicate} && ref $self->{predicate} ne 'CODE') {
        my $name = $self->{predicate};

        if (defined &$name && $name =~ /^Bio::EnsEMBL::Variation::Utils::VariationEffect/) {
            $self->{predicate} = \&$name;
        }
        else {
            die "Can't find a subroutine called $name in the VariationEffect module?";
        }
    }
    
    return $self->{predicate};
}

sub rank {
    my ($self, $rank) = @_;
    $self->{rank} = $rank if $rank;
    return $self->{rank};
}

sub display_term {
    my ($self, $display_term) = @_;
    $self->{display_term} = $display_term if $display_term;
    return $self->{display_term} || $self->SO_term;
}

sub NCBI_term {
    my ($self, $NCBI_term) = @_;
    $self->{NCBI_term} = $NCBI_term if $NCBI_term;
    return $self->{NCBI_term};
}

sub description {
    my ($self, $description) = @_;
    $self->{description} = $description if $description;
    return $self->{description};
}

sub label {
    my ($self, $label) = @_;
    $self->{label} = $label if $label;
    return $self->{label};
}

sub is_definitive {
    my ($self, $is_definitive) = @_;
    $self->{is_definitive} = $is_definitive if defined $is_definitive;
    return $self->{is_definitive};
}

sub get_all_parent_SO_terms {
    my ($self) = @_;
    
    if (my $adap = $self->{adaptor}) {
        if (my $goa = $adap->db->get_SOTermAdaptor) {
{'fraction_non_alphanumeric': 0.15412445730824892, 'fraction_numerical': 0.00361794500723589, 'mean_word_length': 3.309431021044427, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 67, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4147829', 'n_tokens_mistral': 2023, 'n_tokens_neox': 1968, 'n_words': 476}