| 1 | package Bio::WGS2NCBI::MrnaFeature; | ||
| 2 | use Bio::WGS2NCBI::Logger; | ||
| 3 | use Bio::WGS2NCBI::StrandedFeature; | ||
| 4 | use base 'Bio::WGS2NCBI::StrandedFeature'; | ||
| 5 | |||
| 6 | =head1 NAME | ||
| 7 | |||
| 8 | Bio::WGS2NCBI::MrnaFeature - mRNA feature | ||
| 9 | |||
| 10 | =head1 DESCRIPTION | ||
| 11 | |||
| 12 | Objects of this class represent an mRNA feature for a gene. | ||
| 13 | |||
| 14 | =head1 SEE ALSO | ||
| 15 | |||
| 16 | L<Bio::WGS2NCBI::StrandedFeature> | ||
| 17 | |||
| 18 | =head1 METHODS | ||
| 19 | |||
| 20 | =over | ||
| 21 | |||
| 22 | =item new() | ||
| 23 | |||
| 24 | Returns a new mRNA feature. Requires the arguments 'product', 'protein_id' and | ||
| 25 | 'transcript_id', for example: | ||
| 26 | |||
| 27 | my $mrna = Bio::WGS2NCBI::MrnaFeature->new( | ||
| 28 | product => $product, | ||
| 29 | protein_id => $protein_id, | ||
| 30 | transcript_id => $transcript_id, | ||
| 31 | ); | ||
| 32 | |||
| 33 | =cut | ||
| 34 | |||
| 35 | sub new { | ||
| 36 | my $class = shift; | ||
| 37 | my %args = @_; | ||
| 38 | if ( not $args{'product'} or not $args{'protein_id'} or not $args{'transcript_id'} ) { | ||
| 39 | DEBUG "need product, protein_id and transcript_id, product_id"; | ||
| 40 | } | ||
| 41 | $class->SUPER::new(%args); | ||
| 42 | } | ||
| 43 | |||
| 44 | =item qualifiers() | ||
| 45 | |||
| 46 | Returns the feature qualifiers for mRNA features, i.e. 'product', 'protein_id' and | ||
| 47 | 'transcript_id' | ||
| 48 | |||
| 49 | =cut | ||
| 50 | |||
| 51 | sub qualifiers { qw(product protein_id transcript_id) } | ||
| 52 | |||
| 53 | sub product { | ||
| 54 | my $self = shift; | ||
| 55 | $self->{'product'} = shift if @_; | ||
| 56 | return $self->{'product'}; | ||
| 57 | } | ||
| 58 | |||
| 59 | sub protein_id { | ||
| 60 | my $self = shift; | ||
| 61 | $self->{'protein_id'} = shift if @_; | ||
| 62 | return $self->{'protein_id'}; | ||
| 63 | } | ||
| 64 | |||
| 65 | sub transcript_id { | ||
| 66 | my $self = shift; | ||
| 67 | $self->{'transcript_id'} = shift if @_; | ||
| 68 | return $self->{'transcript_id'}; | ||
| 69 | } | ||
| 70 | |||
| 71 | =back | ||
| 72 | |||
| 73 | =cut | ||
| 74 | |||
| 75 | 1; |