Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/EnsEMBL/MiscSet.pm @ 0:1f6dce3d34e0
Uploaded
author | mahtabm |
---|---|
date | Thu, 11 Apr 2013 02:01:53 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:1f6dce3d34e0 |
---|---|
1 =head1 LICENSE | |
2 | |
3 Copyright (c) 1999-2012 The European Bioinformatics Institute and | |
4 Genome Research Limited. All rights reserved. | |
5 | |
6 This software is distributed under a modified Apache license. | |
7 For license details, please see | |
8 | |
9 http://www.ensembl.org/info/about/code_licence.html | |
10 | |
11 =head1 CONTACT | |
12 | |
13 Please email comments or questions to the public Ensembl | |
14 developers list at <dev@ensembl.org>. | |
15 | |
16 Questions may also be sent to the Ensembl help desk at | |
17 <helpdesk@ensembl.org>. | |
18 | |
19 =cut | |
20 | |
21 =head1 NAME | |
22 | |
23 Bio::EnsEMBL::MiscSet - This is a set representing a classification of | |
24 a group of miscellaneuos features. | |
25 | |
26 =head1 SYNOPSIS | |
27 | |
28 use Bio::EnsEMBL::MiscSet; | |
29 | |
30 my $misc_set = Bio::EnsEMBL::MiscSet->new( | |
31 1234, $adaptor, 'tilepath', | |
32 'Assembly Tiling Path', | |
33 'The tiling path of clones', 1e6 | |
34 ); | |
35 | |
36 my $misc_feature->add_set($misc_set); | |
37 | |
38 =head1 DESCRIPTION | |
39 | |
40 MiscSets represent classsifications or groupings of MiscFeatures. | |
41 Features are classified into sets essentially to define what they are | |
42 and how they may be used. Generally MiscFeatures are retrieved on | |
43 the basis of their associated sets. See Bio::EnsEMBL::MiscFeature, | |
44 Bio::EnsEMBL::DBSQL::MiscFeatureAdaptor. | |
45 | |
46 Note that MiscSets and MiscFeatures were formerly known as MapSets and | |
47 MapFrags | |
48 | |
49 =head1 METHODS | |
50 | |
51 =cut | |
52 | |
53 package Bio::EnsEMBL::MiscSet; | |
54 | |
55 use strict; | |
56 | |
57 use Bio::EnsEMBL::Storable; | |
58 use Bio::EnsEMBL::Utils::Argument qw(rearrange); | |
59 | |
60 use vars qw(@ISA); | |
61 | |
62 @ISA = qw(Bio::EnsEMBL::Storable); | |
63 | |
64 | |
65 =head2 new | |
66 | |
67 Arg [1] : int $misc_set_id | |
68 The internal identifier for this misc set | |
69 Arg [2] : string $code | |
70 The unique code which identifies this set type | |
71 Arg [3] : string $name | |
72 The human readable name of this set | |
73 Arg [4] : string $desc | |
74 The description of this set | |
75 Arg [5] : int $max_len | |
76 The maximum length of features of this mapset | |
77 Example : $set = new Bio::EnsEMBL::MiscSet(1234, 'tilepath', | |
78 'Assembly Tiling Path', | |
79 'The tiling path of clones', | |
80 1e6); | |
81 Description: Instantiates a Bio::EnsEMBL::MiscSet | |
82 Returntype : Bio::EnsEMBL::MiscSet | |
83 Exceptions : none | |
84 Caller : MiscFeatureAdaptor | |
85 Status : Stable | |
86 | |
87 =cut | |
88 | |
89 sub new { | |
90 my $caller = shift; | |
91 | |
92 my $class = ref($caller) || $caller; | |
93 | |
94 my $self = $class->SUPER::new(@_); | |
95 | |
96 my($code, $name, $desc, $max_len) = | |
97 rearrange([qw(CODE NAME DESCRIPTION LONGEST_FEATURE)], @_); | |
98 | |
99 $self->{'code'} = $code; | |
100 $self->{'name'} = $name; | |
101 $self->{'description'} = $desc; | |
102 $self->{'longest_feature'} = $max_len; | |
103 | |
104 return $self; | |
105 } | |
106 | |
107 =head2 code | |
108 | |
109 Arg [1] : string $newval (optional) | |
110 The new value to set the code attribute to | |
111 Example : $code = $obj->code() | |
112 Description: Getter/Setter for the code attribute | |
113 Returntype : string | |
114 Exceptions : none | |
115 Caller : general | |
116 Status : Stable | |
117 | |
118 =cut | |
119 | |
120 sub code{ | |
121 my $self = shift; | |
122 $self->{'code'} = shift if(@_); | |
123 return $self->{'code'}; | |
124 } | |
125 | |
126 | |
127 =head2 name | |
128 | |
129 Arg [1] : string $newval (optional) | |
130 The new value to set the code attribute to | |
131 Example : $name = $obj->name() | |
132 Description: Getter/Setter for the name attribute | |
133 Returntype : string | |
134 Exceptions : none | |
135 Caller : general | |
136 Status : Stable | |
137 | |
138 =cut | |
139 | |
140 sub name { | |
141 my $self = shift; | |
142 $self->{'name'} = shift if(@_); | |
143 return $self->{'name'}; | |
144 } | |
145 | |
146 | |
147 =head2 description | |
148 | |
149 Arg [1] : string $newval (optional) | |
150 The new value to set the description attribute to | |
151 Example : $description = $obj->description() | |
152 Description: Getter/Setter for the description attribute | |
153 Returntype : string | |
154 Exceptions : none | |
155 Caller : general | |
156 Status : Stable | |
157 | |
158 =cut | |
159 | |
160 sub description{ | |
161 my $self = shift; | |
162 $self->{'description'} = shift if(@_); | |
163 return $self->{'description'}; | |
164 } | |
165 | |
166 | |
167 =head2 longest_feature | |
168 | |
169 Arg [1] : int $newval (optional) | |
170 The new value to set the longest_feature attribute to | |
171 Example : $longest_feature = $obj->longest_feature() | |
172 Description: Getter/Setter for the longest_feature attribute | |
173 Returntype : int | |
174 Exceptions : none | |
175 Caller : general | |
176 Status : Stable | |
177 | |
178 =cut | |
179 | |
180 sub longest_feature{ | |
181 my $self = shift; | |
182 $self->{'longest_feature'} = shift if(@_); | |
183 return $self->{'longest_feature'}; | |
184 } | |
185 | |
186 | |
187 1; |