line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Coordinate::Chain; |
2
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:BIOPERLML'; |
3
|
|
|
|
|
|
|
$Bio::Coordinate::Chain::VERSION = '1.007001'; |
4
|
1
|
|
|
1
|
|
1974
|
use utf8; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
28
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
6
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
21
|
|
7
|
1
|
|
|
1
|
|
3
|
use Bio::Root::Root; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
15
|
|
8
|
1
|
|
|
1
|
|
4
|
use Bio::Coordinate::Result; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
9
|
1
|
|
|
1
|
|
3
|
use parent qw(Bio::Coordinate::Collection Bio::Coordinate::MapperI); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
4
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# ABSTRACT: Mapping locations through a chain of coordinate mappers. |
12
|
|
|
|
|
|
|
# AUTHOR: Heikki Lehvaslaiho |
13
|
|
|
|
|
|
|
# OWNER: Heikki Lehvaslaiho |
14
|
|
|
|
|
|
|
# LICENSE: Perl_5 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
# CONTRIBUTOR: Ewan Birney |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub map { |
21
|
1
|
|
|
1
|
1
|
139
|
my ($self,$value) = @_; |
22
|
|
|
|
|
|
|
|
23
|
1
|
50
|
|
|
|
4
|
$self->throw("Need to pass me a value.") |
24
|
|
|
|
|
|
|
unless defined $value; |
25
|
1
|
50
|
|
|
|
9
|
$self->throw("I need a Bio::Location, not [$value]") |
26
|
|
|
|
|
|
|
unless $value->isa('Bio::LocationI'); |
27
|
1
|
50
|
|
|
|
7
|
$self->throw("No coordinate mappers!") |
28
|
|
|
|
|
|
|
unless $self->each_mapper; |
29
|
|
|
|
|
|
|
|
30
|
1
|
|
|
|
|
4
|
my $res = Bio::Coordinate::Result->new(); |
31
|
|
|
|
|
|
|
|
32
|
1
|
|
|
|
|
81
|
foreach my $mapper ($self->each_mapper) { |
33
|
|
|
|
|
|
|
|
34
|
2
|
|
|
|
|
22
|
my $res = $mapper->map($value); |
35
|
2
|
50
|
|
|
|
7
|
return unless $res->each_match; |
36
|
2
|
|
|
|
|
5
|
$value = $res->match; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
34
|
return $value; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub sort{ |
45
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
46
|
0
|
|
|
|
|
|
$self->warn("You do not really want to sort your chain, do you!\nDoing nothing."); |
47
|
|
|
|
|
|
|
} |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
1; |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
__END__ |