Skip to content
Snippets Groups Projects
Commit 18ed30d1 authored by Andreas Kusalananda Kähäri's avatar Andreas Kusalananda Kähäri
Browse files

In fetch_all_by_GOTerm(), throw exception if the argument is not a GO

term.
parent f451aefc
No related branches found
No related tags found
No related merge requests found
......@@ -785,7 +785,7 @@ sub fetch_all_by_external_name {
used.
Return type : listref of Bio::EnsEMBL::Gene
Exceptions : none
Exceptions : Throws of argument is not a GO term
Caller : general
Status : Stable
......@@ -794,6 +794,13 @@ sub fetch_all_by_external_name {
sub fetch_all_by_GOTerm {
my ( $self, $term ) = @_;
if ( !ref($term)
|| !$term->isa('Bio::EnsEMBL::OntologyTerm')
|| $term->ontology() ne 'GO' )
{
throw('Argument is not a GO term');
}
my $entryAdaptor = $self->db->get_DBEntryAdaptor();
my %unique_dbIDs;
......
......@@ -480,7 +480,7 @@ sub fetch_all_by_external_name {
Transcript::transform method can be used.
Return type : listref of Bio::EnsEMBL::Transcript
Exceptions : none
Exceptions : Throws of argument is not a GO term
Caller : general
Status : Stable
......@@ -489,6 +489,13 @@ sub fetch_all_by_external_name {
sub fetch_all_by_GOTerm {
my ( $self, $term ) = @_;
if ( !ref($term)
|| !$term->isa('Bio::EnsEMBL::OntologyTerm')
|| $term->ontology() ne 'GO' )
{
throw('Argument is not a GO term');
}
my $entryAdaptor = $self->db->get_DBEntryAdaptor();
my %unique_dbIDs;
......
......@@ -227,7 +227,7 @@ sub fetch_all_by_external_name {
its descendent GO terms.
Return type : listref of Bio::EnsEMBL::Translation
Exceptions : none
Exceptions : Throws of argument is not a GO term
Caller : general
Status : Stable
......@@ -236,6 +236,13 @@ sub fetch_all_by_external_name {
sub fetch_all_by_GOTerm {
my ( $self, $term ) = @_;
if ( !ref($term)
|| !$term->isa('Bio::EnsEMBL::OntologyTerm')
|| $term->ontology() ne 'GO' )
{
throw('Argument is not a GO term');
}
my $entryAdaptor = $self->db->get_DBEntryAdaptor();
my %unique_dbIDs;
......
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