~ubuntu-branches/ubuntu/trusty/bioperl/trusty

« back to all changes in this revision

Viewing changes to Bio/SeqI.pm

  • Committer: Package Import Robot
  • Author(s): Charles Plessy
  • Date: 2013-09-22 13:39:48 UTC
  • mfrom: (3.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20130922133948-c6z62zegjyp7ztou
Tags: 1.6.922-1
* New upstream release.
* Replaces and Breaks grinder (<< 0.5.3-3~) because of overlaping contents.
  Closes: #722910
* Stop Replacing and Breaking bioperl ( << 1.6.9 ): not needed anymore. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
    # Bio::SeqI has sequence features
36
36
    # features must implement Bio::SeqFeatureI
37
37
 
38
 
    @features = $seqobj->get_SeqFeatures(); # just top level
 
38
    @features = $seqobj->get_SeqFeatures();     # just top level
39
39
    @features = $seqobj->get_all_SeqFeatures(); # descend into sub features
40
40
 
41
 
 
42
 
 
43
41
=head1 DESCRIPTION
44
42
 
45
43
Bio::SeqI is the abstract interface of annotated Sequences. These
46
 
methods are those which you can be guarenteed to get for any Bio::SeqI
47
 
- for most users of the package the documentation (and methods) in
48
 
this class are not at useful - this is a developers only class which
49
 
defines what methods have to be implmented by other Perl objects to
 
44
methods are those which you can be guaranteed to get for any Bio::SeqI.
 
45
For most users of the package the documentation (and methods) in this
 
46
class are not at useful - this is a developers only class which
 
47
defines what methods have to be implemented by other Perl objects to
50
48
comply to the Bio::SeqI interface. Go "perldoc Bio::Seq" or "man
51
49
Bio::Seq" for more information.
52
50
 
53
 
 
54
 
There aren't many here, because too many complicated functions here
55
 
prevent implementations which are just wrappers around a database or
 
51
There aren't many method here, because too many complicated functions here
 
52
would prevent implementations which are just wrappers around a database or
56
53
similar delayed mechanisms.
57
54
 
58
55
Most of the clever stuff happens inside the SeqFeatureI system.
114
111
use strict;
115
112
 
116
113
 
117
 
# Object preamble - inheriets from Bio::PrimarySeqI
 
114
# Object preamble - inherits from Bio::PrimarySeqI
118
115
 
119
116
use base qw(Bio::PrimarySeqI Bio::AnnotatableI Bio::FeatureHolderI);
120
117
 
129
126
This method comes through extension of Bio::FeatureHolderI. See
130
127
L<Bio::FeatureHolderI> and L<Bio::SeqFeatureI> for more information.
131
128
 
132
 
=cut
133
 
 
134
129
=head2 get_all_SeqFeatures
135
130
 
136
131
 Title   : get_all_SeqFeatures
137
 
 Usage   : @features = $annseq->get_all_SeqFeatures()
138
 
 Function: returns all SeqFeatures, included sub SeqFeatures
 
132
 Usage   : my @feats = $seq->get_all_SeqFeatures();
 
133
 Function: returns all SeqFeatures, including sub SeqFeatures
139
134
 Returns : an array of Bio::SeqFeatureI objects
140
135
 Args    : none
141
136
 
142
137
This method comes through extension of Bio::FeatureHolderI. See
143
138
L<Bio::FeatureHolderI> and L<Bio::SeqFeatureI> for more information.
144
139
 
145
 
=cut
146
 
 
147
140
=head2 feature_count
148
141
 
149
142
 Title   : feature_count
150
 
 Usage   : $seq->feature_count()
 
143
 Usage   : my $count = $seq->feature_count();
151
144
 Function: Return the number of SeqFeatures attached to a sequence
152
145
 Returns : integer representing the number of SeqFeatures
153
146
 Args    : none
155
148
This method comes through extension of Bio::FeatureHolderI. See
156
149
L<Bio::FeatureHolderI> for more information.
157
150
 
158
 
=cut
159
 
 
160
151
=head2 seq
161
152
 
162
153
 Title   : seq
168
159
 
169
160
=cut
170
161
 
171
 
sub seq{
 
162
sub seq {
172
163
   my ($self) = @_;
173
164
   $self->throw_not_implemented();
174
165
}
177
168
 
178
169
 Title   : write_GFF
179
170
 Usage   : $seq->write_GFF(\*FILEHANDLE);
180
 
 Function: Convience method to write out all the sequence features
 
171
 Function: Convenience method to write out all the sequence features
181
172
           in GFF format to the provided filehandle (STDOUT by default)
182
173
 Returns : none
183
174
 Args    : [optional] filehandle to write to (default is STDOUT)
185
176
 
186
177
=cut
187
178
 
188
 
sub write_GFF{
 
179
sub write_GFF {
189
180
   my ($self,$fh) = @_;
190
181
 
191
182
   $fh || do { $fh = \*STDOUT; };
199
190
=head2 annotation
200
191
 
201
192
 Title   : annotation
202
 
 Usage   : $obj->annotation($seq_obj)
 
193
 Usage   : my $ann = $seq->annotation($seq_obj);
203
194
 Function: retrieve the attached annotation object
204
195
 Returns : Bio::AnnotationCollectionI or none;
205
196
 
207
198
for more information. This method comes through extension from
208
199
L<Bio::AnnotatableI>.
209
200
 
210
 
=cut
211
 
 
212
201
=head2 species
213
202
 
214
203
 Title   : species
215
204
 Usage   :
216
205
 Function: Gets or sets the species
217
 
 Example : $species = $self->species();
 
206
 Example : my $species = $seq->species();
218
207
 Returns : Bio::Species object
219
208
 Args    : Bio::Species object or none;
220
209
 
230
219
=head2 primary_seq
231
220
 
232
221
 Title   : primary_seq
233
 
 Usage   : $obj->primary_seq($newval)
 
222
 Usage   : my $primaryseq = $seq->primary_seq($newval)
234
223
 Function: Retrieve the underlying Bio::PrimarySeqI object if available.
235
224
           This is in the event one has a sequence with lots of features
236
225
           but want to be able to narrow the object to just one with