Commit dc87fe33 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

get_slice method added

parent 25edd30b
...@@ -18,7 +18,7 @@ sub run { ...@@ -18,7 +18,7 @@ sub run {
my $total = $self->get_total(); my $total = $self->get_total();
my $sum = 0; my $sum = 0;
my $slices = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'slice')->fetch_all('toplevel'); my $slices = $self->get_slices($species);
my @sorted_slices = my @sorted_slices =
sort( { $a->coord_system()->rank() <=> $b->coord_system()->rank() sort( { $a->coord_system()->rank() <=> $b->coord_system()->rank()
|| $b->seq_region_length() <=> $a->seq_region_length() } @$slices) ; || $b->seq_region_length() <=> $a->seq_region_length() } @$slices) ;
...@@ -37,6 +37,12 @@ sub run { ...@@ -37,6 +37,12 @@ sub run {
} }
} }
sub get_slices {
my ($self, $species) = @_;
my @slices = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'slice')->fetch_all('toplevel');
return \@slices;
}
sub delete_old_attrib { sub delete_old_attrib {
my ($self, $dba, %attrib_codes) = @_; my ($self, $dba, %attrib_codes) = @_;
......
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