Bio::DB::TFBS namespace has been moved to its own distribution named after itself
[bioperl-live.git] / Bio / Search / Result / INFERNALResult.pm
blob15850cc90878246c11f8da7f854e0a51deea3da3
2 # BioPerl module for Bio::Search::Result::INFERNALResult.pm
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Paul Cantalupo
8 # Copyright Paul Cantalupo
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
14 =head1 NAME
16 Bio::Search::Result::INFERNALResult - A Result object for INFERNAL results
18 =head1 SYNOPSIS
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";
30 =head1 DESCRIPTION
32 This object is a specialization of L<Bio::Search::Result::GenericResult>. There
33 is one extra method called L<cm_name>.
35 =head1 FEEDBACK
37 =head2 Mailing Lists
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.
43 bioperl-l@bioperl.org - General discussion
44 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
46 =head2 Support
48 Please direct usage questions or support issues to the mailing list:
50 I<bioperl-l@bioperl.org>
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.
57 =head2 Reporting Bugs
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:
63 https://github.com/bioperl/bioperl-live/issues
65 =head1 AUTHOR - Paul Cantalupo
67 =head1 APPENDIX
69 The rest of the documentation details each of the object methods.
70 Internal methods are usually preceded with a _
72 =cut
74 # Let the code begin...
76 package Bio::Search::Result::INFERNALResult;
77 use strict;
78 use warnings;
80 use base qw(Bio::Search::Result::GenericResult);
82 =head2 new
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
91 =cut
93 sub new {
94 my ($class, @args) = @_;
95 my $self = $class->SUPER::new(@args);
97 my ($cm) = $self->_rearrange([qw(CM_NAME)], @args);
98 if (defined $cm) { $self->cm_name($cm) }
100 return $self;
103 =head2 cm_name
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)
111 =cut
113 sub cm_name {
114 my ($self, $value) = @_;
115 if (defined $value) {
116 $self->{'_cm_name'} = $value;
118 return $self->{'_cm_name'};