NAME
Bio::Phylo::Adaptor - Object adaptor for compatibility
SYNOPSIS
# load adaptor class
use Bio::Phylo::Adaptor;
# going to build Bio::Phylo tree
use Bio::Phylo::Forest::Tree;
my $tree = Bio::Phylo::Forest::Tree->new;
$Bio::Phylo::COMPAT = 'Bioperl';
my $bptree = Bio::Phylo::Adaptor->new($tree);
# $tree is now bioperl compatible
print "bioperl compatible!" if $bptree->isa('Bio::Tree::TreeI');
DESCRIPTION
The adaptor architecture is used to make Bio::Phylo objects compatible with other software (currently only bioperl). The compatibility mode can be defined globally at compile time by specifying:
use Bio::Phylo compat => 'Bioperl';
In which case all objects are instantiated as adapted objects automatically from within their respective constructors. Alternatively, adapted objects can be created by setting the $Bio::Phylo::COMPAT
variable and passing 'raw' Bio::Phylo objects to the Bio::Phylo::Adaptor constructor.
METHODS
CONSTRUCTOR
- new
-
Type : Constructor Title : new Usage : my $adapted = Bio::Phylo::Adaptor->new($obj); Function: Instantiates an adapted Bio::Phylo object. Returns : An object compatible with whatever $Bio::Phylo::COMPAT is set to. Args : An object to adapt Comments: This method depends on a correct setting of the global $Bio::Phylo::COMPAT setting.
SEE ALSO
- Bio::Phylo::Manual
-
Also see the manual: Bio::Phylo::Manual.
REVISION
$Id: Adaptor.pm 4234 2007-07-17 13:41:02Z rvosa $