comparison variant_effect_predictor/Bio/EnsEMBL/Funcgen/ExperimentalSubset.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 #
2 # Ensembl module for Bio::EnsEMBL::Funcgen::ExperimentalSubset
3 #
4 # You may distribute this module under the same terms as Perl itself
5
6 =head1 NAME
7
8 Bio::EnsEMBL::ExperimentalSet - A module to represent ExperimentalSubset object.
9
10
11 =head1 SYNOPSIS
12
13 use Bio::EnsEMBL::Funcgen::ExperimetnalSubset;
14
15 my $data_set = Bio::EnsEMBL::Funcgen::ExperimentalSubset->new(
16 -DBID => $dbID,
17 -ADAPTOR => $self,
18 -NAME => $name,
19 -EXPERIMENTAL_SET => $eset,
20 );
21
22
23
24 =head1 DESCRIPTION
25
26 An ExperimentalSubset object is a very simple skeleton class to enable storage of associated subset states. As such there
27 are only very simple accessor methods for basic information, and there is no namesake adaptor, rather is is handled by the
28 ExperimentalSetAdaptor.
29
30 =head1 AUTHOR
31
32 This module was created by Nathan Johnson.
33
34 This module is part of the Ensembl project: http://www.ensembl.org/
35
36 =head1 CONTACT
37
38 Post comments or questions to the Ensembl development list: ensembl-dev@ebi.ac.uk
39
40 =head1 METHODS
41
42 =cut
43
44 use strict;
45 use warnings;
46
47 package Bio::EnsEMBL::Funcgen::ExperimentalSubset;
48
49 use Bio::EnsEMBL::Utils::Argument qw( rearrange );
50 use Bio::EnsEMBL::Utils::Exception qw( throw );
51 use Bio::EnsEMBL::Funcgen::Storable;
52
53 use vars qw(@ISA);
54 @ISA = qw(Bio::EnsEMBL::Funcgen::Storable);
55
56
57 =head2 new
58
59 Example : my $eset = Bio::EnsEMBL::Funcgen::ExperimentalSubset->new(
60 -DBID => $dbID,
61 -ADAPTOR => $self,
62 -NAME => $name,
63 -EXPERIMENTAL_SET => $eset,
64 );
65
66
67 Description: Constructor for ExperimentalSubset objects.
68 Returntype : Bio::EnsEMBL::Funcgen::ExperimentalSubset
69 Exceptions : Throws if no name defined
70 Throws if CellType or FeatureType are not valid or stored
71 Caller : General
72 Status : At risk
73
74 =cut
75
76 sub new {
77 my $caller = shift;
78
79 my $class = ref($caller) || $caller;
80
81 my $self = $class->SUPER::new(@_);
82
83 #do we need to add $fg_ids to this? Currently maintaining one feature_group focus.(combi exps?)
84 my ($name, $eset)
85 = rearrange(['NAME', 'EXPERIMENTAL_SET'], @_);
86
87
88 throw('Must provide a name argument') if ! defined $name;
89
90 if(!(ref($eset) &&
91 $eset->isa('Bio::EnsEMBL::Funcgen::ExperimentalSet')
92 && $eset->dbID())){
93 throw('Must provide a valid stored experimental_set argument');
94 }
95
96
97 $self->{'name'} = $name;
98 $self->{'experimental_set'} = $eset;
99
100 return $self;
101 }
102
103
104 =head2 name
105
106 Example : my $name = $exp_sset->name();
107 Description: Getter for the name of this ExperimentalSubset.
108 Returntype : string
109 Exceptions : None
110 Caller : General
111 Status : At Risk
112
113 =cut
114
115 sub name {
116 my $self = shift;
117 return $self->{'name'};
118 }
119
120 =head2 experimental_set
121
122 Example : my $eset = $exp_sset->experimental_set();
123 Description: Getter for the experimental_set attribute of this ExperimentalSubset.
124 Returntype : Bio::EnsEMBL::Funcgen::ExperimentalSet
125 Exceptions : None
126 Caller : General
127 Status : At Risk
128
129 =cut
130
131 sub experimental_set {
132 my $self = shift;
133 return $self->{'experimental_set'};
134 }
135
136
137
138 1;
139