From 755d03a6f1335f79b2cdcc71ec15204f317bd549 Mon Sep 17 00:00:00 2001 From: Eugene Kulesha <ek@ebi.ac.uk> Date: Tue, 29 Jul 2008 09:49:28 +0000 Subject: [PATCH] translation id can be passed when a new ProteinFeature is created so it can be later stored in the database (protein_feature table) --- modules/Bio/EnsEMBL/ProteinFeature.pm | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/modules/Bio/EnsEMBL/ProteinFeature.pm b/modules/Bio/EnsEMBL/ProteinFeature.pm index 9155e18edb..ddc09f3f05 100755 --- a/modules/Bio/EnsEMBL/ProteinFeature.pm +++ b/modules/Bio/EnsEMBL/ProteinFeature.pm @@ -68,7 +68,7 @@ sub new { my $class = ref($caller) || $caller; - my ($idesc, $interpro_ac) = rearrange(['IDESC', 'INTERPRO_AC'], @_); + my ($idesc, $interpro_ac, $translation_id) = rearrange(['IDESC', 'INTERPRO_AC', 'TRANSLATION_ID'], @_); my $self = $class->SUPER::new(@_); @@ -76,6 +76,7 @@ sub new { $self->{'strand'} = 0; $self->{'idesc'} = $idesc || ''; $self->{'interpro_ac'} = $interpro_ac || ''; + $self->{'translation_id'} = $translation_id || ''; return $self; } @@ -140,4 +141,23 @@ sub interpro_ac{ } +=head2 idesc + + Arg [1] : (optional) string The interpro description + Example : print $protein_feature->idesc(); + Description: Getter/Setter for the interpro description of this protein + feature. + Returntype : string + Exceptions : none + Caller : general + Status : Stable + +=cut + +sub translation_id{ + my $self = shift; + $self->{'translation_id'} = shift if(@_); + return $self->{'translation_id'}; +} + 1; -- GitLab