package GDxBase::GeneModel::Specification; =head1 NAME GDxBase::GeneModel::Specification =head1 SYNOPSIS A base class for all gene models - not for direct use. =head1 DESCRIPTION A generic class for the display of gene models. This class alone is not sufficient to display a gene model; in fact, there's not much in it all at the moment. A more specific subclass, such as GDxBase::GeneModel::Specification::GFF, must be defined to override the 'get_features' method. The criteria for the format of the features that are returned by subclasses are fairly liberal - for rendering, the features are passed directly to the 'add_track' method of the Bio::Graphics::Panel, which is pretty good at displaying anything you throw at it in a sensible way. Last Revision: 9-Aug-06 =head1 See Also GDxBase::GeneModel::Collection GDxBase::GeneModel::Specification::GFF GDxBase::GeneModel::Specification::Consensus GDxBase::GeneModel::Specification::Summary =head1 Author James Allen Email: james.allen@cimr.cam.ac.uk =head1 Copyright Copyright 2006 James Allen, DIL =cut use warnings; use strict; use Carp; use Class::AutoClass; our @ISA = "Class::AutoClass"; our (@AUTO_ATTRIBUTES, %DEFAULTS); @AUTO_ATTRIBUTES = qw(source); %DEFAULTS = (); Class::AutoClass::declare(__PACKAGE__); ################################################################################ =head1 METHODS =cut =head2 _init_self Title: _init_self Function: Create a new GDxBase::GeneModel::Specification object Usage: $gm = GDxBase::GeneModel::Specification->new($source) Args: source - mandatory, e.g. EnsEMBL, UCSC Returns: A GDxBase::GeneModel::Specification object =cut sub _init_self { my $self = shift; confess "A source (e.g. Ensembl) must be supplied" unless $self->source; } ################################################################################ =head2 get_features Title: get_features Function: Return a set of features for the gene (and possibly build) specified in a GDxBase::GeneModel::Collection object Usage: ($features, $start, $stop) = GDxBase::GeneModel::Specification->get_features($gmc, $config_values) Args: gmc - mandatory, a GDxBase::GeneModel::Collection object config_values - optional, a hash of config-ini settings Returns: An array of feature objects The start and stop values for the gene model as integer values Notes: Must be overridden in a subclass =cut sub get_features { confess "The 'get_features' method must be overridden in a subclass.\n"; } ################################################################################ 1;