Bio/Location/CoordinatePolicyI.pm

filter: Statementstmt 66.6% 8 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 2 / 4 Podpod 100% 2 / 2 totaltotal 66.6% 12 / 18 CC 1 SCAR 4.1
CC
1
Cov
67%
start
2.0
end
2.0
BEGIN
1.0
CRAP 1.5
« Bio/Factory/TreeFactoryI.pm ↑ Summary Bio/Search/StatisticsI.pm »
1 #
2 # BioPerl module for Bio::Location::CoordinatePolicyI
3 # Please direct questions and support issues to <bioperl-l@bioperl.org>
4 #
5 # Cared for by Hilmar Lapp <hlapp@gmx.net>
6 # and Jason Stajich <jason@bioperl.org>
7 #
8 # Copyright Hilmar Lapp, Jason Stajich
9 #
10 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
12  
13 =head1 NAME
14  
15 Bio::Location::CoordinatePolicyI - Abstract interface for objects implementing
16 a certain policy of computing integer-valued coordinates of a Location
17  
18 =head1 SYNOPSIS
19  
20 # get a location, e.g., from a SeqFeature
21 $location = $feature->location();
22 # examine its coordinate computation policy
23 print "Location of feature ", $feature->primary_tag(), " employs a ",
24 ref($location->coordinate_policy()),
25 " instance for coordinate computation\n";
26 # change the policy, e.g. because the user chose to do so
27 $location->coordinate_policy(Bio::Location::NarrowestCoordPolicy->new());
28  
29 =head1 DESCRIPTION
30  
31 Objects implementing this interface are used by Bio::LocationI
32 implementing objects to determine integer-valued coordinates when
33 asked for it. While this may seem trivial for simple locations, there
34 are different ways to do it for fuzzy or compound (split)
35 locations. Classes implementing this interface implement a certain
36 policy, like 'always widest range', 'always smallest range', 'mean for
37 BETWEEN locations', etc. By installing a different policy object in a
38 Location object, the behaviour of coordinate computation can be changed
39 on-the-fly, and with a single line of code client-side.
40  
41 =head1 FEEDBACK
42  
43 User feedback is an integral part of the evolution of this and other
44 Bioperl modules. Send your comments and suggestions preferably to one
45 of the Bioperl mailing lists. Your participation is much appreciated.
46  
47 bioperl-l@bioperl.org - General discussion
48 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
49  
50 =head2 Support
51  
52 Please direct usage questions or support issues to the mailing list:
53  
54 I<bioperl-l@bioperl.org>
55  
56 rather than to the module maintainer directly. Many experienced and
57 reponsive experts will be able look at the problem and quickly
58 address it. Please include a thorough description of the problem
59 with code and data examples if at all possible.
60  
61 =head2 Reporting Bugs
62  
63 Report bugs to the Bioperl bug tracking system to help us keep track
64 the bugs and their resolution. Bug reports can be submitted via the
65 web:
66  
67 https://github.com/bioperl/bioperl-live/issues
68  
69 =head1 AUTHOR - Hilmar Lapp, Jason Stajich
70  
71 Email hlapp@gmx.net, jason@bioperl.org
72  
73 =head1 APPENDIX
74  
75 The rest of the documentation details each of the object
76 methods. Internal methods are usually preceded with a _
77  
78 =cut
79  
80 # Let the code begin...
81  
82  
83 package Bio::Location::CoordinatePolicyI;
84 331 $Bio::Location::CoordinatePolicyI::VERSION = '1.7.8';
85 331 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
86  
87 331 ▶use base qw(Bio::Root::RootI);
Subroutine BEGIN: called CC=1 SCAR=0.0
88  
89 =head2 start
90  
91 Title : start
92 Usage : $start = $policy->start($location);
93 Function: Get the integer-valued start coordinate of the given location as
94 computed by this computation policy.
95 Returns : A positive integer number.
96 Args : A Bio::LocationI implementing object.
97  
98 =cut
99  
100 0 ▶sub start {
Subroutine start: not called CC=1 SCAR=6.9
Pod documented
101 0 my ($self) = @_;
102 0 $self->throw_not_implemented();
103 }
104  
105 =head2 end
106  
107 Title : end
108 Usage : $end = $policy->end($location);
109 Function: Get the integer-valued end coordinate of the given location as
110 computed by this computation policy.
111 Returns : A positive integer number.
112 Args : A Bio::LocationI implementing object.
113  
114 =cut
115  
116 0 ▶sub end {
Subroutine end: not called CC=1 SCAR=6.9
Pod documented
117 0 my ($self) = @_;
118 0 $self->throw_not_implemented();
119 }
120  
121 331 1;
« Bio/Factory/TreeFactoryI.pm ↑ Summary Bio/Search/StatisticsI.pm »