Mercurial > repos > mahtabm > ensembl
comparison variant_effect_predictor/Bio/EnsEMBL/Map/QtlFeature.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::Map::QtlFeature | |
24 | |
25 =head1 SYNOPSIS | |
26 | |
27 =head1 DESCRIPTION | |
28 | |
29 Represents a QtlFeature in the EnsEMBL database. QtlFeatures are | |
30 generally very long and its not clear wether a representation in Contig | |
31 coordinates actually makes sense. In the database they will have | |
32 chromosomal coordinates. | |
33 | |
34 =head1 METHODS | |
35 | |
36 =cut | |
37 | |
38 package Bio::EnsEMBL::Map::QtlFeature; | |
39 | |
40 use strict; | |
41 use vars qw(@ISA); | |
42 | |
43 use Bio::EnsEMBL::Feature; | |
44 | |
45 @ISA = qw(Bio::EnsEMBL::Feature); | |
46 | |
47 | |
48 =head2 new | |
49 | |
50 Arg [1] : Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor $adaptor | |
51 Example : none | |
52 Description: Create a QtlFeature | |
53 Returntype : Bio::EnsEMBL::Map::QtlFeature | |
54 Exceptions : none | |
55 Caller : general, DBSQL::QtlFeatureAdaptor | |
56 Status : Stable | |
57 | |
58 =cut | |
59 | |
60 sub new { | |
61 my ( $class, $adaptor, $slice, $start, $end, $qtl, $analysis ) = @_; | |
62 | |
63 $class = ref( $class ) ||$class; | |
64 my $self = bless( { | |
65 'slice' => $slice, | |
66 'start' => $start, | |
67 'end' => $end, | |
68 'qtl' => $qtl, | |
69 'analysis' => $analysis, | |
70 'strand' => 0 | |
71 }, $class ); | |
72 | |
73 $self->adaptor($adaptor); | |
74 return $self; | |
75 } | |
76 | |
77 | |
78 =head2 qtl | |
79 | |
80 Arg [1] : Bio::EnsEMBL::Map::Qtl $qtl | |
81 the qtl object for this feature | |
82 Example : none | |
83 Description: return the Qtl object associated with this location | |
84 Returntype : Bio::EnsEMBL::Map::Qtl | |
85 Exceptions : none | |
86 Caller : general | |
87 Status : Stable | |
88 | |
89 =cut | |
90 | |
91 sub qtl { | |
92 my $self = shift; | |
93 | |
94 if(@_) { | |
95 $self->{'qtl'} = shift; | |
96 } | |
97 | |
98 return $self->{'qtl'}; | |
99 } | |
100 | |
101 | |
102 | |
103 =head2 strand | |
104 | |
105 Arg [1] : none | |
106 Example : $strand = $qtl_feat->strand(); | |
107 Description: Overrides the Feature strand method to always return a | |
108 value of 0 for qtl features (they are unstranded features) | |
109 Returntype : int (always 0) | |
110 Exceptions : none | |
111 Caller : general | |
112 Status : Stable | |
113 | |
114 =cut | |
115 | |
116 sub strand { | |
117 my $self = shift; | |
118 return 0; | |
119 } | |
120 | |
121 | |
122 | |
123 =head2 move | |
124 | |
125 Arg [1] : $start - The new end of this qtl feature | |
126 Arg [2] : $end - The new start of this qtl feature | |
127 Arg [3] : $strand - ignored always set to 0 | |
128 Example : $qtl_feat->move(1, 10_000); | |
129 Description: Overrides superclass move() method to ensure strand is always 0. | |
130 See Bio::EnsEMBL::Feature::move | |
131 Returntype : none | |
132 Exceptions : none | |
133 Caller : general | |
134 Status : Stable | |
135 | |
136 =cut | |
137 | |
138 sub move { | |
139 my ($self, $start, $end, $strand) = @_; | |
140 | |
141 #maintain a strandedness of 0 | |
142 return $self->SUPER::move($start,$end,0); | |
143 } | |
144 | |
145 | |
146 | |
147 1; | |
148 | |
149 |