| 1 | # | ||
| 2 | # BioPerl module for Bio::Factory::TreeFactoryI | ||
| 3 | # | ||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 5 | # | ||
| 6 | # Cared for by Jason Stajich <jason@bioperl.org> | ||
| 7 | # | ||
| 8 | # Copyright Jason Stajich | ||
| 9 | # | ||
| 10 | # You may distribute this module under the same terms as perl itself | ||
| 11 | |||
| 12 | # POD documentation - main docs before the code | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Bio::Factory::TreeFactoryI - Factory Interface for getting and writing trees | ||
| 17 | from/to a data stream | ||
| 18 | |||
| 19 | =head1 SYNOPSIS | ||
| 20 | |||
| 21 | # get a $factory from somewhere Bio::TreeIO likely | ||
| 22 | my $treeio = Bio::TreeIO->new(-format => 'newick', #this is phylip/newick format | ||
| 23 | -file => 'file.tre'); | ||
| 24 | my $treeout = Bio::TreeIO->new(-format => 'nexus', | ||
| 25 | -file => ">file.nexus"); | ||
| 26 | |||
| 27 | # convert tree formats from newick/phylip to nexus | ||
| 28 | while(my $tree = $treeio->next_tree) { | ||
| 29 | $treeout->write_tree($tree); | ||
| 30 | } | ||
| 31 | |||
| 32 | =head1 DESCRIPTION | ||
| 33 | |||
| 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. | ||
| 36 | |||
| 37 | =head1 FEEDBACK | ||
| 38 | |||
| 39 | =head2 Mailing Lists | ||
| 40 | |||
| 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. | ||
| 44 | |||
| 45 | bioperl-l@bioperl.org - General discussion | ||
| 46 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||
| 47 | |||
| 48 | =head2 Support | ||
| 49 | |||
| 50 | Please direct usage questions or support issues to the mailing list: | ||
| 51 | |||
| 52 | I<bioperl-l@bioperl.org> | ||
| 53 | |||
| 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. | ||
| 58 | |||
| 59 | =head2 Reporting Bugs | ||
| 60 | |||
| 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 | ||
| 63 | web: | ||
| 64 | |||
| 65 | https://github.com/bioperl/bioperl-live/issues | ||
| 66 | |||
| 67 | =head1 AUTHOR - Jason Stajich | ||
| 68 | |||
| 69 | Email jason@bioperl.org | ||
| 70 | |||
| 71 | =head1 APPENDIX | ||
| 72 | |||
| 73 | The rest of the documentation details each of the object methods. | ||
| 74 | Internal methods are usually preceded with a _ | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | |||
| 79 | # Let the code begin... | ||
| 80 | |||
| 81 | |||
| 82 | package Bio::Factory::TreeFactoryI; | ||
| 83 | 29 | $Bio::Factory::TreeFactoryI::VERSION = '1.7.8'; | |
| 84 | 29 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 85 | |||
| 86 | 29 | ▶ | use base qw(Bio::Root::RootI); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 87 | |||
| 88 | =head2 next_tree | ||
| 89 | |||
| 90 | Title : next_tree | ||
| 91 | Usage : my $tree = $factory->next_tree; | ||
| 92 | Function: Get a tree from the factory | ||
| 93 | Returns : L<Bio::Tree::TreeI> | ||
| 94 | Args : none | ||
| 95 | |||
| 96 | =cut | ||
| 97 | |||
| 98 | 0 | ▶ | sub next_tree{ |
|
Subroutine
next_tree: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 99 | 0 | my ($self,@args) = @_; | |
| 100 | 0 | $self->throw_not_implemented(); | |
| 101 | } | ||
| 102 | |||
| 103 | =head2 write_tree | ||
| 104 | |||
| 105 | Title : write_tree | ||
| 106 | Usage : $treeio->write_tree($tree); | ||
| 107 | Function: Writes a tree onto the stream | ||
| 108 | Returns : none | ||
| 109 | Args : L<Bio::Tree::TreeI> | ||
| 110 | |||
| 111 | |||
| 112 | =cut | ||
| 113 | |||
| 114 | 0 | ▶ | sub write_tree{ |
|
Subroutine
write_tree: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 115 | 0 | my ($self,@args) = @_; | |
| 116 | 0 | $self->throw_not_implemented(); | |
| 117 | } | ||
| 118 | |||
| 119 | 29 | 1; | |