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

« back to all changes in this revision

Viewing changes to Bio/Location/Split.pm

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: Split.pm,v 1.46.4.3 2006/10/31 22:26:31 cjfields Exp $
 
1
# $Id: Split.pm 14964 2008-10-26 05:03:15Z cjfields $
2
2
#
3
3
# BioPerl module for Bio::Location::Split
4
4
# Cared for by Jason Stajich <jason@bioperl.org>
17
17
 
18
18
    use Bio::Location::Split;
19
19
 
20
 
    my $splitlocation = new Bio::Location::Split();
21
 
    $splitlocation->add_sub_Location(new Bio::Location::Simple(-start=>1,
 
20
    my $splitlocation = Bio::Location::Split->new();
 
21
    $splitlocation->add_sub_Location(Bio::Location::Simple->new(-start=>1,
22
22
                                                               -end=>30,
23
23
                                                               -strand=>1));
24
 
    $splitlocation->add_sub_Location(new Bio::Location::Simple(-start=>50,
 
24
    $splitlocation->add_sub_Location(Bio::Location::Simple->new(-start=>50,
25
25
                                                               -end=>61,
26
26
                                                               -strand=>1));   
27
27
    my @sublocs = $splitlocation->sub_Location();
563
563
=cut
564
564
 
565
565
sub seq_id {
566
 
    my ($self, $seqid) = @_;
 
566
    my $self = shift;
567
567
 
568
 
    if(! $self->is_remote()) {
 
568
    if(@_ && !$self->is_remote()) {
569
569
        foreach my $subloc ($self->sub_Location(0)) {
570
 
            $subloc->seq_id($seqid) if ! $subloc->is_remote();
 
570
            $subloc->seq_id(@_) if !$subloc->is_remote();
571
571
        }
572
572
    }
573
 
    return $self->SUPER::seq_id($seqid);
 
573
    return $self->SUPER::seq_id(@_);
574
574
}
575
575
 
576
576
=head2 coordinate_policy
654
654
    return $str;
655
655
}
656
656
 
 
657
=head2 valid_Location
 
658
 
 
659
 Title   : valid_Location
 
660
 Usage   : if ($location->valid_location) {...};
 
661
 Function: boolean method to determine whether location is considered valid
 
662
           (has minimum requirements for Simple implementation)
 
663
 Returns : Boolean value: true if location is valid, false otherwise
 
664
 Args    : none
 
665
 
 
666
=cut
 
667
 
657
668
# we'll probably need to override the RangeI methods since our locations will
658
669
# not be contiguous.
659
670
 
660
 
1;
 
 
b'\\ No newline at end of file'
 
671
1;