Bio::F...HolderI(3pm)
π NAME π
Bio::FeatureHolderI β the base interface an object with features must implement. (yep, that's the whole name, and this page lives in the User Contributed Perl Documentation, so bestie, you're in the right place π«Ά)
β¨ SYNOPSIS β¨
use Bio::SeqIO;
# get a feature-holding object somehow: for example, Bio::SeqI objects
# have features
my $seqio = Bio::SeqIO->new(-fh => \*STDIN, -format => 'genbank');
while (my $seq = $seqio->next_seq()) {
# $seq is-a Bio::FeatureHolderI, hence:
my @feas = $seq->get_SeqFeatures();
# each element is-a Bio::SeqFeatureI
foreach my $fea (@feas) {
# do something with the feature objects
}
}
π¦ DESCRIPTION π¦
Okay so this is the base interface that all feature-holding objects must implement. Like, every single one. No skipping, it's giving mandatory π
Popular feature-holders are, for instance, Bio::Seq objects. And since Bio::SeqFeatureI defines a sub_SeqFeature() method, most Bio::SeqFeatureI implementations β like Bio::SeqFeature::Generic β will implement the feature holder interface as well. Iconic behavior, honestly.
π¬ FEEDBACK π¬
πΈ Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules β fr fr, they mean it. Send your comments and suggestions preferably to the Bioperl mailing list. 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. The way that so many experienced and responsive experts can look at the problem and quickly address it? Chef's kiss. 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 of the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
π AUTHOR - Hilmar Lapp π
Email: hlapp at gmx.net
π CONTRIBUTORS π
- Steffen Grossmann [SG],
grossman-at-molgen.mpg.de - Mark A. Jensen,
maj -at- fortinbras -dot- us
π APPENDIX π
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ (iykyk).
π« get_SeqFeatures()
- Usage β
@feats = $obj->get_SeqFeatures() - Function β Get the feature objects held by this feature holder.
- Example β (none given)
- Returns β an array of
Bio::SeqFeatureIimplementing objects; if tag specified, return features having that tag - Args β [optional] scalar string (feature tag)
π« add_SeqFeature()
- Usage β
$feat->add_SeqFeature($subfeat);
$feat->add_SeqFeature($subfeat,'EXPAND')
- Function β Add a SeqFeature into the subSeqFeature array.
with no 'EXPAND' qualifer, subfeat will be tested as to whether it lies inside the parent, and throw an exception if not.
If EXPAND is used and the object implements Bio::RangeI (which is not guaranteed), the parent''s start/end/strand will be extended so that the new subFeature can be accomodated.
- Example β (none given)
- Returns β nothing
- Args β a
Bio::SeqFeatureIobject
Heads up bestie: no 'EXPAND' means it will throw if the subfeat isn't inside the parent. That's a real exception, not a vibe check. π
π« remove_SeqFeatures()
- Usage β
$obj->remove_SeqFeatures - Function β Removes all sub SeqFeatures. If you want to remove only a subset, remove that subset from the returned array, and add back the rest.
- Returns β The array of
Bio::SeqFeatureIimplementing sub-features that was deleted from this feature. - Args β none
π« feature_count
- Title β
feature_count - Usage β
$obj->feature_count() - Function β Return the number of SeqFeatures attached to a feature holder.
This is before flattening a possible sub-feature tree.
We provide a default implementation here that just counts the number of objects returned by get_SeqFeatures(). Implementors may want to override this with a more efficient implementation.
- Returns β integer representing the number of SeqFeatures
- Args β None
At some day we may want to expand this method to allow for a feature filter to be passed in.
Our default implementation allows for any number of additional arguments and will pass them on to get_SeqFeatures(). I.e., in order to support filter arguments, just support them in get_SeqFeatures().
π« get_all_SeqFeatures
- Title β
get_all_SeqFeatures - Usage β (none given)
- Function β Get the flattened tree of feature objects held by this feature holder. The difference to
get_SeqFeaturesis that the entire tree of sub-features will be flattened out.
We provide a default implementation here, so implementors don''t necessarily need to implement this method.
- Example β (none given)
- Returns β an array of
Bio::SeqFeatureIimplementing objects - Args β none
At some day we may want to expand this method to allow for a feature filter to be passed in.
Our default implementation allows for any number of additional arguments and will pass them on to any invocation of get_SeqFeatures(), wherever a component of the tree implements FeatureHolderI. I.e., in order to support filter arguments, just support them in get_SeqFeatures().
okay that's the whole page, you ate that πβ¨
this has been perl v5.32.1, dated 2021-08-15, from Bio::F...HolderI(3pm) β go forth and hold some features, bestie π π
π¦ where this page comes from
- debian bookworm: libbio-perl-perl 1.7.8-1 Β· Perl
- debian trixie: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu jammy: libbio-perl-perl 1.7.8-1 Β· Perl
- ubuntu noble: libbio-perl-perl 1.7.8-1 Β· Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms