comparison lib/CPT/Plot/Class.pm @ 1:d724f34e671d draft default tip

planemo upload commit 94b0cd1fff0826c6db3e7dc0c91c0c5a8be8bb0c
author cpt
date Mon, 05 Jun 2023 02:50:07 +0000
parents
children
comparison
equal deleted inserted replaced
0:e4de0a0e90c8 1:d724f34e671d
1 package CPT::Plot::Class;
2 use Moose;
3 use Data::Dumper;
4
5 # ABSTRACT: Class of objects for use in a genome map
6 #
7 has 'objects' => ( is => 'rw', isa => 'ArrayRef', default => sub { [] } );
8
9 # Should this class be used in calculation of partitions
10 has 'included' => ( is => 'rw', isa => 'Bool' );
11
12 has 'key' => ( is => 'rw', isa => 'Str' );
13 has 'color' => ( is => 'rw', isa => 'Str' );
14 has 'border' => ( is => 'rw', isa => 'Str' );
15 has 'plot' => ( is => 'rw', isa => 'Bool' );
16
17 sub addObject {
18 my ( $self, $object ) = @_;
19 push( @{ $self->objects() }, $object );
20 }
21
22 sub getItemList {
23 my ($self) = @_;
24 my @items;
25 foreach ( @{ $self->objects() } ) {
26 push( @items, $_->getLocations() );
27 }
28 return \@items;
29 }
30
31 sub getObjects {
32 my ($self) = @_;
33 return $self->objects();
34 }
35
36 sub getMemberCount {
37 my ($self) = @_;
38 return scalar @{ $self->objects() };
39 }
40
41 no Moose;
42 1;
43
44 __END__
45
46 =pod
47
48 =encoding UTF-8
49
50 =head1 NAME
51
52 CPT::Plot::Class - Class of objects for use in a genome map
53
54 =head1 VERSION
55
56 version 1.96
57
58 =head1 AUTHOR
59
60 Eric Rasche <rasche.eric@yandex.ru>
61
62 =head1 COPYRIGHT AND LICENSE
63
64 This software is Copyright (c) 2014 by Eric Rasche.
65
66 This is free software, licensed under:
67
68 The GNU General Public License, Version 3, June 2007
69
70 =cut