Bio::EnsEMBL::ExternalData::Mole Entry
Included librariesPackage variablesGeneral documentationMethods
Toolbar
WebCvsRaw content
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::ExternalData::Mole::DBSQL::EntryAdaptor
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Inherit
Bio::EnsEMBL::Storable
Synopsis
No synopsis!
Description
No description!
Methods
accession_obj
No description
Code
accession_version
No description
Code
comment_objs
No description
Code
data_class
No description
Code
description_obj
No description
Code
get_all_DBXrefs
No description
Code
molecule_type
No description
Code
name
No description
Code
new
No description
Code
sequence_length
No description
Code
sequence_obj
No description
Code
tax_division
No description
Code
taxonomy_obj
No description
Code
topology
No description
Code
Methods description
None available.
Methods code
accession_objdescriptionprevnextTop
sub accession_obj {
  my $self = shift;

  if(@_) {
    my $acc = shift;
    if(defined($acc) && (!ref($acc) || !$acc->isa('Bio::EnsEMBL::ExternalData::Mole::Accession'))) {
      throw('accession_obj argument must be a Bio::EnsEMBL::ExternalData::Mole::Accession');
    }
    $self->{'accession_obj'} = $acc;
  }

  return $self->{'accession_obj'};
}
accession_versiondescriptionprevnextTop
sub accession_version {
  my $self = shift;
  $self->{'accession_version'} = shift if ( @_ );
  return $self->{'accession_version'};
}
comment_objsdescriptionprevnextTop
sub comment_objs {
  my $self = shift;
  my $comments = shift;

  if( ! exists $self->{'comment_objs'} ) {
    $self->{'comment_objs'} = [];
  }

  foreach my $comment ( @$comments ) {
    if( ! $comment->isa( "Bio::EnsEMBL::ExternalData::Mole::Comment" )) {
     throw( "Argument to add_Comments has to be a Bio::EnsEMBL::ExternalData::Mole::Comment" );
    }
    push( @{$self->{'comment_objs'}}, $comment );
  }

  return $self->{'comment_objs'};
}
data_classdescriptionprevnextTop
sub data_class {
  my $self = shift;
  $self->{'data_class'} = shift if ( @_ );
  return $self->{'data_class'};
}
description_objdescriptionprevnextTop
sub description_obj {
  my $self = shift;

  if(@_) {
    my $desc = shift;
    if(defined($desc) && (!ref($desc) || !$desc->isa('Bio::EnsEMBL::ExternalData::Mole::Description'))) {
      throw('description_obj argument must be a Bio::EnsEMBL::ExternalData::Mole::Description');
    }
    $self->{'description_obj'} = $desc;
  }

  return $self->{'description_obj'};
}
get_all_DBXrefsdescriptionprevnextTop
sub get_all_DBXrefs {
  my ($self) = @_;
  if (!defined $self->{'dbxref_objs'} && defined $self->adaptor()) {
    $self->{'dbxref_objs'} = $self->adaptor()->db()->get_DBXrefAdaptor()->fetch_all_by_Entry($self);
  }
  return $self->{'dbxref_objs'};
}
molecule_typedescriptionprevnextTop
sub molecule_type {
  my $self = shift;
  $self->{'molecule_type'} = shift if ( @_ );
  return $self->{'molecule_type'};
}
namedescriptionprevnextTop
sub name {
  my $self = shift;
  $self->{'name'} = shift if ( @_ );
  return $self->{'name'};
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;

  my $class = ref($caller) || $caller;
  my $self = $class->SUPER::new(@_);
  
  my ($dbid, $accession_version, 
      $name, $topology, $molecule_type,
      $data_class, $tax_division, $sequence_length,
      $accession_obj, $dbxref_objs, $comment_objs,
      $description_obj,$sequence_obj, $taxonomy_obj) =  
	  rearrange([qw(DBID
	                ACCESSION_VERSION	
                        NAME
                        TOPOLOGY
                        MOLECULE_TYPE
                        DATA_CLASS
                        TAX_DIVISION 
                        SEQUENCE_LENGTH
                        ACCESSION_OBJ
                        DBXREF_OBJS
                        COMMENT_OBJS
                        DESCRIPTION_OBJ
                        SEQUENCE_OBJ
                        TAXONOMY_OBJ
			)],@_);

  $self->dbID              ( $dbid );
  $self->accession_version ( $accession_version );
  $self->name              ( $name );
  $self->topology          ( $topology );
  $self->molecule_type     ( $molecule_type );
  $self->data_class        ( $data_class );
  $self->tax_division      ( $tax_division );
  $self->sequence_length   ( $sequence_length ) if (defined $sequence_length);

  if(!ref($accession_obj) || !$accession_obj->isa('Bio::EnsEMBL::ExternalData::Mole::Accession')) {
    throw('-ACCESSION_OBJ argument must be a Bio::EnsEMBL::ExternalData::Mole::Accession not '.
          $accession_obj);
  }
  $self->accession_obj($accession_obj);

  if ($dbxref_objs) {
    $self->{'dbxref_objs'} = $dbxref_objs;
  } else {
    $self->{'dbxref_objs'} = [];
  }

  if ($comment_objs) {
    $self->{'comment_objs'} = $comment_objs;
  } else {
    $self->{'comment_objs'} = [];
  }

  if (defined $description_obj) { 
    if(!ref($description_obj) || !$description_obj->isa('Bio::EnsEMBL::ExternalData::Mole::Description')) {
      throw('-DESCRIPTION_OBJ argument must be a Bio::EnsEMBL::ExternalData::Mole::Description not '.
            $description_obj);
    }
    $self->description_obj($description_obj);
  } else {
    warning("No description object for Entry ".$self->accession_version);
  }

  if (defined $sequence_obj) {
    if(!ref($sequence_obj) || !$sequence_obj->isa('Bio::EnsEMBL::ExternalData::Mole::Sequence')) {
      throw('-SEQUENCE_OBJ argument must be a Bio::EnsEMBL::ExternalData::Mole::Sequence not '.
            $sequence_obj);
    }
    $self->sequence_obj($sequence_obj);
  } else {
    warning("No sequence object for Entry ".$self->accession_version);
  }

  if (defined $taxonomy_obj) {
    if(!ref($taxonomy_obj) || !$taxonomy_obj->isa('Bio::EnsEMBL::ExternalData::Mole::Taxonomy')) {
      throw('-DESCRIPTION_OBJ argument must be a Bio::EnsEMBL::ExternalData::Mole::Taxonomy not '.
            $taxonomy_obj);
    }
    $self->taxonomy_obj($taxonomy_obj);
  } else {
    warning("No taxonomy object for Entry ".$self->accession_version);
  }
  return $self; # success - we hope!
}
sequence_lengthdescriptionprevnextTop
sub sequence_length {
  my $self = shift;
  $self->{'sequence_length'} = shift if ( @_ );
  return $self->{'sequence_length'};
}
sequence_objdescriptionprevnextTop
sub sequence_obj {
  my $self = shift;

  if(@_) {
    my $seq = shift;
    if(defined($seq) && (!ref($seq) || !$seq->isa('Bio::EnsEMBL::ExternalData::Mole::Sequence'))) {
      throw('sequence_obj argument must be a Bio::EnsEMBL::ExternalData::Mole::Sequence');
    }
    $self->{'sequence_obj'} = $seq;
  }

  return $self->{'sequence_obj'};
}
tax_divisiondescriptionprevnextTop
sub tax_division {
  my $self = shift;
  $self->{'tax_division'} = shift if ( @_ );
  return $self->{'tax_division'};
}
taxonomy_objdescriptionprevnextTop
sub taxonomy_obj {
  my $self = shift;

  if(@_) {
    my $taxonomy = shift;
    if(defined($taxonomy) && (!ref($taxonomy) || !$taxonomy->isa('Bio::EnsEMBL::ExternalData::Mole::Taxonomy'))) {
      throw('taxonomy_obj argument must be a Bio::EnsEMBL::ExternalData::Mole::Taxonomy');
    }
    $self->{'taxonomy_obj'} = $taxonomy;
  }

  return $self->{'taxonomy_obj'};
}
1;
}
topologydescriptionprevnextTop
sub topology {
  my $self = shift;
  $self->{'topology'} = shift if ( @_ );
  return $self->{'topology'};
}
General documentation
No general documentation available.