2 # BioPerl module for Bio::SeqFeature::TypedSeqFeatureI
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
6 # Cared for by Ewan Birney <birney@ebi.ac.uk>
8 # Copyright Ewan Birney
10 # You may distribute this module under the same terms as perl itself
12 # POD documentation - main docs before the code
16 Bio::SeqFeature::TypedSeqFeatureI - a strongly typed SeqFeature
21 # get Sequence Features in some manner, eg
22 # from a Sequence object
24 foreach $sf ( $seq->get_SeqFeatures() ) {
25 # all sequence features must have primary_tag() return a string
26 $type_as_string = $sf->primary_tag();
27 if( $sf->isa("Bio::SeqFeature::TypedSeqFeatureI") ) {
28 $ot = $sf->ontology_term();
29 print "Ontology identifier:",$ot->identifier(),
31 " Description:",$ot->description(),"\n";
34 print "Sequence Feature does not have an ontology type\n";
41 This interface describes the extension of SeqFeatureI
42 to being a strongly typed SeqFeature.
44 Bio::SeqFeature::TypedSeqFeatureI extends the Bio::SeqFeatureI
45 interface (ie, a TypedSeqFeatureI feature must also implement
46 all the Bio::SeqFeatureI interface as well).
48 It is suggested that the primary_tag() method of SeqFeatureI
49 return the same as the ontology_term()-E<gt>name() of the OntologyTypedI
50 (ie, the "string" name of the ontology type is used as the primary
51 tag), but this should not be assumed by client code as they
52 are scenarios where one would like to maintain the difference.
59 User feedback is an integral part of the evolution of this and other
60 Bioperl modules. Send your comments and suggestions preferably to
61 the Bioperl mailing list. Your participation is much appreciated.
63 bioperl-l@bioperl.org - General discussion
64 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
68 Please direct usage questions or support issues to the mailing list:
70 I<bioperl-l@bioperl.org>
72 rather than to the module maintainer directly. Many experienced and
73 reponsive experts will be able look at the problem and quickly
74 address it. Please include a thorough description of the problem
75 with code and data examples if at all possible.
79 Report bugs to the Bioperl bug tracking system to help us keep track
80 of the bugs and their resolution. Bug reports can be submitted via the
83 https://github.com/bioperl/bioperl-live/issues
85 =head1 AUTHOR - Ewan Birney
87 Email - please email the BioPerl mailing list above.
91 The rest of the documentation details each of the object methods.
92 Internal methods are usually preceded with a _
97 # Let the code begin...
100 package Bio
::SeqFeature
::TypedSeqFeatureI
;
103 use Bio
::Root
::RootI
;
105 use base
qw(Bio::SeqFeatureI);
110 Title : ontology_term
111 Usage : my $ot = $seqfeature->ontology_term()
112 Returns : a Bio::Ontology::TermI compliant object
116 This method returns the ontology term for a
117 strongly typed sequence feature.
122 shift->throw_not_implemented();