~ubuntu-branches/ubuntu/raring/bioperl/raring

« back to all changes in this revision

Viewing changes to Bio/SeqFeatureI.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2008-03-18 14:44:57 UTC
  • mfrom: (4 hardy)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20080318144457-1jjoztrvqwf0gruk
* debian/control:
  - Removed MIA Matt Hope (dopey) from the Uploaders field.
    Thank you for your work, Matt. I hope you are doing well.
  - Downgraded some recommended package to the 'Suggests' priority,
    according to the following discussion on Upstream's mail list.
    http://bioperl.org/pipermail/bioperl-l/2008-March/027379.html
    (Closes: #448890)
* debian/copyright converted to machine-readable format.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: SeqFeatureI.pm,v 1.51 2003/11/24 23:42:08 cjm Exp $
 
1
# $Id: SeqFeatureI.pm,v 1.66.4.4 2006/10/02 23:10:12 sendu Exp $
2
2
#
3
3
# BioPerl module for Bio::SeqFeatureI
4
4
#
5
 
# Cared for by Ewan Birney <birney@sanger.ac.uk>
 
5
# Cared for by Ewan Birney <birney@ebi.ac.uk>
6
6
#
7
7
# Copyright Ewan Birney
8
8
#
19
19
    # get a seqfeature somehow, eg, from a Sequence with Features attached
20
20
 
21
21
    foreach $feat ( $seq->get_SeqFeatures() ) {
22
 
            print "Feature from ", $feat->start, "to ", 
23
 
                  $feat->end, " Primary tag  ", $feat->primary_tag, 
 
22
       print "Feature from ", $feat->start, "to ",
 
23
               $feat->end, " Primary tag  ", $feat->primary_tag,
24
24
                  ", produced by ", $feat->source_tag(), "\n";
25
25
 
26
 
            if( $feat->strand == 0 ) {
27
 
                print "Feature applicable to either strand\n";
28
 
            } else {
29
 
                print "Feature on strand ", $feat->strand,"\n"; # -1,1
30
 
            }
31
 
            print "feature location is ",$feat->start, "..",
32
 
                  $feat->end, " on strand ", $feat->strand, "\n";
33
 
            print "easy utility to print locations in GenBank/EMBL way ",
34
 
                  $feat->location->to_FTstring(), "\n";
35
 
 
36
 
            foreach $tag ( $feat->get_all_tags() ) {
37
 
                print "Feature has tag ", $tag, " with values, ",
 
26
       if( $feat->strand == 0 ) {
 
27
                    print "Feature applicable to either strand\n";
 
28
       } else {
 
29
          print "Feature on strand ", $feat->strand,"\n"; # -1,1
 
30
       }
 
31
 
 
32
       print "feature location is ",$feat->start, "..",
 
33
          $feat->end, " on strand ", $feat->strand, "\n";
 
34
       print "easy utility to print locations in GenBank/EMBL way ",
 
35
          $feat->location->to_FTstring(), "\n";
 
36
 
 
37
       foreach $tag ( $feat->get_all_tags() ) {
 
38
                    print "Feature has tag ", $tag, " with values, ",
38
39
                      join(' ',$feat->get_tag_values($tag)), "\n";
39
 
            }
 
40
       }
40
41
            print "new feature\n" if $feat->has_tag('new');
41
42
            # features can have sub features
42
43
            my @subfeat = $feat->get_SeqFeatures();
43
 
        }
 
44
         }
44
45
 
45
46
=head1 DESCRIPTION
46
47
 
57
58
Bioperl modules. Send your comments and suggestions preferably to one
58
59
of the Bioperl mailing lists.  Your participation is much appreciated.
59
60
 
60
 
  bioperl-l@bioperl.org          - General discussion
61
 
  http://bio.perl.org/MailList.html             - About the mailing lists
 
61
  bioperl-l@bioperl.org                  - General discussion
 
62
  http://bioperl.org/wiki/Mailing_lists  - About the mailing lists
62
63
 
63
64
=head2 Reporting Bugs
64
65
 
65
66
Report bugs to the Bioperl bug tracking system to help us keep track
66
 
the bugs and their resolution.  Bug reports can be submitted via email
67
 
or the web:
 
67
the bugs and their resolution.  Bug reports can be submitted via the
 
68
web:
68
69
 
69
 
  bioperl-bugs@bio.perl.org
70
 
  http://bugzilla.bioperl.org/
 
70
  http://bugzilla.open-bio.org/
71
71
 
72
72
=head1 APPENDIX
73
73
 
81
81
 
82
82
 
83
83
package Bio::SeqFeatureI;
84
 
use vars qw(@ISA $HasInMemory);
 
84
use vars qw($HasInMemory);
85
85
use strict;
86
86
 
87
87
BEGIN {
89
89
    if( $@ ) { $HasInMemory = 0 }
90
90
    else { $HasInMemory = 1 }
91
91
}
92
 
use Bio::RangeI;
 
92
 
93
93
use Bio::Seq;
94
94
 
95
95
use Carp;
96
96
 
97
 
@ISA = qw(Bio::RangeI);
 
97
use base qw(Bio::RangeI Bio::AnnotatableI);
98
98
 
99
 
=head1 SeqFeatureI specific methods
 
99
=head1 Bio::SeqFeatureI specific methods
100
100
 
101
101
New method interfaces.
102
102
 
110
110
 Returns : An array
111
111
 Args    : none
112
112
 
113
 
 
114
113
=cut
115
114
 
116
115
sub get_SeqFeatures{
129
128
 
130
129
=cut
131
130
 
132
 
sub display_name { 
 
131
sub display_name {
133
132
    shift->throw_not_implemented();
134
133
}
135
134
 
139
138
 Usage   : $tag = $feat->primary_tag()
140
139
 Function: Returns the primary tag for a feature,
141
140
           eg 'exon'
142
 
 Returns : a string 
 
141
 Returns : a string
143
142
 Args    : none
144
143
 
145
144
 
157
156
 Title   : source_tag
158
157
 Usage   : $tag = $feat->source_tag()
159
158
 Function: Returns the source tag for a feature,
160
 
           eg, 'genscan' 
161
 
 Returns : a string 
 
159
           eg, 'genscan'
 
160
 Returns : a string
162
161
 Args    : none
163
162
 
164
163
 
170
169
   $self->throw_not_implemented();
171
170
}
172
171
 
173
 
=head2 has_tag
174
 
 
175
 
 Title   : has_tag
176
 
 Usage   : $tag_exists = $self->has_tag('some_tag')
177
 
 Function: 
178
 
 Returns : TRUE if the specified tag exists, and FALSE otherwise
179
 
 Args    :
180
 
 
181
 
 
182
 
=cut
183
 
 
184
 
sub has_tag{
185
 
   my ($self,@args) = @_;
186
 
 
187
 
   $self->throw_not_implemented();
188
 
 
189
 
}
190
 
 
191
 
=head2 get_tag_values
192
 
 
193
 
 Title   : get_tag_values
194
 
 Usage   : @values = $self->get_tag_values('some_tag')
195
 
 Function: 
196
 
 Returns : An array comprising the values of the specified tag.
197
 
 Args    : a string
198
 
 
199
 
throws an exception if there is no such tag
200
 
 
201
 
=cut
202
 
 
203
 
sub get_tag_values {
204
 
    shift->throw_not_implemented();
205
 
}
206
 
 
207
 
=head2 get_tagset_values
208
 
 
209
 
 Title   : get_tagset_values
210
 
 Usage   : @values = $self->get_tagset_values(qw(label transcript_id product))
211
 
 Function: 
212
 
 Returns : An array comprising the values of the specified tags, in order of tags
213
 
 Args    : An array of strings
214
 
 
215
 
does NOT throw an exception if none of the tags are not present
216
 
 
217
 
this method is useful for getting a human-readable label for a
218
 
SeqFeatureI; not all tags can be assumed to be present, so a list of
219
 
possible tags in preferential order is provided
220
 
 
221
 
=cut
222
 
 
223
 
# interface + abstract method
224
 
sub get_tagset_values {
225
 
    my ($self, @args) = @_;
226
 
    my @vals = ();
227
 
    foreach my $arg (@args) {
228
 
        if ($self->has_tag($arg)) {
229
 
            push(@vals, $self->get_tag_values($arg));
230
 
        }
231
 
    }
232
 
    return @vals;
233
 
}
234
 
 
235
 
 
236
 
 
237
 
=head2 get_all_tags
238
 
 
239
 
 Title   : get_all_tags
240
 
 Usage   : @tags = $feat->get_all_tags()
241
 
 Function: gives all tags for this feature
242
 
 Returns : an array of strings
243
 
 Args    : none
244
 
 
245
 
 
246
 
=cut
247
 
 
248
 
sub get_all_tags{
249
 
    shift->throw_not_implemented();
250
 
}
251
172
 
252
173
=head2 attach_seq
253
174
 
260
181
           Note that it is not guaranteed that if you obtain a feature from
261
182
           an object in bioperl, it will have a sequence attached. Also,
262
183
           implementors of this interface can choose to provide an empty
263
 
           implementation of this method. I.e., there is also no guarantee 
 
184
           implementation of this method. I.e., there is also no guarantee
264
185
           that if you do attach a sequence, seq() or entire_seq() will not
265
186
           return undef.
266
187
 
267
188
           The reason that this method is here on the interface is to enable
268
189
           you to call it on every SeqFeatureI compliant object, and
269
 
           that it will be implemented in a useful way and set to a useful 
 
190
           that it will be implemented in a useful way and set to a useful
270
191
           value for the great majority of use cases. Implementors who choose
271
192
           to ignore the call are encouraged to specifically state this in
272
193
           their documentation.
286
207
 
287
208
 Title   : seq
288
209
 Usage   : $tseq = $sf->seq()
289
 
 Function: returns the truncated sequence (if there is a sequence attached) 
 
210
 Function: returns the truncated sequence (if there is a sequence attached)
290
211
           for this feature
291
212
 Example :
292
213
 Returns : sub seq (a Bio::PrimarySeqI compliant object) on attached sequence
376
297
 Usage   :
377
298
 Function:
378
299
 Example :
379
 
 Returns : 
 
300
 Returns :
380
301
 Args    :
381
302
 
382
303
 
391
312
   return $static_gff_formatter;
392
313
}
393
314
 
394
 
=head1 Bio::RangeI methods
395
 
 
396
 
List of interfaces inherited from Bio::RangeI (see L<Bio::RangeI>
397
 
for details).
398
 
 
399
 
=cut
400
 
 
401
 
=head2 start
402
 
 
403
 
 Title   : start
404
 
 Usage   : $start = $feat->start
405
 
 Function: Returns the start coordinate of the feature
406
 
 Returns : integer
407
 
 Args    : none
408
 
 
409
 
 
410
 
=head2 end
411
 
 
412
 
 Title   : end
413
 
 Usage   : $end = $feat->end
414
 
 Function: Returns the end coordinate of the feature
415
 
 Returns : integer
416
 
 Args    : none
417
 
 
418
 
=head2 strand
419
 
 
420
 
 Title   : strand
421
 
 Usage   : $strand = $feat->strand()
422
 
 Function: Returns strand information, being 1,-1 or 0
423
 
 Returns : -1,1 or 0
424
 
 Args    : none
425
 
 
426
 
 
427
 
=cut
428
315
 
429
316
=head1 Decorating methods
430
317
 
453
340
            number of N's (DNA) or X's (protein, though this is unlikely).
454
341
 
455
342
            This function is deliberately "magical" attempting to second guess
456
 
            what a user wants as "the" sequence for this feature
 
343
            what a user wants as "the" sequence for this feature.
457
344
 
458
345
            Implementing classes are free to override this method with their
459
 
            own magic if they have a better idea what the user wants
 
346
            own magic if they have a better idea what the user wants.
460
347
 
461
 
  Args    : [optional] A Bio::DB::RandomAccessI compliant object
462
 
  Returns : A Bio::Seq
 
348
  Args    : [optional]
 
349
            -db        A L<Bio::DB::RandomAccessI> compliant object if
 
350
                       one needs to retrieve remote seqs.
 
351
            -nosort    boolean if the locations should not be sorted
 
352
                       by start location.  This may occur, for instance,
 
353
                       in a circular sequence where a gene span starts
 
354
                       before the end of the sequence and ends after the
 
355
                       sequence start. Example : join(15685..16260,1..207)
 
356
  Returns : A L<Bio::PrimarySeqI> object
463
357
 
464
358
=cut
465
359
 
466
360
sub spliced_seq {
467
 
    my ($self,$db) = @_;
468
 
   
 
361
    my $self = shift;
 
362
        my @args = @_;
 
363
        my ($db,$nosort) = $self->_rearrange([qw(DB NOSORT)], @args);
 
364
 
 
365
        # (added 7/7/06 to allow use old API (with warnings)
 
366
        my $old_api = (!(grep {$_ =~ /(?:nosort|db)/} @args)) ? 1 : 0;
 
367
        if (@args && $old_api) {
 
368
                $self->warn(q(API has changed; please use '-db' or '-nosort' ).
 
369
                     qq(for args. See POD for more details.));
 
370
                $db = shift @args if @args;
 
371
                $nosort = shift @args if @args;
 
372
        };
 
373
 
 
374
        if( $db && ref($db) && ! $db->isa('Bio::DB::RandomAccessI') ) {
 
375
        $self->warn("Must pass in a valid Bio::DB::RandomAccessI object".
 
376
                    " for access to remote locations for spliced_seq");
 
377
        $db = undef;
 
378
    } elsif( defined $db && $HasInMemory &&
 
379
            $db->isa('Bio::DB::InMemoryCache') ) {
 
380
        $db = new Bio::DB::InMemoryCache(-seqdb => $db);
 
381
    }
 
382
 
469
383
    if( ! $self->location->isa("Bio::Location::SplitLocationI") ) {
470
384
        return $self->seq(); # nice and easy!
471
385
    }
475
389
        $self->throw("not atomic, not split, yikes, in trouble!");
476
390
    }
477
391
 
478
 
    my $seqstr;
 
392
    my $seqstr = '';
479
393
    my $seqid = $self->entire_seq->display_id;
480
394
    # This is to deal with reverse strand features
481
395
    # so we are really sorting features 5' -> 3' on their strand
482
396
    # i.e. rev strand features will be sorted largest to smallest
483
397
    # as this how revcom CDSes seem to be annotated in genbank.
484
 
    # Might need to eventually allow this to be programable?    
 
398
    # Might need to eventually allow this to be programable?
485
399
    # (can I mention how much fun this is NOT! --jason)
486
 
    
 
400
 
487
401
    my ($mixed,$mixedloc, $fstrand) = (0);
488
 
    if( $db && ref($db) && ! $db->isa('Bio::DB::RandomAccessI') ) {
489
 
        $self->warn("Must pass in a valid Bio::DB::RandomAccessI object for access to remote locations for spliced_seq");
490
 
        $db = undef;
491
 
    } elsif( defined $db && $HasInMemory && 
492
 
             ! $db->isa('Bio::DB::InMemoryCache') ) {
493
 
        $db = new Bio::DB::InMemoryCache(-seqdb => $db);
494
 
    }
 
402
 
495
403
    if( $self->isa('Bio::Das::SegmentI') &&
496
 
        ! $self->absolute ) { 
 
404
        ! $self->absolute ) {
497
405
        $self->warn("Calling spliced_seq with a Bio::Das::SegmentI which does have absolute set to 1 -- be warned you may not be getting things on the correct strand");
498
406
    }
499
 
    
500
 
    my @locs = map { $_->[0] }
501
 
    # sort so that most negative is first basically to order
502
 
    # the features on the opposite strand 5'->3' on their strand
503
 
    # rather than they way most are input which is on the fwd strand
504
 
 
505
 
    sort { $a->[1] <=> $b->[1] } # Yes Tim, Schwartzian transformation
506
 
    map { 
507
 
        $fstrand = $_->strand unless defined $fstrand;
508
 
        $mixed = 1 if defined $_->strand && $fstrand != $_->strand;
509
 
        if( defined $_->seq_id ) {
510
 
            $mixedloc = 1 if( $_->seq_id ne $seqid );
 
407
 
 
408
    my @locset = $self->location->each_Location;
 
409
    my @locs;
 
410
    if( ! $nosort ) {
 
411
        @locs = map { $_->[0] }
 
412
        # sort so that most negative is first basically to order
 
413
        # the features on the opposite strand 5'->3' on their strand
 
414
        # rather than they way most are input which is on the fwd strand
 
415
 
 
416
        sort { $a->[1] <=> $b->[1] } # Yes Tim, Schwartzian transformation
 
417
        map {
 
418
            $fstrand = $_->strand unless defined $fstrand;
 
419
            $mixed = 1 if defined $_->strand && $fstrand != $_->strand;
 
420
            if( defined $_->seq_id ) {
 
421
                $mixedloc = 1 if( $_->seq_id ne $seqid );
 
422
            }
 
423
            [ $_, $_->start * ($_->strand || 1)];
 
424
        } @locset;
 
425
 
 
426
        if ( $mixed ) {
 
427
            $self->warn("Mixed strand locations, spliced seq using the input order rather than trying to sort");
 
428
            @locs = @locset;
511
429
        }
512
 
        [ $_, $_->start* ($_->strand || 1)];        
513
 
    } $self->location->each_Location; 
514
 
   
515
 
    if ( $mixed ) { 
516
 
        $self->warn("Mixed strand locations, spliced seq using the input order rather than trying to sort");    
517
 
        @locs = $self->location->each_Location; 
518
 
    } elsif( $mixedloc ) {
519
 
        # we'll use the prescribed location order
520
 
        @locs = $self->location->each_Location; 
 
430
    } else {
 
431
        # use the original order instead of trying to sort
 
432
        @locs = @locset;
 
433
        $fstrand = $locs[0]->strand;
521
434
    }
522
435
 
523
 
    foreach my $loc ( @locs  ) {
 
436
    foreach my $loc ( @locs ) {
524
437
        if( ! $loc->isa("Bio::Location::Atomic") ) {
525
438
            $self->throw("Can only deal with one level deep locations");
526
439
        }
530
443
        }
531
444
        # deal with remote sequences
532
445
 
533
 
        if( defined $loc->seq_id && 
 
446
        if( defined $loc->seq_id &&
534
447
            $loc->seq_id ne $seqid ) {
535
448
            if( defined $db ) {
536
449
                my $sid = $loc->seq_id;
553
466
        } else {
554
467
            $called_seq = $self->entire_seq;
555
468
        }
556
 
        
 
469
 
 
470
    # does the called sequence make sense? Bug 1780
 
471
    if ($called_seq->length < $loc->end) {
 
472
        my $accession = $called_seq->accession;
 
473
        my $end = $loc->end;
 
474
        my $length = $called_seq->length;
 
475
        my $orig_id = $self->seq_id; # originating sequence
 
476
        my ($locus) = $self->get_tagset_values("locus_tag");
 
477
        $self->throw("Location end ($end) exceeds length ($length) of ".
 
478
                     "called sequence $accession.\nCheck sequence version used in ".
 
479
                     "$locus locus-tagged SeqFeature in $orig_id.");
 
480
    }
 
481
 
557
482
        if( $self->isa('Bio::Das::SegmentI') ) {
558
 
            my ($s,$e) = ($loc->start,$loc->end);           
 
483
            my ($s,$e) = ($loc->start,$loc->end);
559
484
            $seqstr .= $called_seq->subseq($s,$e)->seq();
560
 
        } else { 
561
 
            # This is dumb subseq should work on locations...
 
485
        } else {
 
486
            # This is dumb, subseq should work on locations...
562
487
            if( $loc->strand == 1 ) {
563
488
                $seqstr .= $called_seq->subseq($loc->start,$loc->end);
564
489
            } else {
565
 
                $seqstr .= $called_seq->trunc($loc->start,$loc->end)->revcom->seq();
 
490
                if( $nosort ) {
 
491
                    $seqstr = $called_seq->trunc($loc->start,$loc->end)->revcom->seq() . $seqstr;
 
492
                } else {
 
493
                    $seqstr .= $called_seq->trunc($loc->start,$loc->end)->revcom->seq();
 
494
                }
566
495
            }
567
496
        }
568
497
    }
569
 
    my $out = Bio::Seq->new( -id => $self->entire_seq->display_id . "_spliced_feat",
 
498
    my $out = Bio::Seq->new( -id => $self->entire_seq->display_id
 
499
                                    . "_spliced_feat",
570
500
                             -seq => $seqstr);
571
 
    
 
501
 
572
502
    return $out;
573
503
}
574
504
 
575
 
=head1 RangeI methods
576
 
 
577
 
These methods are inherited from RangeI and can be used
578
 
directly from a SeqFeatureI interface. Remember that a 
579
 
SeqFeature is-a RangeI, and so wherever you see RangeI you
580
 
can use a feature ($r in the below documentation).
581
 
 
582
 
=head2 overlaps
583
 
 
584
 
  Title   : overlaps
585
 
  Usage   : if($feat->overlaps($r)) { do stuff }
586
 
            if($feat->overlaps(200)) { do stuff }
587
 
  Function: tests if $feat overlaps $r
588
 
  Args    : a RangeI to test for overlap with, or a point
589
 
  Returns : true if the Range overlaps with the feature, false otherwise
590
 
 
591
 
 
592
 
=head2 contains
593
 
 
594
 
  Title   : contains
595
 
  Usage   : if($feat->contains($r) { do stuff }
596
 
  Function: tests whether $feat totally contains $r
597
 
  Args    : a RangeI to test for being contained
598
 
  Returns : true if the argument is totaly contained within this range
599
 
 
600
 
 
601
 
=head2 equals
602
 
 
603
 
  Title   : equals
604
 
  Usage   : if($feat->equals($r))
605
 
  Function: test whether $feat has the same start, end, strand as $r
606
 
  Args    : a RangeI to test for equality
607
 
  Returns : true if they are describing the same range
608
 
 
609
 
 
610
 
=head1 Geometrical methods
611
 
 
612
 
These methods do things to the geometry of ranges, and return
613
 
triplets (start, stop, strand) from which new ranges could be built.
614
 
 
615
 
=head2 intersection
616
 
 
617
 
  Title   : intersection
618
 
  Usage   : ($start, $stop, $strand) = $feat->intersection($r)
619
 
  Function: gives the range that is contained by both ranges
620
 
  Args    : a RangeI to compare this one to
621
 
  Returns : nothing if they do not overlap, or the range that they do overlap
622
 
 
623
 
=head2 union
624
 
 
625
 
  Title   : union
626
 
  Usage   : ($start, $stop, $strand) = $feat->union($r);
627
 
          : ($start, $stop, $strand) = Bio::RangeI->union(@ranges);
628
 
  Function: finds the minimal range that contains all of the ranges
629
 
  Args    : a range or list of ranges to find the union of
630
 
  Returns : the range containing all of the ranges
631
 
 
632
 
=cut
633
 
 
634
505
=head2 location
635
506
 
636
507
 Title   : location
637
508
 Usage   : my $location = $seqfeature->location()
638
 
 Function: returns a location object suitable for identifying location 
639
 
           of feature on sequence or parent feature  
 
509
 Function: returns a location object suitable for identifying location
 
510
           of feature on sequence or parent feature
640
511
 Returns : Bio::LocationI object
641
512
 Args    : none
642
513
 
654
525
 
655
526
 Title   : primary_id
656
527
 Usage   : $obj->primary_id($newval)
657
 
 Function: 
658
 
 Example : 
 
528
 Function:
 
529
 Example :
659
530
 Returns : value of primary_id (a scalar)
660
531
 Args    : on set, new value (a scalar or undef, optional)
661
532
 
 
533
Primary ID is a synonym for the tag 'ID'
662
534
 
663
535
=cut
664
536
 
665
537
sub primary_id{
666
538
    my $self = shift;
667
 
    return $self->{'primary_id'} = shift if @_;
668
 
    return $self->{'primary_id'};
669
 
}
 
539
    # note from cjm@fruitfly.org:
 
540
    # I have commented out the following 2 lines:
 
541
 
 
542
    #return $self->{'primary_id'} = shift if @_;
 
543
    #return $self->{'primary_id'};
 
544
 
 
545
    #... and replaced it with the following; see
 
546
    # http://bioperl.org/pipermail/bioperl-l/2003-December/014150.html
 
547
    # for the discussion that lead to this change
 
548
 
 
549
    if (@_) {
 
550
        if ($self->has_tag('ID')) {
 
551
            $self->remove_tag('ID');
 
552
        }
 
553
        $self->add_tag_value('ID', shift);
 
554
    }
 
555
    my ($id) = $self->get_tagset_values('ID');
 
556
    return $id;
 
557
}
 
558
 
 
559
sub generate_unique_persistent_id {
 
560
    # DEPRECATED - us IDHandler
 
561
    my $self = shift;
 
562
    require "Bio/SeqFeature/Tools/IDHandler.pm";
 
563
    Bio::SeqFeature::Tools::IDHandler->new->generate_unique_persistent_id($self);
 
564
}
 
565
 
 
566
=head1 Bio::RangeI methods
 
567
 
 
568
These methods are inherited from RangeI and can be used
 
569
directly from a SeqFeatureI interface. Remember that a
 
570
SeqFeature is-a RangeI, and so wherever you see RangeI you
 
571
can use a feature ($r in the below documentation).
 
572
 
 
573
=cut
 
574
 
 
575
=head2 start()
 
576
 
 
577
 See L<Bio::RangeI>
 
578
 
 
579
=head2 end()
 
580
 
 
581
 See L<Bio::RangeI>
 
582
 
 
583
=head2 strand()
 
584
 
 
585
 See L<Bio::RangeI>
 
586
 
 
587
=head2 overlaps()
 
588
 
 
589
 See L<Bio::RangeI>
 
590
 
 
591
=head2 contains()
 
592
 
 
593
 See L<Bio::RangeI>
 
594
 
 
595
=head2 equals()
 
596
 
 
597
 See L<Bio::RangeI>
 
598
 
 
599
=head2 intersection()
 
600
 
 
601
 See L<Bio::RangeI>
 
602
 
 
603
=head2 union()
 
604
 
 
605
 See L<Bio::RangeI>
 
606
 
 
607
=head1 Bio::AnnotatableI methods
 
608
 
 
609
=cut
 
610
 
 
611
=head2 has_tag()
 
612
 
 
613
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
614
 
 
615
=head2 remove_tag()
 
616
 
 
617
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
618
 
 
619
=head2 add_tag_value()
 
620
 
 
621
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
622
 
 
623
=head2 get_tag_values()
 
624
 
 
625
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
626
 
 
627
=head2 get_tagset_values()
 
628
 
 
629
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
630
 
 
631
=head2 get_all_tags()
 
632
 
 
633
 B<Deprecated>.  See L<Bio::AnnotatableI>
 
634
 
 
635
=cut
 
636
 
670
637
1;