File Coverage

Bio/Search/Result/INFERNALResult.pm
Criterion Covered Total %
statement 19 19 100.0
branch 4 4 100.0
condition n/a
subroutine 5 5 100.0
pod 2 2 100.0
total 30 30 100.0


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for Bio::Search::Result::INFERNALResult.pm
3             #
4             # Please direct questions and support issues to
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. There
33             is one extra method called L.
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
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 1     1   6 use strict;
  1         2  
  1         32  
78 1     1   5 use warnings;
  1         1  
  1         31  
79              
80 1     1   3 use base qw(Bio::Search::Result::GenericResult);
  1         1  
  1         220  
81              
82             =head2 new
83              
84             Title : new
85             Usage : my $obj = Bio::Search::Result::INFERNALResult->new();
86             Function: Builds a new Bio::Search::Result::INFERNALResult object
87             Returns : Bio::Search::Result::INFERNALResult
88             Args : -cm_name => string, name of covariance model (CM) file.
89             plus Bio::Search::Result::GenericResult parameters
90              
91             =cut
92              
93             sub new {
94 8     8 1 46 my ($class, @args) = @_;
95 8         58 my $self = $class->SUPER::new(@args);
96              
97 8         42 my ($cm) = $self->_rearrange([qw(CM_NAME)], @args);
98 8 100       25 if (defined $cm) { $self->cm_name($cm) }
  3         10  
99              
100 8         32 return $self;
101             }
102              
103             =head2 cm_name
104              
105             Title : cm_name
106             Usage : $obj->cm_name($newvalue)
107             Function: Get/Set value of the covariance model file name (cm_name)
108             Returns : value of cm_name
109             Args : newvalue (optional)
110              
111             =cut
112              
113             sub cm_name {
114 5     5 1 8 my ($self, $value) = @_;
115 5 100       11 if (defined $value) {
116 3         6 $self->{'_cm_name'} = $value;
117             }
118 5         10 return $self->{'_cm_name'};
119             }
120              
121             1;