| 1 | # BioPerl module for Bio::Community::Role::Sequenced | ||
| 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::Sequenced - Role for objects that have a sequence | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | package My::Package; | ||
| 17 | |||
| 18 | use Moose; | ||
| 19 | with 'Bio::Community::Role::Sequenced'; | ||
| 20 | |||
| 21 | # Use the seqs() method as needed | ||
| 22 | # ... | ||
| 23 | |||
| 24 | 1; | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This role provides the capability to add an arrayref of sequences (Bio::PrimarySeq | ||
| 29 | compliant objects) to objects of the class that consumes this role. | ||
| 30 | |||
| 31 | =head1 AUTHOR | ||
| 32 | |||
| 33 | Florent Angly L<florent.angly@gmail.com> | ||
| 34 | |||
| 35 | =head1 SUPPORT AND BUGS | ||
| 36 | |||
| 37 | User feedback is an integral part of the evolution of this and other Bioperl | ||
| 38 | modules. Please direct usage questions or support issues to the mailing list, | ||
| 39 | L<bioperl-l@bioperl.org>, rather than to the module maintainer directly. Many | ||
| 40 | experienced and reponsive experts will be able look at the problem and quickly | ||
| 41 | address it. Please include a thorough description of the problem with code and | ||
| 42 | data examples if at all possible. | ||
| 43 | |||
| 44 | If you have found a bug, please report it on the BioPerl bug tracking system | ||
| 45 | to help us keep track the bugs and their resolution: | ||
| 46 | L<https://redmine.open-bio.org/projects/bioperl/> | ||
| 47 | |||
| 48 | =head1 COPYRIGHT | ||
| 49 | |||
| 50 | Copyright 2011-2014 by Florent Angly <florent.angly@gmail.com> | ||
| 51 | |||
| 52 | This library is free software; you can redistribute it and/or modify | ||
| 53 | it under the same terms as Perl itself, either Perl version 5.10.1 or, | ||
| 54 | at your option, any later version of Perl 5 you may have available. | ||
| 55 | |||
| 56 | =head1 APPENDIX | ||
| 57 | |||
| 58 | The rest of the documentation details each of the object | ||
| 59 | methods. Internal methods are usually preceded with a _ | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | |||
| 64 | package Bio::Community::Role::Sequenced; | ||
| 65 | |||
| 66 | 22 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 67 | 22 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 68 | |||
| 69 | |||
| 70 | =head2 seqs | ||
| 71 | |||
| 72 | Usage : my $seqs = $member->seqs(); | ||
| 73 | Function: Get or set some sequences for this object. | ||
| 74 | Args : An arrayref of Bio::SeqI objects | ||
| 75 | Returns : An arrayref of Bio::SeqI objects | ||
| 76 | |||
| 77 | =cut | ||
| 78 | |||
| 79 | has seqs => ( | ||
| 80 | is => 'rw', | ||
| 81 | isa => 'Maybe[ArrayRef[Bio::PrimarySeqI]]', | ||
| 82 | required => 0, | ||
| 83 | 0 | ▶ | default => sub{ [] }, |
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||
| 84 | 22 | init_arg => '-seqs', | |
| 85 | lazy => 1, | ||
| 86 | ); | ||
| 87 | |||
| 88 | |||
| 89 | 22 | 1; | |