Bio::PrimarySeq
Fasta
Package variables
No package variables defined.
Synopsis
No synopsis!
Description
No description!
Methods
| new | No description | Code |
| seq | No description | Code |
| subseq | No description | Code |
| trunc | No description | Code |
| display_id | No description | Code |
| accession_number | No description | Code |
| primary_id | No description | Code |
| can_call_new | No description | Code |
| alphabet | No description | Code |
| revcom | No description | Code |
| length | No description | Code |
| description | No description | Code |
Methods description
None available.
Methods code
sub new
{ my $class = shift;
$class = ref($class) if ref $class;
my ($db,$id,$start,$stop) = @_;
return bless { db => $db,
id => $id,
start => $start || 1,
stop => $stop || $db->length($id)
},$class;} |
sub seq
{ my $self = shift;
return $self->{db}->seq($self->{id},$self->{start},$self->{stop});} |
sub subseq
{ my $self = shift;
$self->trunc(@_)->seq(); } |
sub trunc
{ my $self = shift;
my ($start,$stop) = @_;
$self->throw("Stop cannot be smaller than start") unless $start <= $stop;
return $self->{start} <= $self->{stop} ? $self->new($self->{db},
$self->{id},
$self->{start}+$start-1,
$self->{start}+$stop-1)
: $self->new($self->{db},
$self->{id},
$self->{start}-($start-1),
$self->{start}-($stop-1)
);} |
sub display_id
{ my $self = shift;
return $self->{id};} |
sub accession_number
{ my $self = shift;
return "unknown"; } |
sub primary_id
{ my $self = shift;
return overload::StrVal($self); } |
sub can_call_new
{ return 0 } |
sub alphabet
{ my $self = shift;
return $self->{db}->alphabet($self->{id});} |
sub revcom
{ my $self = shift;
return $self->new(@{$self}{'db','id','stop','start'});} |
sub length
{ my $self = shift;
return $self->{db}->length($self->{id});} |
sub description
{ my $self = shift;
return '';} |
General documentation
No general documentation available.