| 1 | # | ||||||||||
| 2 | # BioPerl module for Bio::Search::Result::INFERNALResult.pm | ||||||||||
| 3 | # | ||||||||||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||||||||||
| 5 | # | ||||||||||
| 6 | # Cared for by Paul Cantalupo | ||||||||||
| 7 | # | ||||||||||
| 8 | # Copyright Paul Cantalupo | ||||||||||
| 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::Search::Result::INFERNALResult - A Result object for INFERNAL results | ||||||||||
| 17 | |||||||||||
| 18 | =head1 SYNOPSIS | ||||||||||
| 19 | |||||||||||
| 20 | # typically one gets Results from a SearchIO stream | ||||||||||
| 21 | use Bio::SearchIO; | ||||||||||
| 22 | my $io = Bio::SearchIO->new(-format => 'infernal', | ||||||||||
| 23 | -file => 't/data/cmsearch_output.txt'); | ||||||||||
| 24 | while( my $result = $io->next_result ) { | ||||||||||
| 25 | while( my $hit = $result->next_hit ) { | ||||||||||
| 26 | print join(" ", $result->query_name, $result->algorithm, $result->num_hits), "\n"; | ||||||||||
| 27 | } | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | =head1 DESCRIPTION | ||||||||||
| 31 | |||||||||||
| 32 | This object is a specialization of L<Bio::Search::Result::GenericResult>. There | ||||||||||
| 33 | is one extra method called L<cm_name>. | ||||||||||
| 34 | |||||||||||
| 35 | =head1 FEEDBACK | ||||||||||
| 36 | |||||||||||
| 37 | =head2 Mailing Lists | ||||||||||
| 38 | |||||||||||
| 39 | User feedback is an integral part of the evolution of this and other | ||||||||||
| 40 | Bioperl modules. Send your comments and suggestions preferably to | ||||||||||
| 41 | the Bioperl mailing list. Your participation is much appreciated. | ||||||||||
| 42 | |||||||||||
| 43 | bioperl-l@bioperl.org - General discussion | ||||||||||
| 44 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||||||||||
| 45 | |||||||||||
| 46 | =head2 Support | ||||||||||
| 47 | |||||||||||
| 48 | Please direct usage questions or support issues to the mailing list: | ||||||||||
| 49 | |||||||||||
| 50 | I<bioperl-l@bioperl.org> | ||||||||||
| 51 | |||||||||||
| 52 | rather than to the module maintainer directly. Many experienced and | ||||||||||
| 53 | reponsive experts will be able look at the problem and quickly | ||||||||||
| 54 | address it. Please include a thorough description of the problem | ||||||||||
| 55 | with code and data examples if at all possible. | ||||||||||
| 56 | |||||||||||
| 57 | =head2 Reporting Bugs | ||||||||||
| 58 | |||||||||||
| 59 | Report bugs to the Bioperl bug tracking system to help us keep track | ||||||||||
| 60 | of the bugs and their resolution. Bug reports can be submitted via the | ||||||||||
| 61 | web: | ||||||||||
| 62 | |||||||||||
| 63 | https://github.com/bioperl/bioperl-live/issues | ||||||||||
| 64 | |||||||||||
| 65 | =head1 AUTHOR - Paul Cantalupo | ||||||||||
| 66 | |||||||||||
| 67 | =head1 APPENDIX | ||||||||||
| 68 | |||||||||||
| 69 | The rest of the documentation details each of the object methods. | ||||||||||
| 70 | Internal methods are usually preceded with a _ | ||||||||||
| 71 | |||||||||||
| 72 | =cut | ||||||||||
| 73 | |||||||||||
| 74 | # Let the code begin... | ||||||||||
| 75 | |||||||||||
| 76 | package Bio::Search::Result::INFERNALResult; | ||||||||||
| 77 | 2 | $Bio::Search::Result::INFERNALResult::VERSION = '1.7.8'; | |||||||||
| 78 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 79 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 80 | |||||||||||
| 81 | 2 | ▶ | use base qw(Bio::Search::Result::GenericResult); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 82 | |||||||||||
| 83 | =head2 new | ||||||||||
| 84 | |||||||||||
| 85 | Title : new | ||||||||||
| 86 | Usage : my $obj = Bio::Search::Result::INFERNALResult->new(); | ||||||||||
| 87 | Function: Builds a new Bio::Search::Result::INFERNALResult object | ||||||||||
| 88 | Returns : Bio::Search::Result::INFERNALResult | ||||||||||
| 89 | Args : -cm_name => string, name of covariance model (CM) file. | ||||||||||
| 90 | plus Bio::Search::Result::GenericResult parameters | ||||||||||
| 91 | |||||||||||
| 92 | =cut | ||||||||||
| 93 | |||||||||||
| 94 | 5 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 95 | 5 | my ($class, @args) = @_; | |||||||||
| 96 | 5 | my $self = $class->SUPER::new(@args); | |||||||||
| 97 | |||||||||||
| 98 | 5 | my ($cm) = $self->_rearrange([qw(CM_NAME)], @args); | |||||||||
| 99 | 5 | ▶ | if (defined $cm) { $self->cm_name($cm) } | ||||||||
|
Branch: 1 branch
| |||||||||||
| 100 | |||||||||||
| 101 | 5 | return $self; | |||||||||
| 102 | } | ||||||||||
| 103 | |||||||||||
| 104 | =head2 cm_name | ||||||||||
| 105 | |||||||||||
| 106 | Title : cm_name | ||||||||||
| 107 | Usage : $obj->cm_name($newvalue) | ||||||||||
| 108 | Function: Get/Set value of the covariance model file name (cm_name) | ||||||||||
| 109 | Returns : value of cm_name | ||||||||||
| 110 | Args : newvalue (optional) | ||||||||||
| 111 | |||||||||||
| 112 | =cut | ||||||||||
| 113 | |||||||||||
| 114 | 5 | ▶ | sub cm_name { | ||||||||
|
Subroutine
cm_name: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 115 | 5 | my ($self, $value) = @_; | |||||||||
| 116 | 5 | ▶ | if (defined $value) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 117 | 3 | $self->{'_cm_name'} = $value; | |||||||||
| 118 | } | ||||||||||
| 119 | 5 | return $self->{'_cm_name'}; | |||||||||
| 120 | } | ||||||||||
| 121 | |||||||||||
| 122 | 2 | 1; | |||||||||