[Bioperl-l] problem with Bio::DB::Query::GenBank
Aaron J Mackey
ajm6q at virginia.edu
Fri Jan 31 08:39:21 EST 2003
On Fri, 31 Jan 2003, Ewan Birney wrote:
> I don't think this is helpful. use Bio::Perl I think should bring in all
> necessary modules for the Bio::Perl functions to use (if not, this is a
> bug) but ... I don't think we should import everything with a use
> Bio::Perl.
This is akin to some other packages allowing you to import the bulk of its
usability through a top-level package which simply uses the sub parts
(e.g. Tangram, XML::Machines, etc)
I think BioPerl is a bit of a beast to go "all the way" with that
philosophy, although I could imagine that a few of the elemental *IO
drivers could be loaded in since they themselves can perform dynamic
loading. Alternatively (or maybe additionally), we could make special
EXPORT tags like:
use Bio::Perl qw( :all ) # !Yikes!
use Bio::Perl qw( :genbank ) # Bio::DB::Gen*, Bio::SeqIO, Bio::Seq, etc.
use Bio::Perl qw( :blast ) # Bio::Tools::StandAloneBlast, Bio::SearchIO, Bio::Seq, etc
These export tags may also qualify the methods you get (so there might be
a "bl2seq()" method you get when you import :blast):
#!/usr/bin/perl -w
# my simple BLAST aligner
use strict;
use Bio::Perl qw(:blast)
$align = bl2seq("file1.fa", "file2.fa");
print $align; # defaults to AlignIO::something
__END__
-Aaron
--
Aaron J Mackey
Pearson Laboratory
University of Virginia
(434) 924-2821
amackey at virginia.edu
More information about the Bioperl-l
mailing list