Skip to content
Snippets Groups Projects
Commit 403437f0 authored by James Stalker's avatar James Stalker
Browse files

In deprecated chr_name call, I've changed the code so it projects to the...

In deprecated chr_name call, I've changed the code so it projects to the toplevel, not to the chromosome.  All species used to have chromosomes, so this always worked - the meaning of this call is now the same as it was, with the addded bonus that it works for species without chromosomes
parent 41a0660a
No related branches found
No related tags found
No related merge requests found
......@@ -742,15 +742,7 @@ sub chr_name {
return $gene_slice->seq_region_name();
}
my $sa = $self->slice->adaptor();
throw( "need db connection for chr_name call" ) unless $sa;
my $ca = $sa->db()->get_CoordSystemAdaptor();
my $coord_system = $ca->fetch_by_name( "chromosome" );
if( ! $coord_system ) {
throw( "Chromosome coordinate system not available" );
}
my $coords = $self->project( $coord_system );
my $coords = $self->project( "toplevel" );
if( @$coords ) {
return $coords->[0]->[2]->seq_region_name();
......
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