| 1 | # BioPerl module for Bio::Community::Role::IO | ||
| 2 | # | ||
| 3 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 4 | # | ||
| 5 | # Copyright 2011-2014 Florent Angly <florent.angly@gmail.com> | ||
| 6 | # | ||
| 7 | # You may distribute this module under the same terms as perl itself | ||
| 8 | |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Bio::Community::Role::IO - Role for IO layer | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | package My::Package; | ||
| 17 | |||
| 18 | use Moose; | ||
| 19 | with 'Bio::Community::Role::IO'; | ||
| 20 | |||
| 21 | # ... | ||
| 22 | |||
| 23 | 1; | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This role is an IO layer to read and write community files. The only thing it | ||
| 28 | does is define methods that the role-consuming class must implement. In practice, | ||
| 29 | this role is should be used by all the IO drivers in the Bio::Community::IO::* | ||
| 30 | namespace. | ||
| 31 | |||
| 32 | Input methods: next_member, next_community, _next_community_init, _next_community_finish | ||
| 33 | Output methods: write_member, write_community, _write_community_init, _write_community_finish, sort_members | ||
| 34 | |||
| 35 | =head1 AUTHOR | ||
| 36 | |||
| 37 | Florent Angly L<florent.angly@gmail.com> | ||
| 38 | |||
| 39 | =head1 SUPPORT AND BUGS | ||
| 40 | |||
| 41 | User feedback is an integral part of the evolution of this and other Bioperl | ||
| 42 | modules. Please direct usage questions or support issues to the mailing list, | ||
| 43 | L<bioperl-l@bioperl.org>, rather than to the module maintainer directly. Many | ||
| 44 | experienced and reponsive experts will be able look at the problem and quickly | ||
| 45 | address it. Please include a thorough description of the problem with code and | ||
| 46 | data examples if at all possible. | ||
| 47 | |||
| 48 | If you have found a bug, please report it on the BioPerl bug tracking system | ||
| 49 | to help us keep track the bugs and their resolution: | ||
| 50 | L<https://redmine.open-bio.org/projects/bioperl/> | ||
| 51 | |||
| 52 | =head1 COPYRIGHT | ||
| 53 | |||
| 54 | Copyright 2011-2014 by Florent Angly <florent.angly@gmail.com> | ||
| 55 | |||
| 56 | This library is free software; you can redistribute it and/or modify | ||
| 57 | it under the same terms as Perl itself, either Perl version 5.10.1 or, | ||
| 58 | at your option, any later version of Perl 5 you may have available. | ||
| 59 | |||
| 60 | =head1 APPENDIX | ||
| 61 | |||
| 62 | The rest of the documentation details each of the object | ||
| 63 | methods. Internal methods are usually preceded with a _ | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | |||
| 68 | package Bio::Community::Role::IO; | ||
| 69 | |||
| 70 | 10 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 71 | 10 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 72 | |||
| 73 | # TODO: POD that describes each method and its inputs and outputs | ||
| 74 | |||
| 75 | 10 | requires | |
| 76 | # Methods implemented by the Bio::Community::IO::* drivers | ||
| 77 | '_next_community_init', | ||
| 78 | '_next_community_finish', | ||
| 79 | '_write_community_init', | ||
| 80 | '_write_community_finish', | ||
| 81 | '_next_metacommunity_init', | ||
| 82 | '_next_metacommunity_finish', | ||
| 83 | '_write_metacommunity_init', | ||
| 84 | '_write_metacommunity_finish', | ||
| 85 | 'next_member', | ||
| 86 | 'write_member', | ||
| 87 | # Methods implemented by the Bio::Community::IO (that the drivers inherit from) | ||
| 88 | 'next_community', | ||
| 89 | 'next_metacommunity', | ||
| 90 | 'write_community', | ||
| 91 | 'write_metacommunity', | ||
| 92 | 'sort_members', | ||
| 93 | 'abundance_type', | ||
| 94 | 'missing_string', | ||
| 95 | 'multiple_communities', | ||
| 96 | 'weight_files', | ||
| 97 | 'weight_assign', | ||
| 98 | ; | ||
| 99 | |||
| 100 | |||
| 101 | 10 | 1; | |