Bio SeqI
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::SeqI [Developers] - Abstract Interface of Sequence (with features)
Package variables
No package variables defined.
Included modules
Bio::AnnotatableI
Bio::FeatureHolderI
Bio::PrimarySeqI
Inherit
Bio::AnnotatableI Bio::FeatureHolderI Bio::PrimarySeqI
Synopsis
    # Bio::SeqI 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. # Bio::SeqI implements Bio::PrimarySeqI $seq = $seqobj->seq(); # actual sequence as a string $seqstr = $seqobj->subseq(10,50); # Bio::SeqI has annotationcollections $ann = $seqobj->annotation(); # annotation object # Bio::SeqI has sequence features # features must implement Bio::SeqFeatureI @features = $seqobj->get_SeqFeatures(); # just top level @features = $seqobj->get_all_SeqFeatures(); # descend into sub features
Description
Bio::SeqI is the abstract interface of annotated Sequences. These
methods are those which you can be guarenteed to get for any Bio::SeqI
- for most users of the package the documentation (and methods) in
this class are not at useful - this is a developers only class which
defines what methods have to be implmented by other Perl objects to
comply to the Bio::SeqI interface. Go "perldoc Bio::Seq" or "man
Bio::Seq" for more information.
There aren't many here, because too many complicated functions here
prevent implementations which are just wrappers around a database or
similar delayed mechanisms.
Most of the clever stuff happens inside the SeqFeatureI system.
A good reference implementation is Bio::Seq which is a pure perl
implementation of this class with alot of extra pieces for extra
manipulation. However, if you want to be able to use any sequence
object in your analysis, if you can do it just using these methods,
then you know you will be future proof and compatible with other
implementations of Seq.
Methods
primary_seqDescriptionCode
seqDescriptionCode
speciesDescriptionCode
write_GFFDescriptionCode
Methods description
primary_seqcode    nextTop
 Title   : primary_seq
Usage : $obj->primary_seq($newval)
Function: Retrieve the underlying Bio::PrimarySeqI object if available.
This is in the event one has a sequence with lots of features
but want to be able to narrow the object to just one with
the basics of a sequence (no features or annotations).
Returns : Bio::PrimarySeqI
Args : Bio::PrimarySeqI or none;
See Bio::PrimarySeqI for more information
seqcodeprevnextTop
 Title   : seq
Usage : my $string = $seq->seq();
Function: Retrieves the sequence string for the sequence object
Returns : string
Args : none
speciescodeprevnextTop
 Title   : species
Usage :
Function: Gets or sets the species
Example : $species = $self->species();
Returns : Bio::Species object
Args : Bio::Species object or none;
See Bio::Species for more information
write_GFFcodeprevnextTop
 Title   : write_GFF
Usage : $seq->write_GFF(\*FILEHANDLE);
Function: Convience method to write out all the sequence features
in GFF format to the provided filehandle (STDOUT by default)
Returns : none
Args : [optional] filehandle to write to (default is STDOUT)
Methods code
primary_seqdescriptionprevnextTop
sub primary_seq {
    my ($self) = @_;
    $self->throw_not_implemented;
}

1;
}
seqdescriptionprevnextTop
sub seq {
   my ($self) = @_;
   $self->throw_not_implemented();
}
speciesdescriptionprevnextTop
sub species {
    my ($self) = @_;
    $self->throw_not_implemented();
}
write_GFFdescriptionprevnextTop
sub write_GFF {
   my ($self,$fh) = @_;

   $fh || do { $fh =\* STDOUT; };

   foreach my $sf ( $self->get_all_SeqFeatures() ) {
       print $fh $sf->gff_string, "\n";
   }
}
General documentation
FEEDBACKTop
Mailing ListsTop
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.
  bioperl-l@bioperl.org          - General discussion
http://bio.perl.org/MailList.html - About the mailing lists
Reporting BugsTop
Report bugs to the Bioperl bug tracking system to help us keep track
the bugs and their resolution. Bug reports can be submitted via email
or the web:
  bioperl-bugs@bio.perl.org
http://bugzilla.bioperl.org/
AUTHOR - Ewan BirneyTop
Email birney@sanger.ac.uk
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _
get_SeqFeaturesTop
 Title   : get_SeqFeatures
Usage : my @feats = $seq->get_SeqFeatures();
Function: retrieve just the toplevel sequence features attached to this seq
Returns : array of Bio::SeqFeatureI objects
Args : none
This method comes through extension of Bio::FeatureHolderI. See
Bio::FeatureHolderI and Bio::SeqFeatureI for more information.
get_all_SeqFeaturesTop
 Title   : get_all_SeqFeatures
Usage : @features = $annseq->get_all_SeqFeatures()
Function: returns all SeqFeatures, included sub SeqFeatures
Returns : an array of Bio::SeqFeatureI objects
Args : none
This method comes through extension of Bio::FeatureHolderI. See
Bio::FeatureHolderI and Bio::SeqFeatureI for more information.
feature_countTop
 Title   : feature_count
Usage : $seq->feature_count()
Function: Return the number of SeqFeatures attached to a sequence
Returns : integer representing the number of SeqFeatures
Args : none
This method comes through extension of Bio::FeatureHolderI. See
Bio::FeatureHolderI for more information.
annotationTop
 Title   : annotation
Usage : $obj->annotation($seq_obj)
Function: retrieve the attached annotation object
Returns : Bio::AnnotationCollectionI or none;
See Bio::AnnotationCollectionI and Bio::Annotation::Collection
for more information. This method comes through extension from
Bio::AnnotatableI.