Gene.pm 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9
# $Id$

package Bio::EnsEMBL::Collection::Gene;

use strict;
use warnings;

use base qw( Bio::EnsEMBL::Collection );

10
#-----------------------------------------------------------------------
11
# Specialized protected methods from super base class
12 13 14 15
# Bio::EnsEMBL::DBSQL::BaseAdaptor
#-----------------------------------------------------------------------

sub _left_join {
16
  # Not all genes have a display_xref_id...
17 18 19
  return ( [ 'xref', 'x.xref_id = g.display_xref_id' ] );
}

20 21 22 23
#-----------------------------------------------------------------------
# Specialized protected methods from base class Bio::EnsEMBL::Collection
#-----------------------------------------------------------------------

24 25 26
sub _extra_tables {
  return ( [ 'gene_stable_id', 'gsi' ], [ 'xref', 'x' ] );
}
27 28

sub _extra_columns {
29 30
  return ( 'g.analysis_id', 'g.biotype', 'g.status',
           'gsi.stable_id', 'x.display_label' );
31 32 33
}

sub _extra_where_clause {
34 35 36 37
  return q(
        g.is_current  = 1
    AND g.gene_id     = gsi.gene_id
  );
38 39
}

40
# sub _has_analysis { return 1 }
41

42 43 44 45 46 47 48 49
#-----------------------------------------------------------------------
# Implemented abstract protected methods from base class
# Bio::EnsEMBL::Collection
#-----------------------------------------------------------------------

sub _feature_table { return [ 'gene', 'g' ] }

1;