Skip to content
Snippets Groups Projects
Commit 21fb32c8 authored by Magali Ruffier's avatar Magali Ruffier
Browse files

get_slice method specific for gene count

rather than return all toplevel slices, returns all slices with genes
does not affect much species with a reduced number of toplevel slices but increases things considerably for large number of toplevel slices
parent dc87fe33
No related branches found
No related tags found
No related merge requests found
......@@ -25,6 +25,21 @@ sub get_total {
return $total;
}
sub get_slices {
my ($self, $species) = @_;
my @slices;
my $dba = Bio::EnsEMBL::Registry->get_DBAdaptor($species, 'core');
my $sa = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'slice');
my $helper = $dba->dbc()->sql_helper();
my $sql = q{
SELECT DISTINCT seq_region_id FROM gene };
my @ids = @{ $helper->execute_simple(-SQL => $sql) };
foreach my $id(@ids) {
push @slices, $sa->fetch_by_seq_region_id($id);
}
return \@slices;
}
sub get_feature_count {
my ($self, $slice, $key, $biotypes) = @_;
......
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