Bio::F...HolderI(3pm)

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

πŸ’– 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::SeqFeatureI implementing 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::SeqFeatureI object
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::SeqFeatureI implementing 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_SeqFeatures is 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::SeqFeatureI implementing 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