NAME
GenOO::Gene - Gene object
SYNOPSIS
# This object represents a gene (collection of transcripts)
# It extends the L<GenOO::GenomicRegion> object
# To initialize
my $gene = GenOO::Gene->new(
name => undef, #required
species => undef,
strand => undef, #can be inferred from transcripts
chromosome => undef, #can be inferred from transcripts
start => undef, #can be inferred from transcripts
stop => undef, #can be inferred from transcripts
copy_number => undef, #defaults to 1
sequence => undef,
description => undef,
transcripts => reference to an array of L<GenOO::Transcript> objects
);
DESCRIPTION
GenOO::Gene describes a gene. A gene is defined as a genomic region (it has the strand, chromosome, start and stop
attributes required by L<GenOO::GenomicRegion>) as well as collection of L<GenOO::Transcript> objects. The genomic
location attributes can be inferred by the locations of the contained transcripts. The start position of the gene
will be the smallest coordinate of all the contained transcripts etc.
Whenever a transcript is added to a gene object the genomic coordinates of the gene are automatically updated.
It is a good idea NOT to set the genomic location of the gene directly but to let it be inferred by the transcripts.
EXAMPLES # Create a new gene object my $gene = GenOO::Gene->new( name => '2310016C08Rik', description => 'hypoxia-inducible gene 2 protein isoform 2', transcripts => [ GenOO::Transcript->new( id => 'uc012eiw.1', strand => 1, chromosome => 'chr6', start => 29222487, stop => 29225448, coding_start => 29222571, coding_stop => 29224899, biotype => 'coding', splice_starts => [29222487,29224649], splice_stops => [29222607,29225448] ), GenOO::Transcript->new( id => 'uc009bdd.2', strand => 1, chromosome => 'chr6', start => 29222625, stop => 29225448, coding_start => 29224705, coding_stop => 29224899, biotype => 'coding', splice_starts => [29222625,29224649], splice_stops => [29222809,29225448] ) ], );
# Get gene information
$gene->strand; # 1
$gene->chromosome; # chr6
$gene->start; # 29222487
$gene->stop; # 29225448