diff --git a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm index 7f7e4b1ad57b0954750acd00c27907990d9faf10..02e1dd92e5257fca02ff491e1f2d3a04783e33c5 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SequenceAdaptor.pm @@ -41,8 +41,8 @@ use Bio::EnsEMBL::Utils::Cache; @ISA = qw(Bio::EnsEMBL::DBSQL::BaseAdaptor); -our $SEQ_CHUNK_PWR = 18; # 2^18 = approx. 250KB -our $SEQ_CACHE_SZ = 5; +our $SEQ_CHUNK_PWR = 22; # 2^18 = approx. 250KB +our $SEQ_CACHE_SZ = 10; our $SEQ_CACHE_MAX = (2 ** $SEQ_CHUNK_PWR) * $SEQ_CACHE_SZ; diff --git a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm index 32e7b5da335be932b17fce6889473a5e1effc4dd..12a87941d34a02ec3705e406125e904344676e17 100644 --- a/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm +++ b/modules/Bio/EnsEMBL/DBSQL/SliceAdaptor.pm @@ -925,7 +925,7 @@ sub fetch_by_Feature{ $size = int( ($1-100)/200 * ($fend-$fstart+1) ) if( $size =~/([\d+\.]+)%/ ); #return a new slice covering the region of the feature - return Bio::EnsEMBL::Slice->new + my $S = Bio::EnsEMBL::Slice->new (-seq_region_name => $slice->seq_region_name, -seq_region_length => $slice->seq_region_length, -coord_system => $slice->coord_system, @@ -933,6 +933,8 @@ sub fetch_by_Feature{ -end => $fend + $size, -strand => 1, -adaptor => $self); + $S->{'_raw_feature_strand'} = $feature->strand * $slice_strand if $feature->can('strand'); + return $S; } diff --git a/modules/Bio/EnsEMBL/MiscFeature.pm b/modules/Bio/EnsEMBL/MiscFeature.pm index ec419420763611b74e45ef5adeb3be11d60e3f9c..95e618251ebb34d692a427b02e59dec164ede026 100644 --- a/modules/Bio/EnsEMBL/MiscFeature.pm +++ b/modules/Bio/EnsEMBL/MiscFeature.pm @@ -240,10 +240,16 @@ sub get_all_attribute_values { my @results = map { uc( $_->code() ) eq uc( $code ) ? $_->value : () } @{$self->{'attributes'}}; return \@results; } + sub get_scalar_attribute { my $self = shift; my $code = shift; - my @results = grep { uc( $_->code() ) eq uc( $code )} @{$self->{'attributes'}}; + my @results; + if( $code eq 'name' ) { + @results = grep { uc( $_->code() ) eq 'NAME' || uc( $_->code() ) eq 'NON_REF' } @{$self->{'attributes'}}; + } else { + @results = grep { uc( $_->code() ) eq uc( $code )} @{$self->{'attributes'}}; + } return @results ? $results[0]->value() : ''; } @@ -263,6 +269,7 @@ sub get_scalar_attribute { sub display_id { my $self = shift; my ($attrib) = @{$self->get_all_Attributes('name')}; + ($attrib) = @{$self->get_all_Attributes('non_ref')} if(!$attrib); ($attrib) = @{$self->get_all_Attributes('synonym')} if(!$attrib); if( defined $attrib ) { return $attrib->value();