Bio::Graphics Util
SummaryIncluded librariesPackage variablesGeneral documentationMethods
Summary
Bio::Graphics::Util - non-object-oriented utilities used in Bio::Graphics modules
Package variables
No package variables defined.
Included modules
Bio::Root::Version
Inherit
Exporter
Synopsis
No synopsis!
Description
No description!
Methods
frame_and_offset
No description
Code
Methods description
None available.
Methods code
frame_and_offsetdescriptionprevnextTop
sub frame_and_offset {
  my ($pos,$strand,$phase) = @_;
  $strand ||= +1;
  $phase  ||= 0;
  my $codon_start =  $strand >= 0
                   ? $pos + $phase
	           : $pos - $phase;  # probably wrong
my $frame = ($codon_start-1) % 3; # my $frame = $strand >= 0
# ? ($pos - $phase - 1) % 3
# : (1 - $pos - $phase) % 3;
my $offset = $strand >= 0 ? $phase : -$phase; return wantarray ? ($frame,$offset) : $frame;
}
General documentation
No general documentation available.