t/AlignIO/AlignIO.t: fix number of tests in plan (fixup c523e6bed866)
[bioperl-live.git] / Bio / SeqFeature / TypedSeqFeatureI.pm
blob1bb21650754bcbca1cf2399e37ce380ee14c70db
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
14 =head1 NAME
16 Bio::SeqFeature::TypedSeqFeatureI - a strongly typed SeqFeature
18 =head1 SYNOPSIS
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(),
30 " name:",$ot->name(),
31 " Description:",$ot->description(),"\n";
33 } else {
34 print "Sequence Feature does not have an ontology type\n";
39 =head1 DESCRIPTION
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.
55 =head1 FEEDBACK
57 =head2 Mailing Lists
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
66 =head2 Support
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.
77 =head2 Reporting Bugs
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
81 web:
83 https://github.com/bioperl/bioperl-live/issues
85 =head1 AUTHOR - Ewan Birney
87 Email - please email the BioPerl mailing list above.
89 =head1 APPENDIX
91 The rest of the documentation details each of the object methods.
92 Internal methods are usually preceded with a _
94 =cut
97 # Let the code begin...
100 package Bio::SeqFeature::TypedSeqFeatureI;
102 use strict;
103 use Bio::Root::RootI;
105 use base qw(Bio::SeqFeatureI);
108 =head2 ontology_term
110 Title : ontology_term
111 Usage : my $ot = $seqfeature->ontology_term()
112 Returns : a Bio::Ontology::TermI compliant object
113 Args : none
114 Status : public
116 This method returns the ontology term for a
117 strongly typed sequence feature.
119 =cut
121 sub ontology_term {
122 shift->throw_not_implemented();