2 # BioPerl module for Bio::Expression::FeatureGroup
4 # Copyright Allen Day <allenday@ucla.edu>, Stanley Nelson <snelson@ucla.edu>
5 # Human Genetics, UCLA Medical School, University of California, Los Angeles
7 # POD documentation - main docs before the code
11 Bio::Expression::FeatureGroup - a set of DNA/RNA features. ISA
12 Bio::Expression::FeatureI
20 A set of DNA/RNA features.
26 User feedback is an integral part of the evolution of this and other
27 Bioperl modules. Send your comments and suggestions preferably to one
28 of the Bioperl mailing lists. Your participation is much appreciated.
30 bioperl-l@bioperl.org - General discussion
31 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
35 Report bugs to the Bioperl bug tracking system to help us keep track
36 the bugs and their resolution. Bug reports can be submitted via the
39 http://bugzilla.open-bio.org/
43 Allen Day E<lt>allenday@ucla.eduE<gt>
47 The rest of the documentation details each of the object
48 methods. Internal methods are usually preceded with a _
52 # Let the code begin...
53 package Bio
::Expression
::FeatureGroup
;
57 use base
qw(Bio::Root::Root Bio::Expression::FeatureI);
63 Usage : $featuregroup = Bio::Expression::FeatureGroup->new(%args);
64 Function: create a new featuregroup object
65 Returns : a Bio::Expression::FeatureGroup object
66 Args : an optional hash of parameters to be used in initialization:
67 -id -- the featuregroup ID
68 -type -- the featuregroup type
73 my($class,@args) = @_;
74 my $self = bless {}, $class;
75 $self->_initialize(@args);
82 Usage : $featuregroup->_initialize(@args);
83 Function: initialize the featuregroup object
90 my ($self,@args) = @_;
93 $self->type($param{-type});
94 $self->id($param{-id} );
96 $self->SUPER::_initialize(@args);
97 $DEBUG = 1 if( ! defined $DEBUG && $self->verbose > 0);
103 Usage : $featuregroup->type($optional_arg);
104 Function: get/set the type of the featuregroup
105 Comments: this is probably going to be a string like
106 "quality control", "mismatch blah blah", etc.
107 Returns : the featuregroup type
108 Args : a new value for the featuregroup type
114 $self->{type} = shift if @_;
115 return $self->{type};
121 Usage : $featuregroup->id($optional_arg);
122 Function: get/set the id of the featuregroup
123 Returns : the featuregroup id
124 Args : a new value for the featuregroup id
130 $self->{id} = shift if @_;
135 =head2 standard_deviation
137 Title : standard_deviation
138 Usage : $featuregroup->standard_deviation($optional_arg);
139 Function: get/set the standard deviation of the featuregroup value
140 Returns : the featuregroup standard deviation
141 Args : a new value for the featuregroup standard deviation
142 Notes : this method does no calculation, it merely holds a value
146 sub standard_deviation {
148 $self->{standard_deviation} = shift if @_;
149 return $self->{standard_deviation};
155 Usage : $featuregroup->quantitation($optional_arg);
156 Function: get/set the quantitation of the featuregroup
157 Returns : the featuregroup's quantitated value
158 Args : a new value for the featuregroup's quantitated value
159 Notes : this method does no calculation, it merely holds a value
165 $self->{quantitation} = shift if @_;
166 return $self->{quantitation};
169 =head2 quantitation_units
171 Title : quantitation_units
172 Usage : $featuregroup->quantitation_units($optional_arg);
173 Function: get/set the quantitation units of the featuregroup
174 Returns : the featuregroup's quantitated value units
175 Args : a new value for the featuregroup's quantitated value units
179 sub quantitation_units {
181 $self->{quantitation_units} = shift if @_;
182 return $self->{quantitation_units};
188 Usage : $featuregroup->presence($optional_arg);
189 Function: get/set the presence call of the featuregroup
190 Returns : the featuregroup's presence call
191 Args : a new value for the featuregroup's presence call
197 $self->{presence} = shift if @_;
198 return $self->{presence};
204 Usage : $feature_copy = $featuregroup->add_feature($feature);
205 Function: add a feature to the featuregroup
206 Returns : see this_feature()
207 Args : a Bio::Expression::FeatureI compliant object
212 my($self,@args) = @_;
213 foreach my $feature (@args){
214 $self->throw('Features must be Bio::Expression::FeatureI compliant') unless $feature->isa('Bio::Expression::FeatureI');
215 push @{$self->{features}}, $feature;
218 return $self->{features} ? $self->{features}->[-1] : undef;
224 Usage : $feature = $featuregroup->this_feature
225 Function: access the last feature added to the featuregroup
226 Returns : the last feature added to the featuregroup
233 return $self->{features} ? $self->{features}->[-1] : undef;
239 Usage : @features = $featuregroup->each_feature
240 Function: returns a list of Bio::Expression::FeatureI compliant
242 Returns : a list of objects
249 return @{$self->{features}} if defined($self->{features});
253 =head2 each_feature_quantitation
255 Title : each_feature_quantitation
256 Usage : @featurequantitions = $featuregroup->each_feature_quantitation;
257 Function: returns an list of quantitations of the features in the featuregroup
258 Returns : a list of numeric values
263 sub each_feature_quantitation {
266 push @values, $_->value foreach $self->each_feature;
273 Usage : $is_quality_control = $featuregroup->is_qc
274 Function: get/set whether or not the featuregroup is used for quality control purposes
275 Returns : a boolean (equivalent)
282 $self->{is_qc} = shift if defined @_;
283 return $self->{is_qc};