EnsEMBL/MiscSet.pm untested

filter: Statementstmt 0.0% 0 / 38 Branchbran 0.0% 0 / 8 Conditioncond 0.0% 0 / 3 Subroutinesub 0.0% 0 / 9 Podpod 0.0% 0 / 5 totaltotal 0.0% 0 / 63 CC 5 SCAR 15.0
CC
5
Cov
0%
code
6.0
name
6.0
description
6.0
CRAP 4.5
1 =head1 LICENSE
2  
3 See the NOTICE file distributed with this work for additional information
4 regarding copyright ownership.
5  
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9  
10 http://www.apache.org/licenses/LICENSE-2.0
11  
12 Unless required by applicable law or agreed to in writing, software
13 distributed under the License is distributed on an "AS IS" BASIS,
14 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 See the License for the specific language governing permissions and
16 limitations under the License.
17  
18 =cut
19  
20  
21 =head1 CONTACT
22  
23 Please email comments or questions to the public Ensembl
24 developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.
25  
26 Questions may also be sent to the Ensembl help desk at
27 <http://www.ensembl.org/Help/Contact>.
28  
29 =cut
30  
31 =head1 NAME
32  
33 Bio::EnsEMBL::MiscSet - This is a set representing a classification of
34 a group of miscellaneuos features.
35  
36 =head1 SYNOPSIS
37  
38 use Bio::EnsEMBL::MiscSet;
39  
40 my $misc_set = Bio::EnsEMBL::MiscSet->new(
41 1234, $adaptor, 'tilepath',
42 'Assembly Tiling Path',
43 'The tiling path of clones', 1e6
44 );
45  
46 my $misc_feature->add_set($misc_set);
47  
48 =head1 DESCRIPTION
49  
50 MiscSets represent classsifications or groupings of MiscFeatures.
51 Features are classified into sets essentially to define what they are
52 and how they may be used. Generally MiscFeatures are retrieved on
53 the basis of their associated sets. See Bio::EnsEMBL::MiscFeature,
54 Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor.
55  
56 Note that MiscSets and MiscFeatures were formerly known as MapSets and
57 MapFrags
58  
59 =head1 METHODS
60  
61 =cut
62  
63 package Bio::EnsEMBL::MiscSet;
64 $Bio::EnsEMBL::MiscSet::VERSION = '114.0.0_50'; # TRIAL
65 $Bio::EnsEMBL::MiscSet::VERSION = '114.0.050';
66 use strict;
67  
68 use Bio::EnsEMBL::Storable;
69 use Bio::EnsEMBL::Utils::Argument qw(rearrange);
70  
71 use vars qw(@ISA);
72  
73 @ISA = qw(Bio::EnsEMBL::Storable);
74  
75  
76 =head2 new
77  
78 Arg [1] : int $misc_set_id
79 The internal identifier for this misc set
80 Arg [2] : string $code
81 The unique code which identifies this set type
82 Arg [3] : string $name
83 The human readable name of this set
84 Arg [4] : string $desc
85 The description of this set
86 Arg [5] : int $max_len
87 The maximum length of features of this mapset
88 Example : $set = new Bio::EnsEMBL::MiscSet(1234, 'tilepath',
89 'Assembly Tiling Path',
90 'The tiling path of clones',
91 1e6);
92 Description: Instantiates a Bio::EnsEMBL::MiscSet
93 Returntype : Bio::EnsEMBL::MiscSet
94 Exceptions : none
95 Caller : MiscFeatureAdaptor
96 Status : Stable
97  
98 =cut
99  
100 sub new {
101 my $caller = shift;
102  
103 my $class = ref($caller) || $caller;
104  
105 my $self = $class->SUPER::new(@_);
106  
107 my($code, $name, $desc, $max_len) =
108 rearrange([qw(CODE NAME DESCRIPTION LONGEST_FEATURE)], @_);
109  
110 $self->{'code'} = $code;
111 $self->{'name'} = $name;
112 $self->{'description'} = $desc;
113 $self->{'longest_feature'} = $max_len;
114  
115 return $self;
116 }
117  
118 =head2 code
119  
120 Arg [1] : string $newval (optional)
121 The new value to set the code attribute to
122 Example : $code = $obj->code()
123 Description: Getter/Setter for the code attribute
124 Returntype : string
125 Exceptions : none
126 Caller : general
127 Status : Stable
128  
129 =cut
130  
131 sub code{
132 my $self = shift;
133 $self->{'code'} = shift if(@_);
134 return $self->{'code'};
135 }
136  
137  
138 =head2 name
139  
140 Arg [1] : string $newval (optional)
141 The new value to set the code attribute to
142 Example : $name = $obj->name()
143 Description: Getter/Setter for the name attribute
144 Returntype : string
145 Exceptions : none
146 Caller : general
147 Status : Stable
148  
149 =cut
150  
151 sub name {
152 my $self = shift;
153 $self->{'name'} = shift if(@_);
154 return $self->{'name'};
155 }
156  
157  
158 =head2 description
159  
160 Arg [1] : string $newval (optional)
161 The new value to set the description attribute to
162 Example : $description = $obj->description()
163 Description: Getter/Setter for the description attribute
164 Returntype : string
165 Exceptions : none
166 Caller : general
167 Status : Stable
168  
169 =cut
170  
171 sub description{
172 my $self = shift;
173 $self->{'description'} = shift if(@_);
174 return $self->{'description'};
175 }
176  
177  
178 =head2 longest_feature
179  
180 Arg [1] : int $newval (optional)
181 The new value to set the longest_feature attribute to
182 Example : $longest_feature = $obj->longest_feature()
183 Description: Getter/Setter for the longest_feature attribute
184 Returntype : int
185 Exceptions : none
186 Caller : general
187 Status : Stable
188  
189 =cut
190  
191 sub longest_feature{
192 my $self = shift;
193 $self->{'longest_feature'} = shift if(@_);
194 return $self->{'longest_feature'};
195 }
196  
197  
198 1;