1 # $Id: TFBS.pm,v 1.11 2006/08/12 11:00:03 sendu Exp $
3 # BioPerl module for Bio::DB::TFBS
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Sendu Bala <bix@sendu.me.uk>
11 # You may distribute this module under the same terms as perl itself
13 # POD documentation - main docs before the code
17 Bio::DB::TFBS - Access to a Transcription Factor Binding Site database
23 my $db = Bio::DB::TFBS->new(-source => 'transfac');
24 my ($factor_id) = $db->get_factor_ids('PPAR-gamma1');
25 my ($matrix_id) = $db->get_matrix_ids('PPAR-gamma1');
27 # get a Bio::Map::TranscriptionFactor with all the positions of a given factor
28 my $factor = $db->get_factor(-factor_id => $factor_id);
30 # get a Bio::Map::GeneMap containing all the factors that bind near a given gene
31 my $gene_map = $db->get_gene_map(-gene_name => 'AQP 7');
33 # get a PSM (Bio::Matrix::PSM) of a given matrix
34 my $psm = $db->get_matrix(-matrix_id => $matrix_id);
36 # get the aligned sequences (Bio::SimpleAlign) that were used to build a given
38 my $align = $db->get_alignment(-matrix_id => $matrix_id);
40 # get a specific instance sequence (Bio::LocatableSeq)
41 my $seq = $db->get_seq($id);
45 This is a front end module for access to a Transcription Factor Binding Site
52 User feedback is an integral part of the evolution of this and other
53 Bioperl modules. Send your comments and suggestions preferably to
54 the Bioperl mailing list. Your participation is much appreciated.
56 bioperl-l@bioperl.org - General discussion
57 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
61 Please direct usage questions or support issues to the mailing list:
63 I<bioperl-l@bioperl.org>
65 rather than to the module maintainer directly. Many experienced and
66 reponsive experts will be able look at the problem and quickly
67 address it. Please include a thorough description of the problem
68 with code and data examples if at all possible.
72 Report bugs to the Bioperl bug tracking system to help us keep track
73 of the bugs and their resolution. Bug reports can be submitted via
76 https://github.com/bioperl/bioperl-live/issues
78 =head1 AUTHOR - Sendu Bala
84 Based on Bio::DB::Taxonomy by Jason Stajich
88 The rest of the documentation details each of the object methods.
89 Internal methods are usually preceded with a _
93 # Let the code begin...
95 package Bio
::DB
::TFBS
;
100 use base
qw(Bio::Root::Root);
102 our $DefaultSource = 'transfac';
107 Usage : my $obj = Bio::DB::TFBS->new(-source => 'transfac');
108 Function: Builds a new Bio::DB::TFBS object.
109 Returns : an instance of Bio::DB::TFBS
110 Args : -source => which database source: currently only 'transfac_pro'
115 my ($class, @args) = @_;
117 if ($class =~ /Bio::DB::TFBS::(\S+)/) {
118 my ($self) = $class->SUPER::new
(@args);
119 $self->_initialize(@args);
124 @param{ map { lc $_ } keys %param } = values %param; # lowercase keys
125 my $source = $param{'-source'} || $DefaultSource;
127 $source = "\L$source"; # normalize capitalization to lower case
129 # normalize capitalization
130 return unless( $class->_load_tax_module($source) );
131 return "Bio::DB::TFBS::$source"->new(@args);
138 =head2 _load_tax_module
140 Title : _load_tax_module
141 Usage : *INTERNAL Bio::DB::TFBS stuff*
142 Function: Loads up (like use) a module at run time on demand
146 sub _load_tax_module
{
147 my ($self, $source) = @_;
148 my $module = "Bio::DB::TFBS::" . $source;
151 eval { $ok = $self->_load_module($module) };
155 $self: $source cannot be found
157 For more information about the Bio::DB::TFBS system please see
158 the Bio::DB::TFBS docs. This includes ways of checking for
159 formats at compile time, not run time.