2 # BioPerl module for Bio::DB::Expression
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Allen Day <allenday@ucla.edu>
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::DB::Expression - DESCRIPTION of Object
20 use Bio::DB::Expression;
21 my $db = Bio::DB::Expression->new( -source => 'geo' );
22 my @platforms = $db->get_platforms();
23 foreach my $platform ( @platforms ) {
24 my @datasets = $platform->get_datasets();
25 foreach my $dataset ( @datasets ) {
26 my @samples = $dataset->get_samples();
27 foreach my $sample ( @samples ) {
35 Describe the object here
41 User feedback is an integral part of the evolution of this and other
42 Bioperl modules. Send your comments and suggestions preferably to
43 the Bioperl mailing list. Your participation is much appreciated.
45 bioperl-l@bioperl.org - General discussion
46 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
50 Please direct usage questions or support issues to the mailing list:
52 I<bioperl-l@bioperl.org>
54 rather than to the module maintainer directly. Many experienced and
55 reponsive experts will be able look at the problem and quickly
56 address it. Please include a thorough description of the problem
57 with code and data examples if at all possible.
61 Report bugs to the Bioperl bug tracking system to help us keep track
62 of the bugs and their resolution. Bug reports can be submitted via
65 https://github.com/bioperl/bioperl-live/issues
67 =head1 AUTHOR - Allen Day
69 Email allenday@ucla.edu
73 The rest of the documentation details each of the object methods.
74 Internal methods are usually preceded with a _
79 # Let the code begin...
82 package Bio
::DB
::Expression
;
84 use base
qw(Bio::Root::HTTPget Bio::Root::Root);
85 use Bio
::Root
::HTTPget
;
86 our $DefaultSource = 'geo';
90 Usage : my $obj = Bio::DB::Expression->new();
91 Function: Builds a new Bio::DB::Expression object
92 Returns : an instance of Bio::DB::Expression
99 my($class,@args) = @_;
101 if( $class =~ /Bio::DB::Expression::(\S+)/ ) {
102 my ($self) = $class->SUPER::new
(@args);
103 $self->_initialize(@args);
107 @param{ map { lc $_ } keys %param } = values %param; # lowercase keys
108 my $source = $param{'-source'} || $DefaultSource;
110 $source = "\L$source"; # normalize capitalization to lower case
112 # normalize capitalization
113 return unless( $class->_load_expression_module($source) );
114 return "Bio::DB::Expression::$source"->new(@args);
118 =head2 get_platforms()
123 Returns : a list of Bio::Expression::Platform objects
129 my ($self,@args) = @_;
130 $self->throw_not_implemented();
138 Returns : a list of Bio::Expression::Sample objects
144 my ($self,@args) = @_;
145 $self->throw_not_implemented();
148 =head2 get_contacts()
153 Returns : a list of Bio::Expression::Contact objects
159 my ($self,@args) = @_;
160 $self->throw_not_implemented();
163 =head2 get_datasets()
168 Returns : a list of Bio::Expression::DataSet objects
174 my ($self,@args) = @_;
175 $self->throw_not_implemented();
181 =head2 _load_expression_module
183 Title : _load_expression_module
184 Usage : *INTERNAL Bio::DB::Expression stuff*
185 Function: Loads up (like use) a module at run time on demand
192 sub _load_expression_module
{
193 my ($self, $source) = @_;
194 my $module = "Bio::DB::Expression::" . $source;
197 eval { $ok = $self->_load_module($module) };
201 $self: $source cannot be found
203 For more information about the Bio::DB::Expression system please see
204 the Bio::DB::Expression docs. This includes ways of checking for
205 formats at compile time, not run time.