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

moved get_total and get_density modules to parent module

parent d2d6e86c
No related branches found
No related tags found
No related merge requests found
......@@ -13,24 +13,6 @@ sub get_option {
return \@biotypes;
}
sub get_density {
my ($self, $block, $biotypes) = @_;
my $count = 0;
foreach my $biotype (@$biotypes) {
$count += scalar(@{ $block->get_all_Genes_by_type($biotype) });
}
return $count;
}
sub get_total {
my ($self, $option) = @_;
my $species = $self->param('species');
my $ga = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'gene');
return scalar(@{ $ga->fetch_all_by_biotype($option) });
}
1;
......@@ -206,5 +206,22 @@ sub get_option {
my $self = @_;
}
sub get_density {
my ($self, $block, $biotypes) = @_;
my $count = 0;
foreach my $biotype (@$biotypes) {
$count += scalar(@{ $block->get_all_Genes_by_type($biotype) });
}
return $count;
}
sub get_total {
my ($self, $option) = @_;
my $species = $self->param('species');
my $ga = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'gene');
return scalar(@{ $ga->fetch_all_by_biotype($option) });
}
1;
......@@ -13,22 +13,6 @@ sub get_option {
return \@biotypes;
}
sub get_density {
my ($self, $block, $biotypes) = @_;
my $count = 0;
foreach my $biotype (@$biotypes) {
$count += scalar(@{ $block->get_all_Genes_by_type($biotype) });
}
return $count;
}
sub get_total {
my ($self, $option) = @_;
my $species = $self->param('species');
my $ga = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'gene');
return scalar(@{ $ga->fetch_all_by_biotype($option) });
}
1;
......@@ -13,22 +13,6 @@ sub get_option {
return \@biotypes;
}
sub get_density {
my ($self, $block, $biotypes) = @_;
my $count = 0;
foreach my $biotype (@$biotypes) {
$count += scalar(@{ $block->get_all_Genes_by_type($biotype) });
}
return $count;
}
sub get_total {
my ($self, $option) = @_;
my $species = $self->param('species');
my $ga = Bio::EnsEMBL::Registry->get_adaptor($species, 'core', 'gene');
return scalar(@{ $ga->fetch_all_by_biotype($option) });
}
1;
......
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