Skip to content
Snippets Groups Projects
Commit 294957fc authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

In new(): Document TRANSLATION_ID.

In translation_id(): Update for this method.

All from Michael S.
parent 0b480921
No related branches found
No related tags found
No related merge requests found
...@@ -55,12 +55,17 @@ use vars qw(@ISA); ...@@ -55,12 +55,17 @@ use vars qw(@ISA);
=head2 new =head2 new
Arg [IDESC] : (optional) string An interpro description Arg [IDESC] : (optional) string An interpro description
Arg [INTERPRO_AC] : (optional) string An interpro accession Arg [INTERPRO_AC] : (optional) string An interpro accession
Arg [...] : named arguments to FeaturePair superclass Arg [TRANSLATION_ID] : (optional) integer A translation dbID
Example : $pf = Bio::EnsEMBL::ProteinFeature->new(-IDESC => $idesc, Arg [...] : named arguments to FeaturePair superclass
-INTERPRO_AC => $iac, Example :
@fp_args);
$pf =
Bio::EnsEMBL::ProteinFeature->new( -IDESC => $idesc,
-INTERPRO_AC => $iac,
@fp_args );
Description: Instantiates a Bio::EnsEMBL::ProteinFeature Description: Instantiates a Bio::EnsEMBL::ProteinFeature
Returntype : Bio::EnsEMBL::FeaturePair Returntype : Bio::EnsEMBL::FeaturePair
Exceptions : none Exceptions : none
...@@ -70,18 +75,19 @@ use vars qw(@ISA); ...@@ -70,18 +75,19 @@ use vars qw(@ISA);
=cut =cut
sub new { sub new {
my $caller = shift; my $proto = shift;
my $class = ref($caller) || $caller; my $class = ref($proto) || $proto;
my ($idesc, $interpro_ac, $translation_id) = rearrange(['IDESC', 'INTERPRO_AC', 'TRANSLATION_ID'], @_); my ( $idesc, $interpro_ac, $translation_id ) =
rearrange( [ 'IDESC', 'INTERPRO_AC', 'TRANSLATION_ID' ], @_ );
my $self = $class->SUPER::new(@_); my $self = $class->SUPER::new(@_);
#the strand of protein features is always 0 # the strand of protein features is always 0
$self->{'strand'} = 0; $self->{'strand'} = 0;
$self->{'idesc'} = $idesc || ''; $self->{'idesc'} = $idesc || '';
$self->{'interpro_ac'} = $interpro_ac || ''; $self->{'interpro_ac'} = $interpro_ac || '';
$self->{'translation_id'} = $translation_id || ''; $self->{'translation_id'} = $translation_id || '';
return $self; return $self;
...@@ -110,7 +116,7 @@ sub strand { ...@@ -110,7 +116,7 @@ sub strand {
Arg [1] : (optional) string The interpro description Arg [1] : (optional) string The interpro description
Example : print $protein_feature->idesc(); Example : print $protein_feature->idesc();
Description: Getter/Setter for the interpro description of this protein Description: Getter/Setter for the interpro description of this protein
feature. feature.
Returntype : string Returntype : string
Exceptions : none Exceptions : none
...@@ -131,7 +137,7 @@ sub idesc{ ...@@ -131,7 +137,7 @@ sub idesc{
Arg [1] : (optional) string The interpro accession Arg [1] : (optional) string The interpro accession
Example : print $protein_feature->interpro_ac(); Example : print $protein_feature->interpro_ac();
Description: Getter/Setter for the interpro accession of this protein Description: Getter/Setter for the interpro accession of this protein
feature. feature.
Returntype : string Returntype : string
Exceptions : none Exceptions : none
...@@ -147,11 +153,11 @@ sub interpro_ac{ ...@@ -147,11 +153,11 @@ sub interpro_ac{
} }
=head2 idesc =head2 translation_id
Arg [1] : (optional) string The interpro description Arg [1] : (optional) integer The dbID of the translation
Example : print $protein_feature->idesc(); Example : print $protein_feature->translation_id();
Description: Getter/Setter for the interpro description of this protein Description: Getter/Setter for the translation dbID of this protein
feature. feature.
Returntype : string Returntype : string
Exceptions : none Exceptions : none
...@@ -160,9 +166,9 @@ sub interpro_ac{ ...@@ -160,9 +166,9 @@ sub interpro_ac{
=cut =cut
sub translation_id{ sub translation_id {
my $self = shift; my $self = shift;
$self->{'translation_id'} = shift if(@_); $self->{'translation_id'} = shift if (@_);
return $self->{'translation_id'}; return $self->{'translation_id'};
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment