Bio/SeqFeature/TypedSeqFeatureI.pm

filter: Statementstmt 91.6% 11 / 12 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 88.2% 15 / 17 CC 1 SCAR 2.2
CC
1
Cov
92%
ontology_term
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« Bio/Factory/SequenceProcessorI.pm ↑ Summary Bio/Ontology/SimpleGOEngine/GraphAdaptor.pm »
1 #
2 # BioPerl module for Bio::SeqFeature::TypedSeqFeatureI
3 #
4 # Please direct questions and support issues to <bioperl-l@bioperl.org>
5 #
6 # Cared for by Ewan Birney <birney@ebi.ac.uk>
7 #
8 # Copyright Ewan Birney
9 #
10 # You may distribute this module under the same terms as perl itself
11  
12 # POD documentation - main docs before the code
13  
14 =head1 NAME
15  
16 Bio::SeqFeature::TypedSeqFeatureI - a strongly typed SeqFeature
17  
18 =head1 SYNOPSIS
19  
20  
21 # get Sequence Features in some manner, eg
22 # from a Sequence object
23  
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";
32  
33 } else {
34 print "Sequence Feature does not have an ontology type\n";
35 }
36  
37 }
38  
39 =head1 DESCRIPTION
40  
41 This interface describes the extension of SeqFeatureI
42 to being a strongly typed SeqFeature.
43  
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).
47  
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.
53  
54  
55 =head1 FEEDBACK
56  
57 =head2 Mailing Lists
58  
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.
62  
63 bioperl-l@bioperl.org - General discussion
64 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
65  
66 =head2 Support
67  
68 Please direct usage questions or support issues to the mailing list:
69  
70 I<bioperl-l@bioperl.org>
71  
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.
76  
77 =head2 Reporting Bugs
78  
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:
82  
83 https://github.com/bioperl/bioperl-live/issues
84  
85 =head1 AUTHOR - Ewan Birney
86  
87 Email - please email the BioPerl mailing list above.
88  
89 =head1 APPENDIX
90  
91 The rest of the documentation details each of the object methods.
92 Internal methods are usually preceded with a _
93  
94 =cut
95  
96  
97 # Let the code begin...
98  
99  
100 package Bio::SeqFeature::TypedSeqFeatureI;
101 1 $Bio::SeqFeature::TypedSeqFeatureI::VERSION = '1.7.8';
102 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
103 1 ▶use Bio::Root::RootI;
Subroutine BEGIN: called CC=1 SCAR=0.0
104  
105 1 ▶use base qw(Bio::SeqFeatureI);
Subroutine BEGIN: called CC=1 SCAR=0.0
106  
107  
108 =head2 ontology_term
109  
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
115  
116 This method returns the ontology term for a
117 strongly typed sequence feature.
118  
119 =cut
120  
121 0 ▶sub ontology_term {
Subroutine ontology_term: not called CC=1 SCAR=6.9
Pod documented
122 0 shift->throw_not_implemented();
123 }
124  
125 1 1;
« Bio/Factory/SequenceProcessorI.pm ↑ Summary Bio/Ontology/SimpleGOEngine/GraphAdaptor.pm »