3 # BioPerl module for Bio::DB::Expression
5 # Cared for by Allen Day <allenday@ucla.edu>
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
15 Bio::DB::Expression - DESCRIPTION of Object
19 use Bio::DB::Expression;
20 my $db = Bio::DB::Expression->new( -source => 'geo' );
21 my @platforms = $db->get_platforms();
22 foreach my $platform ( @platforms ) {
23 my @datasets = $platform->get_datasets();
24 foreach my $dataset ( @datasets ) {
25 my @samples = $dataset->get_samples();
26 foreach my $sample ( @samples ) {
34 Describe the object here
40 User feedback is an integral part of the evolution of this and other
41 Bioperl modules. Send your comments and suggestions preferably to
42 the Bioperl mailing list. Your participation is much appreciated.
44 bioperl-l@bioperl.org - General discussion
45 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
49 Report bugs to the Bioperl bug tracking system to help us keep track
50 of the bugs and their resolution. Bug reports can be submitted via
53 http://bugzilla.open-bio.org/
55 =head1 AUTHOR - Allen Day
57 Email allenday@ucla.edu
61 The rest of the documentation details each of the object methods.
62 Internal methods are usually preceded with a _
67 # Let the code begin...
70 package Bio
::DB
::Expression
;
72 use base
qw(Bio::Root::HTTPget Bio::Root::Root);
73 use Bio
::Root
::HTTPget
;
74 our $DefaultSource = 'geo';
78 Usage : my $obj = Bio::DB::Expression->new();
79 Function: Builds a new Bio::DB::Expression object
80 Returns : an instance of Bio::DB::Expression
87 my($class,@args) = @_;
89 if( $class =~ /Bio::DB::Expression::(\S+)/ ) {
90 my ($self) = $class->SUPER::new
(@args);
91 $self->_initialize(@args);
95 @param{ map { lc $_ } keys %param } = values %param; # lowercase keys
96 my $source = $param{'-source'} || $DefaultSource;
98 $source = "\L$source"; # normalize capitalization to lower case
100 # normalize capitalization
101 return unless( $class->_load_expression_module($source) );
102 return "Bio::DB::Expression::$source"->new(@args);
106 =head2 get_platforms()
111 Returns : a list of Bio::Expression::Platform objects
117 my ($self,@args) = @_;
118 $self->throw_not_implemented();
126 Returns : a list of Bio::Expression::Sample objects
132 my ($self,@args) = @_;
133 $self->throw_not_implemented();
136 =head2 get_contacts()
141 Returns : a list of Bio::Expression::Contact objects
147 my ($self,@args) = @_;
148 $self->throw_not_implemented();
151 =head2 get_datasets()
156 Returns : a list of Bio::Expression::DataSet objects
162 my ($self,@args) = @_;
163 $self->throw_not_implemented();
169 =head2 _load_expression_module
171 Title : _load_expression_module
172 Usage : *INTERNAL Bio::DB::Expression stuff*
173 Function: Loads up (like use) a module at run time on demand
180 sub _load_expression_module
{
181 my ($self, $source) = @_;
182 my $module = "Bio::DB::Expression::" . $source;
185 eval { $ok = $self->_load_module($module) };
189 $self: $source cannot be found
191 For more information about the Bio::DB::Expression system please see
192 the Bio::DB::Expression docs. This includes ways of checking for
193 formats at compile time, not run time.