Bio::SeqI(3pm)

πŸ“¦
version 1.7.8 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble

πŸ’– Bio::SeqI β€” the perl manual page, but make it make sense πŸ’–

okay bestie, welcome to Bio::SeqI, straight out of the User Contributed Perl Documentation collection. this one is lowkey a developer situation, not a casual-casual read, so buckle up πŸŽ€


✨ NAME ✨

Bio::SeqI β€” [Developers] Abstract Interface of Sequence (with features)


🌸 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 πŸ¦‹

so Bio::SeqI is the abstract interface of annotated Sequences, periodt. every method in here is something you're guaranteed to get on any Bio::SeqI, no cap. and here's the tea: for most users of the package, the docs (and the methods) in this class are not that useful β€” it's a developers-only class that defines what methods other Perl objects have to implement to be compliant with the Bio::SeqI interface. if that's you, go perldoc Bio::Seq or man Bio::Seq for the actual info, bestie πŸ’…

there aren't many methods here, and that's intentional fr fr β€” too many complicated functions would block implementations that are just wrappers around a database or similar delayed mechanisms. we're keeping it light so the wrappers can breathe ✨

most of the clever stuff happens inside the SeqFeatureI system. that's where the main character energy lives πŸ‘‘

a good reference implementation is Bio::Seq, which is a pure perl implementation of this class with a LOT of extra pieces for extra manipulation. but here's the vibe check: if you want to be able to use any sequence object in your analysis, and you can do it just using these methods, then you know you're future proof and compatible with other implementations of Seq. iconic behaviour honestly 🫢


πŸ’Œ FEEDBACK πŸ’Œ

πŸ“¬ Mailing Lists

user feedback is an integral part of the evolution of this and other Bioperl modules β€” literally, it's how the whole thing grows. 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://bioperl.org/wiki/Mailing_lists  - About the mailing lists

πŸ«‚ Support

please direct usage questions or support issues to the mailing list:

bioperl-l@bioperl.org

rather than to the module maintainer directly. many experienced and responsive experts will be able look at the problem and quickly address it. please include a thorough description of the problem with code and data examples if at all possible πŸ™

πŸ› Reporting Bugs

report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. bug reports can be submitted via the web:

https://github.com/bioperl/bioperl-live/issues

πŸ‘‘ AUTHOR β€” Ewan Birney

email birney@ebi.ac.uk


πŸ“– APPENDIX πŸ“–

the rest of the documentation details each of the object methods. internal methods are usually preceded with a _ (iykyk, that's the secret handshake 🀫)

🌟 get_SeqFeatures

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_SeqFeatures

Title   : get_all_SeqFeatures
Usage   : my @feats = $seq->get_all_SeqFeatures();
Function: returns all SeqFeatures, including 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_count

Title   : feature_count
Usage   : my $count = $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 πŸ’œ

🧬 seq

Title   : seq
Usage   : my $string = $seq->seq();
Function: Retrieves the sequence string for the sequence object
Returns : string
Args    : none

πŸ“ write_GFF

Title   : write_GFF
Usage   : $seq->write_GFF(\*FILEHANDLE);
Function: Convenience 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)

πŸŽ€ annotation

Title   : annotation
Usage   : my $ann = $seq->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. πŸ’œ

🐚 species

Title   : species
Usage   :
Function: Gets or sets the species
Example : my $species = $seq->species();
Returns : Bio::Species object
Args    : Bio::Species object or none;

see Bio::Species for more information 🫢

⭐ primary_seq

Title   : primary_seq
Usage   : my $primaryseq = $seq->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 πŸ’œ


and that's the whole page bestie, no notes πŸ’… this lil slice of lore shipped with perl v5.32.1, dated 2021-08-15, and it answers to the name Bio::SeqI(3pm). go forth and implement the interface, you absolute icon πŸ¦‹βœ¨

πŸ“¦ where this page comes from