Bio::EnsEMBL::Map Qtl
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Map::Qtl
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Exception qw ( throw deprecate )
Inherit
Bio::EnsEMBL::Storable
Synopsis
Description
Represents a Qtl in the EnsEMBL database. A quantitative trait locus is
defined by three markers, two flanking and one peak (optional) marker.
Its a region (or more often a group of regions) which is likely to
affect the phenotype (trait) described in this Qtl.
Methods
add_synonymDescriptionCode
flank_marker_1DescriptionCode
flank_marker_2DescriptionCode
get_QtlFeature
No description
Code
get_synonymsDescriptionCode
lod_scoreDescriptionCode
newDescriptionCode
peak_markerDescriptionCode
source_databaseDescriptionCode
source_primary_idDescriptionCode
traitDescriptionCode
Methods description
add_synonymcode    nextTop
  Arg [1]    : string $source
The source of the synonym
Arg [2] : string $identifier
The identifier from this source
Example : $qtl->add_synonym('rat genome database', '65516');
Description: Adds a synonym to this qtl
Returntype : none
Exceptions : thrown if arguments are not provided
Caller : general
Status : stable
flank_marker_1codeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Map::Marker $flank_marker_1
One flanking marker of the interest region, the two flanking
markers define the region
Example : none
Description: Getter/Setter attribute flanking_marker_1
Returntype : Bio::EnsEMBL::Map::Marker
Exceptions : none
Caller : general
Status : stable
flank_marker_2codeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Map::Marker $flank_marker_2
One flanking marker of the interest region, the two flanking
markers define the region
Example : none
Description: Getter/Setter attribute flanking_marker_2
Returntype : Bio::EnsEMBL::Map::Marker
Exceptions : none
Caller : general
Status : stable
get_synonymscodeprevnextTop
  Arg [1]    : none
Example :
foreach my $source ($keys %{$qtl->get_synonyms}) {
print $source . ':'. $qtl->get_synonyms->{$source};
}
Description: Returns a hashref of synonyms keyed on their source name
Returntype : hashref of synonyms keyed on their source name
Exceptions : none
Caller : general
Status : stable
lod_scorecodeprevnextTop
  Arg [1]    : float $lod_score
A score for the Qtl
Example : none
Description: Getter/Setter for attribute lod_score
Returntype : float
Exceptions : none
Caller : general
Status : stable
newcodeprevnextTop
  Arg [1]    : int $dbID
Arg [2] : Bio::EnsEMBL::Map::DBSQL::QtlAdaptor $adaptor
Arg [3] : Bio::EnsEMBL::Map::Marker $flank_marker_1
Arg [4] : Bio::EnsEMBL::Map::Marker $peak_marker
Arg [5] : Bio::EnsEMBL::Map::Marker $flank_marker_2
Arg [6] : string $trait
Arg [7] : float $lod_score
Arg [8] : hashref $synonyms
A hashref with source keys and identifier values
Example : none
Description: Creates a new Qtl object. Usually done by Adaptor
Returntype : Bio::EnsEMBL::Map::Qtl
Exceptions : none
Caller : general, DBSQL::QtlAdaptor, DBSQL::QtlFeatureAdaptor
Status : stable
peak_markercodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Map::Marker $peak_marker
an optional Marker which has the peak probablitity
for this traits occurence
Example : none
Description: Getter/Setter for attribute peak_marker
Returntype : Bio::EnsEMBL::Map::Marker
Exceptions : none
Caller : general
Status : stable
source_databasecodeprevnextTop
This method is deprecated. Use get_synonyms or add_synonym instead.
source_primary_idcodeprevnextTop
This method is deprecated. Use get_synonyms or add_synonym instead.
traitcodeprevnextTop
  Arg [1]    : string $trait
Phenotype of this Qtl
Example : none
Description: Getter/Setter for the trait attribute
Returntype : string
Exceptions : none
Caller : general
Status : stable
Methods code
add_synonymdescriptionprevnextTop
sub add_synonym {
  my $self = shift;
  my $source = shift;
  my $identifier = shift;

  unless($source && $identifier) {
    throw('Source and identifier arguments are required');
  }

  $self->{'synonyms'}->{$source} = $identifier;
}
flank_marker_1descriptionprevnextTop
sub flank_marker_1 {
  my $self = shift;

  if(@_) {
    $self->{'flank_marker_1'} = shift;
  }

  return $self->{'flank_marker_1'};
}
flank_marker_2descriptionprevnextTop
sub flank_marker_2 {
  my $self = shift;

  if(@_) {
    $self->{'flank_marker_2'} = shift;
  }

  return $self->{'flank_marker_2'};
}
get_QtlFeaturedescriptionprevnextTop
sub get_QtlFeature {
  my $self = shift;

  my $adaptor = $self->adaptor();
  return undef unless $adaptor;
  my $result = $adaptor->db()->get_QtlFeatureAdaptor()->
    fetch_all_by_Qtl( $self );

  if( @$result ) {
    return $result->[0];
  } else {
    return;
  }
}
get_synonymsdescriptionprevnextTop
sub get_synonyms {
  my $self = shift;

  return $self->{'synonyms'} || {};
}
lod_scoredescriptionprevnextTop
sub lod_score {
  my $self = shift;

  if(@_) {
    $self->{'lod_score'} = shift;
  }

  return $self->{'lod_score'};
}
newdescriptionprevnextTop
sub new {
  my ( $class, $dbID, $adaptor, $flank_marker_1, $peak_marker,
       $flank_marker_2, $trait, $lod_score,
       $synonyms ) = @_;

  $class = ref( $class ) ||$class;
  my $self = bless( {
		     'dbID'           => $dbID,
		     'adaptor'        => $adaptor,
		     'flank_marker_1' => $flank_marker_1,
		     'flank_marker_2' => $flank_marker_2,
		     'peak_marker'    => $peak_marker,
		     'trait'          => $trait,
		     'lod_score'      => $lod_score,
		     'synonyms'       => $synonyms
		    }, $class );

  return $self;
}
peak_markerdescriptionprevnextTop
sub peak_marker {
  my $self = shift;

  if(@_) {
    $self->{'peak_marker'} = shift;
  }

  return $self->{'peak_marker'};
}
source_databasedescriptionprevnextTop
sub source_database {
  my $self = shift;

  deprecate('Use get_synonyms or add_synonym instead');

  my $syns = $self->get_synonyms;
  my ($source) = keys %$syns;

  return $source || '';
}
source_primary_iddescriptionprevnextTop
sub source_primary_id {
  my $self = shift;

  deprecate('Use get_synonyms or add_synonym instead');

  my $syns = $self->get_synonyms;
  my ($source) = keys %$syns;

  if($source) {
    return $syns->{$source};
  }

  return '';
}


1;
}
traitdescriptionprevnextTop
sub trait {
  my $self = shift;

  if(@_) {
    $self->{'trait'} = shift;
  }

  return $self->{'trait'};
}
General documentation
LICENSETop
  Copyright (c) 1999-2009 The European Bioinformatics Institute and
Genome Research Limited. All rights reserved.
This software is distributed under a modified Apache license. For license details, please see /info/about/code_licence.html
CONTACTTop
  Please email comments or questions to the public Ensembl
developers list at <ensembl-dev@ebi.ac.uk>.
Questions may also be sent to the Ensembl help desk at <helpdesk@ensembl.org>.
get_QtlFeaturesTop
  Args       : none
Example : none
Description: return the qtl feature which is associated with this
Qtl. It comes in chromosomal slice coordinates. There can
only be one.
Returntype : Bio::EnsEMBL::Map::QtlFeature
Exceptions : only works with adaptored Qtls
Caller : general
Status : stable