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

added methods to get gene counts on alternate sequences

parent 064d9230
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,18 @@ sub get_attrib_codes {
return %biotypes;
}
sub get_alt_attrib_codes {
my ($self) = @_;
my @alt_attrib_codes = ('coding_acnt', 'pseudogene_acnt', 'noncoding_acnt');
my %biotypes;
foreach my $alt_code (@alt_attrib_codes) {
my ($group) = $alt_code =~ /(\w+)\_acnt/;
my $biotypes = $self->get_biotype_group($group);
$biotypes{$alt_code} = $biotypes;
}
return %biotypes;
}
sub get_total {
my ($self) = @_;
my $species = $self->param('species');
......@@ -26,6 +38,26 @@ sub get_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
WHERE seq_region_id NOT IN
(SELECT seq_region_id
FROM seq_region_attrib sa, attrib_type at
WHERE at.attrib_type_id = sa.attrib_type_id
AND at.code= "non_ref") };
my @ids = @{ $helper->execute_simple(-SQL => $sql) };
foreach my $id(@ids) {
push @slices, $sa->fetch_by_seq_region_id($id);
}
return \@slices;
}
sub get_all_slices {
my ($self, $species) = @_;
my @slices;
my $dba = Bio::EnsEMBL::Registry->get_DBAdaptor($species, 'core');
......
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