From f5ca85a33c81a4fb36f6b74800ecf15b62c5e1a6 Mon Sep 17 00:00:00 2001 From: Eugene Kulesha <ek@ebi.ac.uk> Date: Tue, 29 Jul 2008 09:48:23 +0000 Subject: [PATCH] added support for extra_data column in dna_align_feature and protein_feature tables --- modules/Bio/EnsEMBL/FeaturePair.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/modules/Bio/EnsEMBL/FeaturePair.pm b/modules/Bio/EnsEMBL/FeaturePair.pm index 3987b38c00..21a066a236 100755 --- a/modules/Bio/EnsEMBL/FeaturePair.pm +++ b/modules/Bio/EnsEMBL/FeaturePair.pm @@ -119,10 +119,10 @@ sub new { my $self = $class->SUPER::new(@_); my ($hstart,$hend,$hstrand,$percent_id,$score, $species, $hspecies, - $p_value, $hseqname, $f1,$f2, $coverage, $hcoverage, $group_id,$level_id, $external_db_id) = + $p_value, $hseqname, $f1,$f2, $coverage, $hcoverage, $group_id,$level_id, $external_db_id, $extra_data) = rearrange(['HSTART','HEND','HSTRAND','PERCENT_ID','SCORE','SPECIES', 'HSPECIES', 'P_VALUE', 'HSEQNAME', 'FEATURE1','FEATURE2', - 'COVERAGE', 'HCOVERAGE', 'GROUP_ID','LEVEL_ID', 'EXTERNAL_DB_ID'], @_); + 'COVERAGE', 'HCOVERAGE', 'GROUP_ID','LEVEL_ID', 'EXTERNAL_DB_ID', 'EXTRA_DATA'], @_); if(defined($hstart) && defined($hend) && ($hend < $hstart)) { throw('HSTART must be less than or equal to HEND'); @@ -146,6 +146,8 @@ sub new { $self->{'group_id'} = $group_id; $self->{'level_id'} = $level_id; $self->{'external_db_id'} = $external_db_id; + $self->{'extra_data'} = $extra_data; + # # Feature1 and Feature2 arg handling for backwards compatibility # @@ -921,7 +923,10 @@ sub hend_phase { return $self->{_hend_phase}; } - - +sub extra_data { + my $self = shift; + $self->{'extra_data'} = shift if(@_); + return $self->{'extra_data'}; +} 1; -- GitLab