NAME
Bio::LocationI - Abstract interface of a Location on a Sequence
SYNOPSIS
# get a LocationI somehowprintf( "start = %d, end = %d, strand = %s, seq_id = %s\n",$location->start, $location->end, $location->strand,$location->seq_id);print "location str is ", $location->to_FTstring(), "\n";
DESCRIPTION
This Interface defines the methods for a Bio::LocationI, an object which encapsulates a location on a biological sequence. Locations need not be attached to actual sequences as they are stand alone objects. LocationI objects are used by Bio::SeqFeatureI objects to manage and represent locations for a Sequence Feature.
FEEDBACK
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.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
location_type
Title : location_typeUsage : my $location_type = $location->location_type();Function: Get location type encoded as textReturns : string ('EXACT', 'WITHIN', 'IN-BETWEEN')Args : none
start
Title : startUsage : $start = $location->start();Function: Get the start coordinate of this location as defined bythe currently active coordinate computation policy. Insimple cases, this will return the same number asmin_start() and max_start(), in more ambiguous cases likefuzzy locations the number may be equal to one or neitherof both.We override this here from RangeI in order to delegate'get' to a L<Bio::Location::CoordinatePolicy> implementingobject. Implementing classes may also wish to provide'set' functionality, in which case they *must* overridethis method. The implementation provided here will throwan exception if called with arguments.Returns : A positive integer value.Args : none
See Bio::Location::CoordinatePolicy for more information
end
Title : endUsage : $end = $location->end();Function: Get the end coordinate of this location as defined by thecurrently active coordinate computation policy. In simplecases, this will return the same number as min_end() andmax_end(), in more ambiguous cases like fuzzy locationsthe number may be equal to one or neither of both.We override this here from Bio::RangeI in order to delegate'get' to a L<Bio::Location::CoordinatePolicy> implementingobject. Implementing classes may also wish to provide'set' functionality, in which case they *must* overridethis method. The implementation provided here will throwan exception if called with arguments.Returns : A positive integer value.Args : none
See Bio::Location::CoordinatePolicy and Bio::RangeI for more information
min_start
Title : min_startUsage : my $minstart = $location->min_start();Function: Get minimum starting point of feature.Note that an implementation must not call start() in this method.Returns : integer or undef if no minimum starting point.Args : none
max_start
Title : max_startUsage : my $maxstart = $location->max_start();Function: Get maximum starting point of feature.Note that an implementation must not call start() in this methodunless start() is overridden such as not to delegate to thecoordinate computation policy object.Returns : integer or undef if no maximum starting point.Args : none
start_pos_type
Title : start_pos_typeUsage : my $start_pos_type = $location->start_pos_type();Function: Get start position type encoded as textKnown valid values are 'BEFORE' (<5..100), 'AFTER' (>5..100),'EXACT' (5..100), 'WITHIN' ((5.10)..100), 'BETWEEN', (5^6), withtheir meaning best explained by their GenBank/EMBL location stringencoding in brackets.Returns : string ('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')Args : none
flip_strand
Title : flip_strandUsage : $location->flip_strand();Function: Flip-flop a strand to the oppositeReturns : NoneArgs : None
min_end
Title : min_endUsage : my $minend = $location->min_end();Function: Get minimum ending point of feature.Note that an implementation must not call end() in this methodunless end() is overridden such as not to delegate to thecoordinate computation policy object.Returns : integer or undef if no minimum ending point.Args : none
max_end
Title : max_endUsage : my $maxend = $location->max_end();Function: Get maximum ending point of feature.Note that an implementation must not call end() in this methodunless end() is overridden such as not to delegate to thecoordinate computation policy object.Returns : integer or undef if no maximum ending point.Args : none
end_pos_type
Title : end_pos_typeUsage : my $end_pos_type = $location->end_pos_type();Function: Get end position encoded as text.Known valid values are 'BEFORE' (5..<100), 'AFTER' (5..>100),'EXACT' (5..100), 'WITHIN' (5..(90.100)), 'BETWEEN', (5^6), withtheir meaning best explained by their GenBank/EMBL location stringencoding in brackets.Returns : string ('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')Args : none
seq_id
Title : seq_idUsage : my $seqid = $location->seq_id();Function: Get/Set seq_id that location refers toReturns : seq_id (a string)Args : [optional] seq_id value to set
is_remote
Title : is_remoteUsage : $is_remote_loc = $loc->is_remote()Function: Whether or not a location is a remote location.A location is said to be remote if it is on a different'object' than the object which 'has' thislocation. Typically, features on a sequence will sometimeshave a remote location, which means that the location ofthe feature is on a different sequence than the one that isattached to the feature. In such a case, $loc->seq_id willbe different from $feat->seq_id (usually they will be thesame).While this may sound weird, it reflects the location of thekind of AL445212.9:83662..166657 which can be found in GenBank/EMBLfeature tables.Example :Returns : TRUE if the location is a remote location, and FALSE otherwiseArgs : Value to set to
coordinate_policy
Title : coordinate_policyUsage : $policy = $location->coordinate_policy();$location->coordinate_policy($mypolicy); # set may not be possibleFunction: Get the coordinate computing policy employed by this object.See L<Bio::Location::CoordinatePolicyI> for documentationabout the policy object and its use.The interface *does not* require implementing classes toaccept setting of a different policy. The implementationprovided here does, however, allow one to do so.Implementors of this interface are expected to initializeevery new instance with aL<Bio::Location::CoordinatePolicyI> object. Theimplementation provided here will return a default policyobject if none has been set yet. To change this defaultpolicy object call this method as a class method with anappropriate argument. Note that in this case onlysubsequently created Location objects will be affected.Returns : A L<Bio::Location::CoordinatePolicyI> implementing object.Args : On set, a L<Bio::Location::CoordinatePolicyI> implementing object.
See Bio::Location::CoordinatePolicyI for more information
to_FTstring
Title : to_FTstringUsage : my $locstr = $location->to_FTstring()Function: returns the FeatureTable string of this locationReturns : stringArgs : none
each_Location
Title : each_LocationUsage : @locations = $locObject->each_Location($order);Function: Conserved function call across Location:: modules - willreturn an array containing the component Location(s) inthat object, regardless if the calling object is itself asingle location or one containing sublocations.Returns : an array of Bio::LocationI implementing objectsArgs : Optional sort order to be passed to sub_Location() for Splits
valid_Location
Title : valid_LocationUsage : if ($location->valid_location) {...};Function: boolean method to determine whether location is considered valid(has minimum requirements for a specific LocationI implementation)Returns : Boolean value: true if location is valid, false otherwiseArgs : none