Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
Gene.pm 23.95 KiB
#
# BioPerl module for Gene
#
# Copyright Ewan Birney
#
# You may distribute this module under the same terms as perl itself

# POD documentation - main docs before the code

=head1 NAME

Bio::EnsEMBL::Gene - Object for confirmed Genes

=head1 SYNOPSIS

Confirmed genes. Basically has a set of transcripts

=head1 DESCRIPTION

A representation of a Gene within the ensembl system. A gene is basically a 
set of one or more alternative transcripts.

=head1 CONTACT

Contact the EnsEMBL development mailing list for info <ensembl-dev@ebi.ac.uk>

=cut

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

use Bio::EnsEMBL::Feature;
use Bio::EnsEMBL::Utils::Argument qw(rearrange);
use Bio::EnsEMBL::Utils::Exception qw(throw warning deprecate);


@ISA = qw(Bio::EnsEMBL::Feature);


=head2 new

  Arg [start]  : int $start
  Arg [end]    : int $end
  Arg [strand] : 1,-1 $strand
  Arg [slice]  : Bio::EnsEMBL::Slice $slice
  Example    : $gene = Bio::EnsEMBL::Gene->new();
  Description: Creates a new gene object
  Returntype : Bio::EnsEMBL::Gene
  Exceptions : none
  Caller     : general

=cut

sub new {
  my $caller = shift;

  my $class = ref($caller) || $caller;
  my $self = $class->SUPER::new(@_);

  my ( $stable_id, $version, $external_name, $type, $external_db, 
       $external_status, $display_xref, $description, $transcripts,
       $created_date, $modified_date, $confidence, $biotype, $source ) = 
    rearrange( [ 'STABLE_ID', 'VERSION', 'EXTERNAL_NAME', 'TYPE',
		 'EXTERNAL_DB', 'EXTERNAL_STATUS', 'DISPLAY_XREF', 'DESCRIPTION',
                 'TRANSCRIPTS', 'CREATED_DATE', 'MODIFIED_DATE', 
	         'CONFIDENCE', 'BIOTYPE', 'SOURCE'], @_ );

  if ($transcripts) {
    $self->{'_transcript_array'} = $transcripts;