NAME
Bio::Location::Atomic - Implementation of a Atomic Location on a Sequence
SYNOPSIS
use Bio::Location::Atomic;my $location = Bio::Location::Atomic->new(-start => 1, -end => 100,-strand => 1 );if( $location->strand == -1 ) {printf "complement(%d..%d)\n", $location->start, $location->end;} else {printf "%d..%d\n", $location->start, $location->end;}
DESCRIPTION
This is an implementation of Bio::LocationI to manage simple location information on a Sequence.
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 _
start
Title : startUsage : $start = $loc->start();Function: get/set the start of this rangeReturns : the start of this rangeArgs : optionally allows the start to be set: using $loc->start($start)
end
Title : endUsage : $end = $loc->end();Function: get/set the end of this rangeReturns : the end of this rangeArgs : optionally allows the end to be set: using $loc->end($start)
strand
Title : strandUsage : $strand = $loc->strand();Function: get/set the strand of this rangeReturns : the strandidness (-1, 0, +1)Args : optionally allows the strand to be set: using $loc->strand($strand)
flip_strand
Title : flip_strandUsage : $location->flip_strand();Function: Flip-flop a strand to the oppositeReturns : NoneArgs : 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
length
Title : lengthUsage : $len = $loc->length();Function: get the length in the coordinate space this location spansExample :Returns : an integerArgs : none
min_start
Title : min_startUsage : my $minstart = $location->min_start();Function: Get minimum starting location of feature startpointReturns : integer or undef if no minimum starting point.Args : none
max_start
Title : max_startUsage : my $maxstart = $location->max_start();Function: Get maximum starting location of feature startpoint.In this implementation this is exactly the same as min_start().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 (ie <,>, ^).In this implementation this will always be 'EXACT'.Returns : type of position coded as text('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')Args : none
min_end
Title : min_endUsage : my $minend = $location->min_end();Function: Get minimum ending location of feature endpointReturns : integer or undef if no minimum ending point.Args : none
max_end
Title : max_endUsage : my $maxend = $location->max_end();Function: Get maximum ending location of feature endpointIn this implementation this is exactly the same as min_end().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 type (ie <,>, ^)In this implementation this will always be 'EXACT'.Returns : type of position coded as text('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')Args : none
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
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
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 objects - forSimple locations, the return value is just itself.Args :
to_FTstring
Title : to_FTstringUsage : my $locstr = $location->to_FTstring()Function: returns the FeatureTable string of this locationReturns : stringArgs : none
valid_Location
Title : valid_LocationUsage : if ($location->valid_location) {...};Function: boolean method to determine whether location is considered valid(has minimum requirements for Simple implementation)Returns : Boolean value: true if location is valid, false otherwiseArgs : none
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
trunc
Title : truncUsage : $trunc_location = $location->trunc($start, $end, $relative_ori);Function: To truncate a location and keep annotations and featureswithin the truncated segment intact.This might do things differently where the truncationsplits the location in half.CAVEAT : As yet, this is an untested and unannounced method. Usewith caution!Returns : A L<Bio::Location::Atomic> object.Args : The start and end position for the trunction, and the relativeorientation.