Skip to content
Snippets Groups Projects
Commit cf89bb7b authored by Web Admin's avatar Web Admin
Browse files

blast fixes and moveing new_fast from ???DnaA... to BaseAlignFeature

parent 4fd50dc9
No related branches found
No related tags found
No related merge requests found
......@@ -132,6 +132,29 @@ sub new {
}
=head2 new_fast
Arg [1] : hashref $hashref
A hashref which will be blessed into a PepDnaAlignFeature.
Example : none
Description: This allows for very fast object creation when a large number
of PepDnaAlignFeatures needs to be created. This is a bit of
a hack but necessary when thousands of features need to be
generated within a couple of seconds for web display. It is
not recommended that this method be called unless you know what
you are doing. It requires knowledge of the internals of this
class and its superclasses.
Returntype : Bio::EnsEMBL::BaseAlignFeature
Exceptions : none
Caller : none currently
=cut
sub new_fast {
my ($class, $hashref) = @_;
return bless $hashref, $class;
}
=head2 cigar_string
......
......@@ -26,31 +26,6 @@ use strict;
@ISA = qw( Bio::EnsEMBL::BaseAlignFeature );
=head2 new_fast
Arg [1] : hashref $hashref
A hashref which will be blessed into a DnaDnaAlignFeature.
Example : none
Description: This allows for very fast object creation when a large number
of DnaAlignFeatures needs to be created. This is a bit of
a hack but necessary when thousands of features need to be
generated within a couple of seconds for web display. It is
not recommended that this method be called unless you know what
you are doing. It requires knowledge of the internals of this
class and its superclasses.
Returntype : Bio::EnsEMBL::DnaDnaAlignFeature
Exceptions : none
Caller : Bio::EnsEMBL::DBSQL::DnaAlignFeatureAdaptor
=cut
sub new_fast {
my ($class, $hashref) = @_;
return bless $hashref, $class;
}
=head2 restrict_between_positions
Arg 1 : int $start
......
......@@ -64,8 +64,8 @@ WHERE ticket = ? );
AND chr_name = ? );
my $RANGE_SQL = qq(
AND chr_start >= ?
AND chr_end <= ? );
AND chr_start <= ?
AND chr_end >= ? );
my $q = $SQL;
my @binded = ( $ticket );
......@@ -76,9 +76,11 @@ AND chr_end <= ? );
if( $chr_start && $chr_end ){
$q .= $RANGE_SQL;
push @binded, $chr_start, $chr_end;
push @binded, $chr_end, $chr_start;
}
}
warn( "$q: ", join( ', ',@binded ) );
my $sth = $self->db->db_handle->prepare($q);
my $rv = $sth->execute( @binded ) || $self->throw( $sth->errstr );
......
......@@ -24,32 +24,6 @@ use strict;
@ISA = qw( Bio::EnsEMBL::BaseAlignFeature );
=head2 new_fast
Arg [1] : hashref $hashref
A hashref which will be blessed into a PepDnaAlignFeature.
Example : none
Description: This allows for very fast object creation when a large number
of PepDnaAlignFeatures needs to be created. This is a bit of
a hack but necessary when thousands of features need to be
generated within a couple of seconds for web display. It is
not recommended that this method be called unless you know what
you are doing. It requires knowledge of the internals of this
class and its superclasses.
Returntype : Bio::EnsEMBL::PepDnaAlignFeature
Exceptions : none
Caller : none currently
=cut
sub new_fast {
my ($class, $hashref) = @_;
return bless $hashref, $class;
}
sub transform {
my $self = shift;
......
......@@ -1049,11 +1049,10 @@ sub get_all_SearchFeatures {
my $sfa = $self->adaptor()->db()->get_db_adaptor('blast');
my $offset = $self->chr_start-1;
warn $sfa,"--",$ticket;
my $features = $sfa ? $sfa->get_all_SearchFeatures($ticket) : [];#, $self->chr_name, $self->chr_start, $self->chr_end) : [];
my $features = $sfa ? $sfa->get_all_SearchFeatures($ticket, $self->chr_name, $self->chr_start, $self->chr_end) : [];
warn join(', ', @$features );
foreach( @$features ) {
warn ( $_ );
$_->start( $_->start-$offset );
$_->end( $_->end-$offset );
};
......
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