.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Bio::FeatureHolderI 3pm" .TH Bio::FeatureHolderI 3pm "2021-08-15" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Bio::FeatureHolderI \- the base interface an object with features must implement .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 12 \& use Bio::SeqIO; \& # get a feature\-holding object somehow: for example, Bio::SeqI objects \& # have features \& my $seqio = Bio::SeqIO\->new(\-fh => \e*STDIN, \-format => \*(Aqgenbank\*(Aq); \& 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 \& } \& } .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" This is the base interface that all feature-holding objects must implement. .PP Popular feature-holders are for instance Bio::Seq objects. Since Bio::SeqFeatureI defines a \fBsub_SeqFeature()\fR method, most Bio::SeqFeatureI implementations like Bio::SeqFeature::Generic will implement the feature holder interface as well. .SH "FEEDBACK" .IX Header "FEEDBACK" .SS "Mailing Lists" .IX Subsection "Mailing Lists" User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated. .PP .Vb 2 \& bioperl\-l@bioperl.org \- General discussion \& http://bioperl.org/wiki/Mailing_lists \- About the mailing lists .Ve .SS "Support" .IX Subsection "Support" Please direct usage questions or support issues to the mailing list: .PP \&\fIbioperl\-l@bioperl.org\fR .PP rather than to the module maintainer directly. Many experienced and reponsive 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. .SS "Reporting Bugs" .IX Subsection "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: .PP .Vb 1 \& https://github.com/bioperl/bioperl\-live/issues .Ve .SH "AUTHOR \- Hilmar Lapp" .IX Header "AUTHOR - Hilmar Lapp" Email hlapp at gmx.net .SH "CONTRIBUTORS" .IX Header "CONTRIBUTORS" Steffen Grossmann [\s-1SG\s0], grossman\-at\-molgen.mpg.de Mark A. Jensen, maj \-at\- fortinbras \-dot\- us .SH "APPENDIX" .IX Header "APPENDIX" The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _ .SS "\fBget_SeqFeatures()\fP" .IX Subsection "get_SeqFeatures()" .Vb 6 \& Usage : @feats = $obj\->get_SeqFeatures() \& Function: Get the feature objects held by this feature holder. \& Example : \& Returns : an array of Bio::SeqFeatureI implementing objects \& if tag specified, return features having that tag \& Args : [optional] scalar string (feature tag) .Ve .SS "\fBadd_SeqFeature()\fP" .IX Subsection "add_SeqFeature()" .Vb 6 \& Usage : $feat\->add_SeqFeature($subfeat); \& $feat\->add_SeqFeature($subfeat,\*(AqEXPAND\*(Aq) \& Function: Add a SeqFeature into the subSeqFeature array. \& with no \*(AqEXPAND\*(Aq 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\*(Aq\*(Aqs start/end/strand \& will be extended so that the new subFeature can be accomodated. \& Example : \& Returns : nothing \& Args : a Bio::SeqFeatureI object .Ve .SS "\fBremove_SeqFeatures()\fP" .IX Subsection "remove_SeqFeatures()" .Vb 6 \& 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 .Ve .SS "feature_count" .IX Subsection "feature_count" .Vb 3 \& 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 .Ve .PP At some day we may want to expand this method to allow for a feature filter to be passed in. .PP Our default implementation allows for any number of additional arguments and will pass them on to \fBget_SeqFeatures()\fR. I.e., in order to support filter arguments, just support them in \fBget_SeqFeatures()\fR. .SS "get_all_SeqFeatures" .IX Subsection "get_all_SeqFeatures" .Vb 5 \& Title : get_all_SeqFeatures \& Usage : \& 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\*(Aq\*(Aqt necessarily need to implement this method. \& \& Example : \& Returns : an array of Bio::SeqFeatureI implementing objects \& Args : none .Ve .PP At some day we may want to expand this method to allow for a feature filter to be passed in. .PP Our default implementation allows for any number of additional arguments and will pass them on to any invocation of \&\fBget_SeqFeatures()\fR, wherever a component of the tree implements FeatureHolderI. I.e., in order to support filter arguments, just support them in \fBget_SeqFeatures()\fR.