comparison variant_effect_predictor/Bio/Location/CoordinatePolicyI.pm @ 0:1f6dce3d34e0

Uploaded
author mahtabm
date Thu, 11 Apr 2013 02:01:53 -0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:1f6dce3d34e0
1 # $Id: CoordinatePolicyI.pm,v 1.4 2002/10/22 07:38:34 lapp Exp $
2 #
3 # BioPerl module for Bio::Location::CoordinatePolicyI
4 # Cared for by Hilmar Lapp <hlapp@gmx.net>
5 # and Jason Stajich <jason@bioperl.org>
6 #
7 # Copyright Hilmar Lapp, Jason Stajich
8 #
9 # You may distribute this module under the same terms as perl itself
10 # POD documentation - main docs before the code
11
12 =head1 NAME
13
14 Bio::Location::CoordinatePolicyI - Abstract interface for objects implementing
15 a certain policy of computing integer-valued coordinates of a Location
16
17 =head1 SYNOPSIS
18
19 # get a location, e.g., from a SeqFeature
20 $location = $feature->location();
21 # examine its coordinate computation policy
22 print "Location of feature ", $feature->primary_tag(), " employs a ",
23 ref($location->coordinate_policy()),
24 " instance for coordinate computation\n";
25 # change the policy, e.g. because the user chose to do so
26 $location->coordinate_policy(Bio::Location::NarrowestCoordPolicy->new());
27
28 =head1 DESCRIPTION
29
30 Objects implementing this interface are used by Bio::LocationI
31 implementing objects to determine integer-valued coordinates when
32 asked for it. While this may seem trivial for simple locations, there
33 are different ways to do it for fuzzy or compound (split)
34 locations. Classes implementing this interface implement a certain
35 policy, like 'always widest range', 'always smallest range', 'mean for
36 BETWEEN locations', etc. By installing a different policy object in a
37 Location object, the behaviour of coordinate computation can be changed
38 on-the-fly, and with a single line of code client-side.
39
40 =head1 FEEDBACK
41
42 User feedback is an integral part of the evolution of this and other
43 Bioperl modules. Send your comments and suggestions preferably to one
44 of the Bioperl mailing lists. Your participation is much appreciated.
45
46 bioperl-l@bioperl.org - General discussion
47 http://bio.perl.org/MailList.html - About the mailing lists
48
49 =head2 Reporting Bugs
50
51 Report bugs to the Bioperl bug tracking system to help us keep track
52 the bugs and their resolution. Bug reports can be submitted via email
53 or the web:
54
55 bioperl-bugs@bio.perl.org
56 http://bugzilla.bioperl.org/
57
58 =head1 AUTHOR - Hilmar Lapp, Jason Stajich
59
60 Email hlapp@gmx.net, jason@bioperl.org
61
62 =head1 APPENDIX
63
64 The rest of the documentation details each of the object
65 methods. Internal methods are usually preceded with a _
66
67 =cut
68
69 # Let the code begin...
70
71
72 package Bio::Location::CoordinatePolicyI;
73 use vars qw(@ISA);
74 use strict;
75 use Bio::Root::RootI;
76
77 @ISA = qw(Bio::Root::RootI);
78
79 =head2 start
80
81 Title : start
82 Usage : $start = $policy->start($location);
83 Function: Get the integer-valued start coordinate of the given location as
84 computed by this computation policy.
85 Returns : A positive integer number.
86 Args : A Bio::LocationI implementing object.
87
88 =cut
89
90 sub start {
91 my ($self) = @_;
92 $self->throw_not_implemented();
93 }
94
95 =head2 end
96
97 Title : end
98 Usage : $end = $policy->end($location);
99 Function: Get the integer-valued end coordinate of the given location as
100 computed by this computation policy.
101 Returns : A positive integer number.
102 Args : A Bio::LocationI implementing object.
103
104 =cut
105
106 sub end {
107 my ($self) = @_;
108 $self->throw_not_implemented();
109 }
110
111 1;