view release on metacpan or search on metacpan
lib/FAST/Bio/Location/Atomic.pm view on Meta::CPAN
sub start_pos_type {
my($self) = @_;
return 'EXACT';
}
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : none
=cut
sub min_end {
my($self,$value) = @_;
if(defined($value)) {
$self->{'_end'} = $value;
}
return $self->{'_end'};
}
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get maximum ending location of feature endpoint
In this implementation this is exactly the same as min_end().
Returns : integer or undef if no maximum ending point.
Args : none
=cut
sub max_end {
my($self,@args) = @_;
lib/FAST/Bio/Location/Fuzzy.pm view on Meta::CPAN
if(defined($value)) {
$self->{'_start_pos_type'} = $value;
}
return $self->{'_start_pos_type'};
}
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get/set minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : integer or undef on set
=cut
sub min_end {
my ($self,@args) = @_;
if(@args) {
$self->{'_min_end'} = $args[0]; # the value may be undef!
}
return $self->{'_min_end'};
}
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get/set maximum ending location of feature endpoint
Returns : integer or undef if no maximum ending point.
Args : integer or undef on set
=cut
sub max_end {
my ($self,@args) = @_;
if(@args) {
$self->{'_max_end'} = $args[0]; # the value may be undef!
lib/FAST/Bio/Location/Fuzzy.pm view on Meta::CPAN
=cut
=head2 _fuzzypointdecode
Title : _fuzzypointdecode
Usage : ($type,$min,$max) = $self->_fuzzypointdecode('<5');
Function: Decode a fuzzy string.
Returns : A 3-element array consisting of the type of location, the
minimum integer, and the maximum integer describing the range
of coordinates this start or endpoint refers to. Minimum or
maximum coordinate may be undefined.
: Returns empty array on fail.
Args : fuzzypoint string
=cut
sub _fuzzypointdecode {
my ($self, $string) = @_;
return () if( !defined $string);
# strip off leading and trailing space
lib/FAST/Bio/Location/FuzzyLocationI.pm view on Meta::CPAN
Returns : type of position coded as text
('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')
Args : none
=cut
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : none
=cut
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get maximum ending location of feature endpoint
Returns : integer or undef if no maximum ending point.
Args : none
=cut
=head2 end_pos_type
Title : end_pos_type
Usage : my $end_pos_type = $location->end_pos_type();
Function: Get end position type (ie <,>, ^)
lib/FAST/Bio/Location/Simple.pm view on Meta::CPAN
Returns : type of position coded as text
('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')
Args : none
=cut
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : none
=cut
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get maximum ending location of feature endpoint
In this implementation this is exactly the same as min_end().
Returns : integer or undef if no maximum ending point.
Args : none
=cut
=head2 end_pos_type
lib/FAST/Bio/Location/Split.pm view on Meta::CPAN
"that is not possible, try manipulating the sub Locations");
}
my @locs = $self->sub_Location();
return ( @locs ) ? $locs[0]->start_pos_type() : undef;
}
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : none
=cut
sub min_end {
my ($self,$value) = @_;
if( defined $value ) {
$self->throw("Trying to set the minimum end point of a split location, ".
lib/FAST/Bio/Location/Split.pm view on Meta::CPAN
# reverse sort locations by largest ending to smallest ending
my @locs = $self->sub_Location(-1);
return $locs[0]->min_end() if @locs;
return;
}
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get maximum ending location of feature endpoint
Returns : integer or undef if no maximum ending point.
Args : none
=cut
sub max_end {
my ($self,$value) = @_;
if( defined $value ) {
$self->throw("Trying to set the maximum end point of a split location, ".
lib/FAST/Bio/Location/SplitLocationI.pm view on Meta::CPAN
Returns : type of position coded as text
('BEFORE', 'AFTER', 'EXACT','WITHIN', 'BETWEEN')
Args : none
=cut
=head2 min_end
Title : min_end
Usage : my $minend = $location->min_end();
Function: Get minimum ending location of feature endpoint
Returns : integer or undef if no minimum ending point.
Args : none
=cut
=head2 max_end
Title : max_end
Usage : my $maxend = $location->max_end();
Function: Get maximum ending location of feature endpoint
Returns : integer or undef if no maximum ending point.
Args : none
=cut
=head2 end_pos_type
Title : end_pos_type
Usage : my $end_pos_type = $location->end_pos_type();
Function: Get end position type (ie <,>, ^)
lib/FAST/Bio/Search/HSP/GenericHSP.pm view on Meta::CPAN
sub _calculate_seq_positions {
my ($self,@args) = @_;
return unless ( $self->{'_sequenceschanged'} );
$self->{'_sequenceschanged'} = 0;
my ($seqString, $qseq,$sseq) = ( $self->homology_string(),
$self->query_string(),
$self->hit_string() );
my ($mlen, $qlen, $slen) = (CORE::length($seqString), CORE::length($qseq), CORE::length($sseq));
my $qdir = $self->query->strand || 1;
my $sdir = $self->hit->strand || 1;
my ($resCount_query, $endpoint_query) = ($qdir <=0) ? ($self->query->end, $self->query->start)
: ($self->query->start, $self->query->end);
my ($resCount_sbjct, $endpoint_sbjct) = ($sdir <=0) ? ($self->hit->end, $self->hit->start)
: ($self->hit->start, $self->hit->end);
my $prog = $self->algorithm;
if( $prog =~ /FAST|SSEARCH|SMITH-WATERMAN/i ) {
# we infer the end of the regional sequence where the first and last
# non spaces are in the homology string
# then we use the HSP->length to tell us how far to read
# to cut off the end of the sequence
lib/FAST/List/Gen.pm view on Meta::CPAN
say <A .. ZZ>->str; # 'A B C D E ... ZX ZY ZZ'
<1..>->zip(<a..>)->say(10); # '1 a 2 b 3 c 4 d 5 e'
to specify an infinite range, you can pass C< range > an infinite value
(C< 9**9**9 > works well), or the glob C< ** >, or the string C< '*' >
range(1, 9**9**9) ~~ range(1, **) ~~ range(1, '*') ~~ <1..*> ~~ <1..>
ranges only store their endpoints, and ranges of all sizes take up the same
amount of memory.
=cut
sub range ($;$$) {
splice @_, 1, 1, 9**9**9
if @_ > 1 and $_[1] eq '*'
|| \$_[1] == \**;
for (@_) {
defined