Commit e8cb5843 authored by Alistair Rust's avatar Alistair Rust
Browse files

- Removed delete_by_RawContig_id method.

- Replaced with remove_RawContig.
parent 4ed92b29
...@@ -499,26 +499,26 @@ sub remove { ...@@ -499,26 +499,26 @@ sub remove {
=head2 delete_by_RawContig_id =head2 remove_RawContig
Arg [1] : string $contig_id Arg [1] : Bio::Ensembl::RawContig $contig
Example : $feature_adaptor->delete_by_RawContig_id($contig_id); Example : $feature_adaptor->remove_RawContig($contig);
Description: This removes a feature from the database. The table the Description: This removes features from the database which lie on a removed
feature is removed from is defined by the abstract method contig. The table the features are removed from is defined by
_tablename, and the primary key of the table is assumed the abstract method_tablename, and the primary key of the table
to be contig_id. is assumed to be contig_id.
Returntype : none Returntype : none
Exceptions : thrown if no contig_id is supplied Exceptions : thrown if no contig is supplied
Caller : general Caller : general
=cut =cut
sub delete_by_RawContig_id { sub remove_RawContig {
my ($self, $contig_id) = @_; my ($self, $contig) = @_;
unless($contig_id) { unless($contig) {
$self->throw("BaseFeatureAdaptor::delete_by_RawContig_id - no contig_id defined: ". $self->throw("BaseFeatureAdaptor::remove - no contig supplied: ".
"Deletion of feature failed."); "Deletion of features failed.");
} }
my $table = $self->_tablename(); my $table = $self->_tablename();
...@@ -537,7 +537,7 @@ sub delete_by_RawContig_id { ...@@ -537,7 +537,7 @@ sub delete_by_RawContig_id {
my ($actual_table) = $table_name =~ /(^\w+)/; # lose the table alias, if there is one my ($actual_table) = $table_name =~ /(^\w+)/; # lose the table alias, if there is one
my $sth = $self->prepare("DELETE FROM $actual_table WHERE contig_id = ?"); my $sth = $self->prepare("DELETE FROM $actual_table WHERE contig_id = ?");
$sth->execute($contig_id); $sth->execute($contig->dbID);
} }
return; return;
......
Markdown is supported
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