Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/Location/FuzzyLocationI.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: FuzzyLocationI.pm,v 1.17 2002/12/01 00:05:20 jason Exp $ | |
| 2 # | |
| 3 # BioPerl module for Bio::Location::FuzzyLocationI | |
| 4 # Cared for by Jason Stajich <jason@bioperl.org> | |
| 5 # | |
| 6 # Copyright Jason Stajich | |
| 7 # | |
| 8 # You may distribute this module under the same terms as perl itself | |
| 9 # POD documentation - main docs before the code | |
| 10 | |
| 11 =head1 NAME | |
| 12 | |
| 13 Bio::Location::FuzzyLocationI - Abstract interface of a Location on a Sequence | |
| 14 which has unclear start/end location | |
| 15 | |
| 16 =head1 SYNOPSIS | |
| 17 | |
| 18 # Get a FuzzyLocationI object somehow | |
| 19 print "Fuzzy FT location string is ", $location->to_FTstring(); | |
| 20 print "location is of the type ", $location->loc_type, "\n"; | |
| 21 | |
| 22 =head1 DESCRIPTION | |
| 23 | |
| 24 This interface encapsulates the necessary methods for representing a | |
| 25 Fuzzy Location, one that does not have clear start and/or end points. | |
| 26 This will initially serve to handle features from Genbank/EMBL feature | |
| 27 tables that are written as 1^100 meaning between bases 1 and 100 or | |
| 28 E<lt>100..300 meaning it starts somewhere before 100. Advanced | |
| 29 implementations of this interface may be able to handle the necessary | |
| 30 logic of overlaps/intersection/contains/union. It was constructed to | |
| 31 handle fuzzy locations that can be represented in Genbank/EMBL. | |
| 32 | |
| 33 =head1 FEEDBACK | |
| 34 | |
| 35 User feedback is an integral part of the evolution of this and other | |
| 36 Bioperl modules. Send your comments and suggestions preferably to one | |
| 37 of the Bioperl mailing lists. Your participation is much appreciated. | |
| 38 | |
| 39 bioperl-l@bioperl.org - General discussion | |
| 40 http://bio.perl.org/MailList.html - About the mailing lists | |
| 41 | |
| 42 =head2 Reporting Bugs | |
| 43 | |
| 44 Report bugs to the Bioperl bug tracking system to help us keep track | |
| 45 the bugs and their resolution. Bug reports can be submitted via email | |
| 46 or the web: | |
| 47 | |
| 48 bioperl-bugs@bio.perl.org | |
| 49 http://bugzilla.bioperl.org/ | |
| 50 | |
| 51 =head1 AUTHOR - Jason Stajich | |
| 52 | |
| 53 Email jason@bioperl.org | |
| 54 | |
| 55 =head1 APPENDIX | |
| 56 | |
| 57 The rest of the documentation details each of the object | |
| 58 methods. Internal methods are usually preceded with a _ | |
| 59 | |
| 60 =cut | |
| 61 | |
| 62 # Let the code begin... | |
| 63 | |
| 64 | |
| 65 package Bio::Location::FuzzyLocationI; | |
| 66 use vars qw(@ISA); | |
| 67 use strict; | |
| 68 | |
| 69 use Bio::LocationI; | |
| 70 use Carp; | |
| 71 | |
| 72 @ISA = qw(Bio::LocationI); | |
| 73 | |
| 74 =head1 LocationI methods | |
| 75 | |
| 76 =head2 location_type | |
| 77 | |
| 78 Title : loc_type | |
| 79 Usage : my $location_type = $location->location_type(); | |
| 80 Function: Get location type encoded as text | |
| 81 Returns : string ('EXACT', 'WITHIN', 'BETWEEN') | |
| 82 Args : none | |
| 83 | |
| 84 =cut | |
| 85 | |
| 86 sub location_type { | |
| 87 my ($self) = @_; | |
| 88 $self->throw_not_implemented(); | |
| 89 } | |
| 90 | |
| 91 =head1 Bio::LocationI methods | |
| 92 | |
| 93 Bio::LocationI methods follow | |
| 94 | |
| 95 =head2 min_start | |
| 96 | |
| 97 Title : min_start | |
| 98 Usage : my $minstart = $location->min_start(); | |
| 99 Function: Get minimum starting location of feature startpoint | |
| 100 Returns : integer or undef if no maximum starting point. | |
| 101 Args : none | |
| 102 | |
| 103 =cut | |
| 104 | |
| 105 =head2 max_start | |
| 106 | |
| 107 Title : max_start | |
| 108 Usage : my $maxstart = $location->max_start(); | |
| 109 Function: Get maximum starting location of feature startpoint | |
| 110 Returns : integer or undef if no maximum starting point. | |
| 111 Args : none | |
| 112 | |
| 113 =cut | |
| 114 | |
| 115 =head2 start_pos_type | |
| 116 | |
| 117 Title : start_pos_type | |
| 118 Usage : my $start_pos_type = $location->start_pos_type(); | |
| 119 Function: Get start position type (ie <,>, ^) | |
| 120 Returns : type of position coded as text | |
| 121 ('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN') | |
| 122 Args : none | |
| 123 | |
| 124 =cut | |
| 125 | |
| 126 =head2 min_end | |
| 127 | |
| 128 Title : min_end | |
| 129 Usage : my $minend = $location->min_end(); | |
| 130 Function: Get minimum ending location of feature endpoint | |
| 131 Returns : integer or undef if no minimum ending point. | |
| 132 Args : none | |
| 133 | |
| 134 =cut | |
| 135 | |
| 136 =head2 max_end | |
| 137 | |
| 138 Title : max_end | |
| 139 Usage : my $maxend = $location->max_end(); | |
| 140 Function: Get maximum ending location of feature endpoint | |
| 141 Returns : integer or undef if no maximum ending point. | |
| 142 Args : none | |
| 143 | |
| 144 =cut | |
| 145 | |
| 146 =head2 end_pos_type | |
| 147 | |
| 148 Title : end_pos_type | |
| 149 Usage : my $end_pos_type = $location->end_pos_type(); | |
| 150 Function: Get end position type (ie <,>, ^) | |
| 151 Returns : type of position coded as text | |
| 152 ('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN') | |
| 153 Args : none | |
| 154 | |
| 155 =cut | |
| 156 | |
| 157 =head2 seq_id | |
| 158 | |
| 159 Title : seq_id | |
| 160 Usage : my $seqid = $location->seq_id(); | |
| 161 Function: Get/Set seq_id that location refers to | |
| 162 Returns : seq_id | |
| 163 Args : [optional] seq_id value to set | |
| 164 | |
| 165 =cut | |
| 166 | |
| 167 =head2 coordinate_policy | |
| 168 | |
| 169 Title : coordinate_policy | |
| 170 Usage : $policy = $location->coordinate_policy(); | |
| 171 $location->coordinate_policy($mypolicy); # set may not be possible | |
| 172 Function: Get the coordinate computing policy employed by this object. | |
| 173 | |
| 174 See Bio::Location::CoordinatePolicyI for documentation about | |
| 175 the policy object and its use. | |
| 176 | |
| 177 The interface *does not* require implementing classes to accept | |
| 178 setting of a different policy. The implementation provided here | |
| 179 does, however, allow to do so. | |
| 180 | |
| 181 Implementors of this interface are expected to initialize every | |
| 182 new instance with a CoordinatePolicyI object. The implementation | |
| 183 provided here will return a default policy object if none has | |
| 184 been set yet. To change this default policy object call this | |
| 185 method as a class method with an appropriate argument. Note that | |
| 186 in this case only subsequently created Location objects will be | |
| 187 affected. | |
| 188 | |
| 189 Returns : A Bio::Location::CoordinatePolicyI implementing object. | |
| 190 Args : On set, a Bio::Location::CoordinatePolicyI implementing object. | |
| 191 | |
| 192 =cut | |
| 193 | |
| 194 =head2 to_FTstring | |
| 195 | |
| 196 Title : to_FTstring | |
| 197 Usage : my $locstr = $location->to_FTstring() | |
| 198 Function: returns the FeatureTable string of this location | |
| 199 Returns : string | |
| 200 Args : none | |
| 201 | |
| 202 =cut | |
| 203 | |
| 204 1; |
