line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
GenOO::RegionCollection - Role for a collection of GenOO::Region objects |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# This role defines the interface for collections of L<GenOO::Region> objects |
10
|
|
|
|
|
|
|
# Cannot be initialized |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This role defines the interface for collections of L<GenOO::Region> objects. |
15
|
|
|
|
|
|
|
All required attributes and subs must be present in classes that consume |
16
|
|
|
|
|
|
|
this role. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Let the code begin... |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package GenOO::RegionCollection; |
23
|
|
|
|
|
|
|
$GenOO::RegionCollection::VERSION = '1.4.6'; |
24
|
2
|
|
|
2
|
|
1337
|
use Moose::Role; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
17
|
|
25
|
2
|
|
|
2
|
|
8139
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
18
|
|
26
|
2
|
|
|
2
|
|
635
|
use GenOO::RegionCollection::Factory; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
196
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
requires qw ( |
29
|
|
|
|
|
|
|
name |
30
|
|
|
|
|
|
|
species |
31
|
|
|
|
|
|
|
description |
32
|
|
|
|
|
|
|
longest_record |
33
|
|
|
|
|
|
|
add_record |
34
|
|
|
|
|
|
|
foreach_record_do |
35
|
|
|
|
|
|
|
records_count |
36
|
|
|
|
|
|
|
strands |
37
|
|
|
|
|
|
|
rnames_for_strand |
38
|
|
|
|
|
|
|
rnames_for_all_strands |
39
|
|
|
|
|
|
|
is_empty |
40
|
|
|
|
|
|
|
is_not_empty |
41
|
|
|
|
|
|
|
foreach_overlapping_record_do |
42
|
|
|
|
|
|
|
records_overlapping_region |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
####################################################################### |
46
|
|
|
|
|
|
|
######################## Class Methods ######################## |
47
|
|
|
|
|
|
|
####################################################################### |
48
|
|
|
|
|
|
|
sub create_from { |
49
|
1
|
|
|
1
|
0
|
4865
|
my ($class, @attributes) = @_; |
50
|
1
|
|
|
|
|
24
|
return GenOO::RegionCollection::Factory->create(@attributes)->read_collection; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
1; |