Bio::Location AvWithinCoordPolicy
 Summary Included libraries Package variables Synopsis Description General documentation Methods
Toolbar
 WebCvs Raw content
Summary
Bio::Location::AvWithinCoordPolicy - class implementing
Bio::Location::CoordinatePolicy as the average for WITHIN and the widest possible and reasonable range otherwise
Package variables
No package variables defined.
Included modules
Inherit
Synopsis
See Bio::Location::CoordinatePolicyI
Description
CoordinatePolicyI implementing objects are used by Bio::LocationI
implementing objects to determine integer-valued coordinates when
This class will compute the coordinates such that for fuzzy locations
of type WITHIN and BETWEEN the average of the two limits will be
returned, and for all other locations it will return the widest
possible range, but by using some common sense. This means that
e.g. locations like "<5..100" (start before position 5) will return 5
as start (returned values have to be positive integers).
Methods
 end Description Code new No description Code start Description Code
Methods description
 end code next Top
 ` Title : end Usage : \$end = \$policy->end(\$location); Function: Get the integer-valued end coordinate of the given location as computed by this computation policy. Returns : A positive integer number. Args : A Bio::LocationI implementing object.`
 start code prev next Top
 ` Title : start Usage : \$start = \$policy->start(\$location); Function: Get the integer-valued start coordinate of the given location as computed by this computation policy. Returns : A positive integer number. Args : A Bio::LocationI implementing object.`
Methods code
 end description prev next Top
sub end {
```    my (\$self,\$loc) = @_;

if((\$loc->end_pos_type() eq 'WITHIN') ||
(\$loc->end_pos_type() eq 'BETWEEN')) {
my (\$min, \$max) = (\$loc->min_end(), \$loc->max_end());
return int((\$min+\$max)/2) if(\$min && \$max);    }
return \$self->SUPER::end(\$loc);
}

1;```
}
 new description prev next Top
sub new {
```     my (\$class, @args) = @_;
my \$self = \$class->SUPER::new(@args);

return \$self;```
}
 start description prev next Top
sub start {
```    my (\$self,\$loc) = @_;

if((\$loc->start_pos_type() eq 'WITHIN') ||
(\$loc->start_pos_type() eq 'BETWEEN')) {
my (\$min, \$max) = (\$loc->min_start(), \$loc->max_start());
return int((\$min+\$max)/2) if(\$min && \$max);    }
return \$self->SUPER::start(\$loc);```
}
General documentation
 FEEDBACK Top
User feedback is an integral part of the evolution of this and other
Bioperl modules. Send your comments and suggestions preferably to one
of the Bioperl mailing lists. Your participation is much appreciated.
`  bioperl-l@bioperl.org             - General discussion  http://bio.perl.org/MailList.html - About the mailing lists`
 Reporting Bugs Top
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via email
or the web:
`  bioperl-bugs@bio.perl.org  http://bugzilla.bioperl.org/`
 AUTHOR - Hilmar Lapp, Jason Stajich Top
Email <hlapp@gmx.net>, <jason@bioperl.org>
 APPENDIX Top
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _