Commit 799133f9 authored by Andy Yates's avatar Andy Yates
Browse files

[ENSCORESW-377]. Fixing the seq region synonym as mentioned by Steve S. Also...

[ENSCORESW-377]. Fixing the seq region synonym as mentioned by Steve S. Also added a test case which looks for synonyms with a coordinate system not as before which only worked when we had no coordinate system)
parent fa5fa0db
......@@ -301,9 +301,9 @@ sub fetch_by_region {
if($syn_sql_sth->fetch){
$syn_sql_sth->finish;
if (not defined($cs)) {
if ((not defined($cs)) || ($cs->name eq $new_coord_system)) {
return $self->fetch_by_region($new_coord_system, $new_name, $start, $end, $strand, $new_version, $no_fuzz);
} elsif ($cs->dbID != $new_coord_system) {
} elsif ($cs->name ne $new_coord_system) {
warning("Searched for a known feature on coordinate system: ".$cs->dbID." but found it on: ".$new_coord_system.
"\n No result returned, consider searching without coordinate system or use toplevel.");
return;
......
......@@ -426,6 +426,8 @@ ok($slice->seq_region_name =~ /$clone_name\.\d+/);
{
my $syn_slice = $slice_adaptor->fetch_by_region(undef, 'anoth_20');
is($syn_slice->seq_region_name(), '20', 'Ensuring slice is Chr20 as expected');
my $chr_syn_slice = $slice_adaptor->fetch_by_region('chromosome', 'anoth_20');
is($chr_syn_slice->seq_region_name(), '20', 'Ensuring slice is Chr20 as expected');
}
#{
......
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