<commit_before>#
# EnsEMBL module for Bio::EnsEMBL::SNP
#
# Cared for by <NAME>
#
# Copyright EMBL/EBI
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::SNP

=head1 SYNOPSIS

    $snp = new Bio::EnsEMBL::SNP
                (-start => 10, 
		 -end => 10,
		 -strand => 1,
		 -source => 'The SNP Consortium',
		 -score  => 99,           #new meaning
		 -status = > 'suspected', #new
		 -alleles => 't|c'        #new
		 );

   # add it to an annotated sequence

   $annseq->add_SeqFeature($feat);



=head1 DESCRIPTION

This class was written because the EnsEMBL::ExternalData::Variation object
is way too slow.  There was simply too chaining to bioperl methods many,
many layers deep.  This object behaves like a Variation but has a 
much faster constructor, and faster accessors for the relevant methods
needed by the web.

=head1 CONTACT

<NAME> <<EMAIL>>

=cut

=head1 APPENDIX

The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _

=cut

# Let the code begin...

package Bio::EnsEMBL::SNP;
use vars qw(@ISA);
use strict;

# Object preamble - inheritance

use Bio::EnsEMBL::ExternalData::Variation;

@ISA = qw( Bio::EnsEMBL::ExternalData::Variation );


sub new_fast {
  my $class = shift;
  my $hashref = shift;

  return bless $hashref, $class;
}

sub position {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_start} = $arg;
    $self->{_gsf_end}   = $arg;
  }

  return $self->{_gsf_start};
}

sub start {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_start} = $arg;
  }
  
  return $self->{_gsf_start};
}

sub end {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_end} = $arg;
  }

  return $self->{_gsf_end};
}


sub source {
   my ($self, $arg) = @_;

   if(defined $arg) {
     $self->{_source} = $arg;
   }

   return $self->{_source};
 }

sub score {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_score} = $arg;
  }

  return $self->{_gsf_score};
}


sub source_tag {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_source_tag} = $arg;
  }

  return $self->{_source_tag};
}


1;
<commit_msg>added dbID attribute<commit_after>#
# EnsEMBL module for Bio::EnsEMBL::SNP
#
# Cared for by <NAME>
#
# Copyright EMBL/EBI
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::SNP

=head1 SYNOPSIS

    $snp = new Bio::EnsEMBL::SNP
                (-start => 10, 
		 -end => 10,
		 -strand => 1,
		 -source => 'The SNP Consortium',
		 -score  => 99,           #new meaning
		 -status = > 'suspected', #new
		 -alleles => 't|c'        #new
		 );

   # add it to an annotated sequence

   $annseq->add_SeqFeature($feat);



=head1 DESCRIPTION

This class was written because the EnsEMBL::ExternalData::Variation object
is way too slow.  There was simply too chaining to bioperl methods many,
many layers deep.  This object behaves like a Variation but has a 
much faster constructor, and faster accessors for the relevant methods
needed by the web.

=head1 CONTACT

<NAME> <<EMAIL>>

=cut

=head1 APPENDIX

The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _

=cut

# Let the code begin...

package Bio::EnsEMBL::SNP;
use vars qw(@ISA);
use strict;

# Object preamble - inheritance

use Bio::EnsEMBL::ExternalData::Variation;

@ISA = qw( Bio::EnsEMBL::ExternalData::Variation );


sub new_fast {
  my $class = shift;
  my $hashref = shift;

  return bless $hashref, $class;
}

sub dbID {
  my $self = shift;
  
  if(@_) {
    $self->{'dbID'} = shift;
  }

  return $self->{'dbID'};
}

sub position {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_start} = $arg;
    $self->{_gsf_end}   = $arg;
  }

  return $self->{_gsf_start};
}

sub start {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_start} = $arg;
  }
  
  return $self->{_gsf_start};
}

sub end {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_end} = $arg;
  }

  return $self->{_gsf_end};
}


sub source {
   my ($self, $arg) = @_;

   if(defined $arg) {
     $self->{_source} = $arg;
   }

   return $self->{_source};
 }

sub score {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_gsf_score} = $arg;
  }

  return $self->{_gsf_score};
}


sub source_tag {
  my ($self, $arg) = @_;

  if(defined $arg) {
    $self->{_source_tag} = $arg;
  }

  return $self->{_source_tag};
}


1;

{'fraction_non_alphanumeric': 0.14944529040678703, 'fraction_numerical': 0.005655862519034153, 'mean_word_length': 3.0262697022767076, 'pattern_counts': {'":': 0, '<': 11, '<?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': '5971747', 'n_tokens_mistral': 1877, 'n_tokens_neox': 1715, 'n_words': 492}