| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
#----------------------------------------------------------------- |
|
2
|
|
|
|
|
|
|
# |
|
3
|
|
|
|
|
|
|
# BioPerl module Bio::SearchIO::SearchWriterI |
|
4
|
|
|
|
|
|
|
# |
|
5
|
|
|
|
|
|
|
# Please direct questions and support issues to |
|
6
|
|
|
|
|
|
|
# |
|
7
|
|
|
|
|
|
|
# Cared for by Steve Chervitz |
|
8
|
|
|
|
|
|
|
# |
|
9
|
|
|
|
|
|
|
# You may distribute this module under the same terms as perl itself |
|
10
|
|
|
|
|
|
|
#----------------------------------------------------------------- |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 NAME |
|
13
|
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Bio::SearchIO::SearchWriterI - Interface for outputting parsed Search results |
|
15
|
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Bio::SearchIO::SearchWriterI objects cannot be instantiated since this |
|
19
|
|
|
|
|
|
|
module defines a pure interface. |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
Given an object that implements the Bio::SearchIO::SearchWriterI interface, |
|
22
|
|
|
|
|
|
|
you can do the following things with it: |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
print $writer->to_string( $result_obj, @args ); |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
27
|
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
This module defines abstract methods that all subclasses must implement |
|
29
|
|
|
|
|
|
|
to be used for outputting results from L |
|
30
|
|
|
|
|
|
|
objects. |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 AUTHOR |
|
33
|
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Steve Chervitz Esac-at-bioperl.orgE |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 DISCLAIMER |
|
37
|
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
This software is provided "as is" without warranty of any kind. |
|
39
|
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 APPENDIX |
|
41
|
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
The rest of the documentation details each of the object methods. |
|
43
|
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=cut |
|
45
|
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
package Bio::SearchIO::SearchWriterI; |
|
47
|
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
|
|
49
|
5
|
|
|
5
|
|
23
|
use base qw(Bio::Root::RootI); |
|
|
5
|
|
|
|
|
5
|
|
|
|
5
|
|
|
|
|
974
|
|
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head2 to_string |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Purpose : Produces data for each Search::Result::ResultI in a string. |
|
54
|
|
|
|
|
|
|
: This is an abstract method. For some useful implementations, |
|
55
|
|
|
|
|
|
|
: see ResultTableWriter.pm, HitTableWriter.pm, |
|
56
|
|
|
|
|
|
|
: and HSPTableWriter.pm. |
|
57
|
|
|
|
|
|
|
Usage : print $writer->to_string( $result_obj, @args ); |
|
58
|
|
|
|
|
|
|
Argument : $result_obj = A Bio::Search::Result::ResultI object |
|
59
|
|
|
|
|
|
|
: @args = any additional arguments used by your implementation. |
|
60
|
|
|
|
|
|
|
Returns : String containing data for each search Result or any of its |
|
61
|
|
|
|
|
|
|
: sub-objects (Hits and HSPs). |
|
62
|
|
|
|
|
|
|
Throws : n/a |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=cut |
|
65
|
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
sub to_string { |
|
67
|
0
|
|
|
0
|
1
|
0
|
my ($self, $result, @args) = @_; |
|
68
|
0
|
|
|
|
|
0
|
$self->throw_not_implemented; |
|
69
|
|
|
|
|
|
|
} |
|
70
|
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=head2 start_report |
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
Title : start_report |
|
74
|
|
|
|
|
|
|
Usage : $self->start_report() |
|
75
|
|
|
|
|
|
|
Function: The method to call when starting a report. You can override it |
|
76
|
|
|
|
|
|
|
to make a custom header |
|
77
|
|
|
|
|
|
|
Returns : string |
|
78
|
|
|
|
|
|
|
Args : none |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
|
81
|
|
|
|
|
|
|
|
|
82
|
0
|
|
|
0
|
1
|
0
|
sub start_report { return '' } |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 end_report |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Title : end_report |
|
87
|
|
|
|
|
|
|
Usage : $self->end_report() |
|
88
|
|
|
|
|
|
|
Function: The method to call when ending a report, this is |
|
89
|
|
|
|
|
|
|
mostly for cleanup for formats which require you to |
|
90
|
|
|
|
|
|
|
have something at the end of the document ( |