2 # BioPerl module for Bio::Factory::TreeFactoryI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Jason Stajich <jason@bioperl.org>
8 # Copyright Jason Stajich
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::Factory::TreeFactoryI - Factory Interface for getting and writing trees
21 # get a $factory from somewhere Bio::TreeIO likely
22 my $treeio = Bio::TreeIO->new(-format => 'newick', #this is phylip/newick format
24 my $treeout = Bio::TreeIO->new(-format => 'nexus',
25 -file => ">file.nexus");
27 # convert tree formats from newick/phylip to nexus
28 while(my $tree = $treeio->next_tree) {
29 $treeout->write_tree($tree);
34 This interface describes the minimal functions needed to get and write
35 trees from a data stream. It is implemented by the L<Bio::TreeIO> factory.
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 the
65 https://github.com/bioperl/bioperl-live/issues
67 =head1 AUTHOR - Jason Stajich
69 Email jason@bioperl.org
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
::Factory
::TreeFactoryI
;
85 use base
qw(Bio::Root::RootI);
90 Usage : my $tree = $factory->next_tree;
91 Function: Get a tree from the factory
92 Returns : L<Bio::Tree::TreeI>
98 my ($self,@args) = @_;
99 $self->throw_not_implemented();
105 Usage : $treeio->write_tree($tree);
106 Function: Writes a tree onto the stream
108 Args : L<Bio::Tree::TreeI>
114 my ($self,@args) = @_;
115 $self->throw_not_implemented();