File Coverage

Bio/SeqFeature/Gene/NC_Feature.pm
Criterion Covered Total %
statement 13 16 81.2
branch 3 4 75.0
condition n/a
subroutine 4 5 80.0
pod 3 3 100.0
total 23 28 82.1


line stmt bran cond sub pod time code
1             #
2             # BioPerl module for Bio::SeqFeature::Gene::NC_Feature.pm
3             #
4             # Please direct questions and support issues to
5             #
6             # Cared for by David Block
7             #
8             # Copyright David Block
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::Gene::NC_Feature.pm - superclass for non-coding features
17              
18             =head1 SYNOPSIS
19              
20             Give standard usage here
21              
22             =head1 DESCRIPTION
23              
24             Describe the object here
25              
26             =head1 FEEDBACK
27              
28             =head2 Mailing Lists
29              
30             User feedback is an integral part of the evolution of this and other
31             Bioperl modules. Send your comments and suggestions preferably to
32             the Bioperl mailing list. Your participation is much appreciated.
33              
34             bioperl-l@bioperl.org - General discussion
35             http://bioperl.org/wiki/Mailing_lists - About the mailing lists
36              
37             =head2 Support
38              
39             Please direct usage questions or support issues to the mailing list:
40              
41             I
42              
43             rather than to the module maintainer directly. Many experienced and
44             reponsive experts will be able look at the problem and quickly
45             address it. Please include a thorough description of the problem
46             with code and data examples if at all possible.
47              
48             =head2 Reporting Bugs
49              
50             Report bugs to the Bioperl bug tracking system to help us keep track
51             of the bugs and their resolution. Bug reports can be submitted via the
52             web:
53              
54             https://github.com/bioperl/bioperl-live/issues
55              
56             =head1 AUTHOR - David Block
57              
58             Email dblock@gnf.org
59              
60             =head1 APPENDIX
61              
62             The rest of the documentation details each of the object methods.
63             Internal methods are usually preceded with a _
64              
65             =cut
66              
67              
68             # Let the code begin...
69              
70             package Bio::SeqFeature::Gene::NC_Feature;
71 8     8   36 use strict;
  8         11  
  8         210  
72              
73             # Object preamble - inherits from Bio::Root::Root
74              
75              
76 8     8   28 use base qw(Bio::SeqFeature::Generic);
  8         7  
  8         1483  
77              
78             sub new {
79 5     5 1 7 my($class,@args) = @_;
80            
81 5         13 my $self = $class->SUPER::new(@args);
82              
83 5         15 my ($is_coding) =
84             $self->_rearrange([qw(IS_CODING)],@args);
85             # default is non-coding
86 5 100       20 $self->is_coding(defined($is_coding) ? $is_coding : 0);
87              
88 5         13 return $self;
89             }
90              
91              
92              
93             =head2 is_coding
94              
95             Title : is_coding
96             Usage : if ($feature->is_coding()) {
97             #do something
98             }
99             Function: Whether or not the feature codes for amino acid.
100             Returns : FALSE
101             Args : none
102              
103             =cut
104              
105             sub is_coding{
106 5     5 1 6 my $self = shift;
107              
108 5 50       13 return $self->{'is_coding'} = shift if @_;
109 0           return $self->{'is_coding'};
110             }
111              
112             =head2 cds
113              
114             Title : cds
115             Usage : $cds=$feature->cds();
116             Function: get the coding sequence of this feature
117             Returns : undef
118             Args : none
119              
120              
121             =cut
122              
123             sub cds {
124 0     0 1   my ($self,@args) = @_;
125 0           return;
126              
127             }
128              
129              
130             1;