Bio::PrimarySeqI 1.4 review

Download
by rbytes.net on

Bio::PrimarySeqI is a Perl Interface definition for a Bio::PrimarySeq. SYNOPSIS # Bio::PrimarySeqI is the interface class f

License: Perl Artistic License
File size: 4788K
Developer: Ewan Birney
0 stars award from rbytes.net

Bio::PrimarySeqI is a Perl Interface definition for a Bio::PrimarySeq.

SYNOPSIS

# Bio::PrimarySeqI is the interface class for sequences.

# If you are a newcomer to bioperl, you should
# start with Bio::Seq documentation. This
# documentation is mainly for developers using
# Bioperl.

# to test this is a seq object

$obj->isa("Bio::PrimarySeqI") ||
$obj->throw("$obj does not implement the Bio::PrimarySeqI interface");

# accessors

$string = $obj->seq();
$substring = $obj->subseq(12,50);
$display = $obj->display_id(); # for human display
$id = $obj->primary_id(); # unique id for this object,
# implementation defined
$unique_key= $obj->accession_number();
# unique biological id

# object manipulation

eval {
$rev = $obj->revcom();
};
if( $@ ) {
$obj->throw(-class => 'Bio::Root::Exception',
-text => "Could not reverse complement. ".
"Probably not DNA. Actual exceptionn$@n",
-value => $@);
}

$trunc = $obj->trunc(12,50);

# $rev and $trunc are Bio::PrimarySeqI compliant objects

This object defines an abstract interface to basic sequence information - for most users of the package the documentation (and methods) in this class are not useful - this is a developers only class which defines what methods have to be implmented by other Perl objects to comply to the Bio::PrimarySeqI interface. Go "perldoc Bio::Seq" or "man Bio::Seq" for more information on the main class for sequences.

PrimarySeq is an object just for the sequence and its name(s), nothing more. Seq is the larger object complete with features. There is a pure perl implementation of this in Bio::PrimarySeq. If you just want to use Bio::PrimarySeq objects, then please read that module first. This module defines the interface, and is of more interest to people who want to wrap their own Perl Objects/RDBs/FileSystems etc in way that they "are" bioperl sequence objects, even though it is not using Perl to store the sequence etc.

This interface defines what bioperl consideres necessary to "be" a sequence, without providing an implementation of this. (An implementation is provided in Bio::PrimarySeq). If you want to provide a Bio::PrimarySeq 'compliant' object which in fact wraps another object/database/out-of-perl experience, then this is the correct thing to wrap, generally by providing a wrapper class which would inheriet from your object and this Bio::PrimarySeqI interface. The wrapper class then would have methods lists in the "Implementation Specific Functions" which would provide these methods for your object.

Requirements:
Perl

Bio::PrimarySeqI 1.4 keywords