Skip to content
Snippets Groups Projects
Commit 8adc78e5 authored by Andy Yates's avatar Andy Yates
Browse files

Now can search DBs more than just otherfeatures

parent dc480578
No related branches found
No related tags found
No related merge requests found
......@@ -2717,13 +2717,12 @@ my %stable_id_stmts = (
sub get_species_and_object_type {
my ($self, $stable_id, $known_type, $known_species, $known_db_type) = @_;
my ($self, $stable_id, $known_type, $known_species, $known_db_type, $force_long_lookup) = @_;
#get the stable_id lookup database adaptor
my $stable_ids_dba = $self->get_DBAdaptor("multi", "stable_ids", 1);
if ($stable_ids_dba) {
if ($stable_ids_dba && ! $force_long_lookup) {
my $statement = 'SELECT name, object_type, db_type FROM stable_id_lookup join species using(species_id) WHERE stable_id = ?';
if ($known_species) {
......@@ -2758,19 +2757,22 @@ sub get_species_and_object_type {
return ($species ,$type, $db_type);
} else {
if (defined $known_type && !exists $stable_id_stmts{lc $known_type}) {
return;
}
my @types = defined $known_type ? ($known_type) : ('Gene', 'Transcript', 'Translation', 'Exon', 'Operon', 'OperonTranscript');
if ($known_db_type && $known_db_type ne 'core' && $known_db_type ne 'Core' ) {
return;
if(! $known_db_type) {
$known_db_type = 'core';
}
warn $known_db_type;
warn $known_species;
warn $known_type;
my %get_adaptors_args;
$get_adaptors_args{'-group'} = 'Core';
$get_adaptors_args{'-group'} = $known_db_type;
if ($known_species) {
$get_adaptors_args{'-species'} = $known_species;
}
......@@ -2790,7 +2792,7 @@ sub get_species_and_object_type {
$sth->finish;
return ($species, $type, 'Core') if defined $species;
return ($species, $type, $known_db_type) if defined $species;
}
} ## end foreach my $dba ( sort { $a...})
......
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