Archive Ensembl HomeArchive Ensembl Home
QtlFeature.pm
Go to the documentation of this file.
00001 =head1 LICENSE
00002 
00003   Copyright (c) 1999-2012 The European Bioinformatics Institute and
00004   Genome Research Limited.  All rights reserved.
00005 
00006   This software is distributed under a modified Apache license.
00007   For license details, please see
00008 
00009     http://www.ensembl.org/info/about/code_licence.html
00010 
00011 =head1 CONTACT
00012 
00013   Please email comments or questions to the public Ensembl
00014   developers list at <dev@ensembl.org>.
00015 
00016   Questions may also be sent to the Ensembl help desk at
00017   <helpdesk@ensembl.org>.
00018 
00019 =cut
00020 
00021 =head1 NAME
00022 
00023 Bio::EnsEMBL::Map::QtlFeature
00024 
00025 =head1 SYNOPSIS
00026 
00027 =head1 DESCRIPTION
00028 
00029 Represents a QtlFeature in the EnsEMBL database. QtlFeatures are
00030 generally very long and its not clear wether a representation in Contig
00031 coordinates actually makes sense. In the database they will have
00032 chromosomal coordinates.
00033 
00034 =head1 METHODS
00035 
00036 =cut
00037 
00038 package Bio::EnsEMBL::Map::QtlFeature;
00039 
00040 use strict;
00041 use vars qw(@ISA);
00042 
00043 use Bio::EnsEMBL::Feature;
00044 
00045 @ISA = qw(Bio::EnsEMBL::Feature);
00046 
00047 
00048 =head2 new
00049 
00050   Arg [1]    : Bio::EnsEMBL::Map::DBSQL::QtlFeatureAdaptor $adaptor
00051   Example    : none
00052   Description: Create a QtlFeature
00053   Returntype : Bio::EnsEMBL::Map::QtlFeature
00054   Exceptions : none
00055   Caller     : general, DBSQL::QtlFeatureAdaptor
00056   Status     : Stable
00057 
00058 =cut
00059 
00060 sub new {
00061   my ( $class, $adaptor, $slice, $start, $end, $qtl, $analysis ) = @_;
00062 
00063   $class = ref( $class ) ||$class;
00064   my $self = bless( {
00065              'slice'    => $slice,
00066              'start'    => $start,
00067              'end'      => $end,
00068              'qtl'      => $qtl,
00069              'analysis' => $analysis,
00070          'strand'   => 0
00071             }, $class );
00072 
00073   $self->adaptor($adaptor);
00074   return $self;
00075 }
00076 
00077 
00078 =head2 qtl
00079 
00080   Arg [1]    : Bio::EnsEMBL::Map::Qtl $qtl
00081                the qtl object for this feature
00082   Example    : none
00083   Description: return the Qtl object associated with this location
00084   Returntype : Bio::EnsEMBL::Map::Qtl
00085   Exceptions : none
00086   Caller     : general
00087   Status     : Stable
00088 
00089 =cut
00090 
00091 sub qtl {
00092   my $self = shift;
00093 
00094   if(@_) {
00095     $self->{'qtl'} = shift;
00096   }
00097 
00098   return $self->{'qtl'};
00099 }
00100 
00101 
00102 
00103 =head2 strand
00104 
00105   Arg [1]    : none
00106     Example    : $strand = $qtl_feat->strand();
00107   Description: Overrides the Feature strand method to always return a
00108                value of 0 for qtl features (they are unstranded features)
00109   Returntype : int (always 0)
00110   Exceptions : none
00111   Caller     : general
00112   Status     : Stable
00113 
00114 =cut
00115 
00116 sub strand {
00117     my $self = shift;
00118   return 0;
00119 }
00120 
00121 
00122 
00123 =head2 move
00124 
00125   Arg [1]    : $start - The new end of this qtl feature
00126   Arg [2]    : $end - The new start of this qtl feature
00127   Arg [3]    : $strand - ignored always set to 0
00128   Example    : $qtl_feat->move(1, 10_000);
00129   Description: Overrides superclass move() method to ensure strand is always 0.
00130                See Bio::EnsEMBL::Feature::move
00131   Returntype : none
00132   Exceptions : none
00133   Caller     : general
00134   Status     : Stable
00135 
00136 =cut
00137 
00138 sub move {
00139   my ($self, $start, $end, $strand) = @_;
00140 
00141   #maintain a strandedness of 0
00142   return $self->SUPER::move($start,$end,0);
00143 }
00144 
00145 
00146 
00147 1;
00148 
00149