Bio::EnsEMBL::Variation VariationAnnotation
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Variation::VariationAnnotation - A genotype phenotype annotation for a nucleotide variation.
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::Storable
Bio::EnsEMBL::Utils::Argument qw ( rearrange )
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Bio::EnsEMBL::Variation::Variation
Inherit
Bio::EnsEMBL::Storable
Synopsis
    # Variation Annotation is associated with a variation object
$va = Bio::EnsEMBL::Variation::VariationAnnotation->new
(_variation_id => 8,
-phenotype_name => 'BD',
-phenotype_description => 'Bipolar Disorder',
-source_name => 'EGA',
-study_type => 'GWAS',
-local_stable_id => 'EGAS00000000001',
-study => 'pubmed/17293876',
-associated_gene => 'HHEX',
-associated_variant_risk_allele => 'rs13266634-C',
-variation_names => 'rs13266634',
-risk_allele_freq_in_controls => '0.3',
-p_value => '6.00E-08',
-variation => $v);
... print $va->phenotype_name(),'-',$va->phenotype_description,"\n"; print "From source ",$va->source_name,'-',$va->local_stable_id,"\n"; print " With study_type ", $va->study_type(),"\n"; ... # Get the Variation object which this annotation represents # If not already retrieved from the DB, this will be # transparently lazy-loaded my $v = $va->variation();
Description
This is a class representing the genotype-phenotype annotation of a variation
from the ensembl-variation database. The actual variation information is
represented by an associated Bio::EnsEMBL::Variation::Variation object.
Methods
associated_geneDescriptionCode
associated_variant_risk_alleleDescriptionCode
local_stable_idDescriptionCode
newDescriptionCode
new_fast
No description
Code
p_valueDescriptionCode
phenotype_descriptionDescriptionCode
phenotype_nameDescriptionCode
risk_allele_freq_in_controlsDescriptionCode
source_nameDescriptionCode
studyDescriptionCode
study_typeDescriptionCode
variationDescriptionCode
variation_namesDescriptionCode
Methods description
associated_genecode    nextTop
  Arg [1]    : string $newval (optional)
The new value to set the associated_gene attribute to
Example : $associated_gene = $obj->associated_gene()
Description: Getter/Setter for the associated_gene attribute. This is the
gene names associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
associated_variant_risk_allelecodeprevnextTop
  Arg [1]    : string $newval (optional)
The new value to set the associated_variant_risk_allele attribute to
Example : $associated_variant_risk_allele = $obj->associated_variant_risk_allele()
Description: Getter/Setter for the associated_variant_risk_allele attribute. This is the
associated_variant_risk_allele associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
local_stable_id codeprevnextTop
  Arg [1]    : string local_stable_id (optional)               
The new value to set the local_stable_id attribute to
Example : $local_stable_id = $obj->local_stable_id()
Description: Getter/Setter for the local_stable_id attribute.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
newcodeprevnextTop
  Arg [-dbID] :
int - unique internal identifier for variation_annotation
Arg [-ADAPTOR] :
Bio::EnsEMBL::Variation::DBSQL::VariationAnnotationAdaptor
Arg [-PHENOTYPE_NAME] :
string - name of the phenotype
Arg [-PHENOTYPE_DESCRIPTION] :
string - description of the phenotype
Arg [-SOURCE_NAME] :
string - name of the source
Arg [-VARIATION_NAMES] :
string - name of the associated variations
Arg [-VARIATION] :
int - the variation object associated with this annotation.
Arg [_VARIATION_ID] :
int _ the internal id of the variation object associated with this
identifier. This may be provided instead of a variation object so that
the variation may be lazy-loaded from the database on demand.
Arg [-STUDY] :
string - the pubmed/ids or project/study names
Arg [-ASSOCIATED_GENE] :
string - the gene names associated with this annotation/variant.
Arg [-ASSOCIATED_VARIANT_RISK_ALLELE] :
string - the variants-risk alleles associated with this annotation.
Arg [-RISK_ALLELE_FREQ_IN_CONTROLS] :
string - the risk allele frequency in controls associated with this annotation.
Arg [-VARIATION] :
string - the p_value associated with this annotation.
Example : $va = Bio::EnsEMBL::Variation::VariationAnnotation->new (-phenotype_name => 'BD', -phenotype_description => 'Bipolar Disorder', -souce_name => 'EGA', -variation_names => 'rs123', -local_stable_id => 'EGAS00000000001', _variation_id => 10, -study => 'pubmed/17293876', -associated_gene => 'HHEX', -associated_variant_risk_allele => 'rs13266634-C', -risk_allele_freq_in_controls => '0.3', -p_value => '6.00E-08', -variation => $v); Description: Constructor. Instantiates a new VariationAnnotation object. Returntype : Bio::EnsEMBL::Variation::VariationAnnotation Exceptions : none Caller : general Status : At Risk
p_valuecodeprevnextTop
  Arg [1]    : string $newval (optional)
The new value to set the p_value attribute to
Example : $p_value = $obj->p_value()
Description: Getter/Setter for the p_value attribute. This is the
p_value associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
phenotype_descriptioncodeprevnextTop
  Arg [1]    : string phenotype_description (optional)
The new value to set the phenotype_description attribute to
Example : $phenotype_description = $obj->phenotype_description()
Description: Getter/Setter for the phenotype_description attribute.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
phenotype_namecodeprevnextTop
  Arg [1]    : string phenotype_name (optional)
The new value to set the phenotype_name attribute to
Example : $phenotype_name = $obj->phenotype_name()
Description: Getter/Setter for the phenotype_name attribute.
Returntype : string
Exceptions : none
Caller : general
Status : Stable
risk_allele_freq_in_controlscodeprevnextTop
  Arg [1]    : string $newval (optional)
The new value to set the risk_allele_freq_in_controls attribute to
Example : $risk_allele_freq_in_controls = $obj->risk_allele_freq_in_controls()
Description: Getter/Setter for the risk_allele_freq_in_controls attribute. This is the
risk_allele_freq_in_controls associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
source_namecodeprevnextTop
  Arg [1]    : string source_name (optional)
The new value to set the source_name attribute to
Example : $source_name = $obj->source_name()
Description: Getter/Setter for the source_name attribute.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
studycodeprevnextTop
  Arg [1]    : string $newval (optional)
The new value to set the study attribute to
Example : $variation_names = $obj->study()
Description: Getter/Setter for the study attribute. This is the
pubmed/id or project name associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
study_type codeprevnextTop
  Arg [1]    : string study_type (optional)               
The new value to set the study_type attribute to
Example : $study_type = $obj->study_type()
Description: Getter/Setter for the study_type attribute.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
variationcodeprevnextTop
  Arg [1]    : (optional) Bio::EnsEMBL::Variation::Variation $variation
Example : $v = $va->variation();
Description: Getter/Setter for the variation associated with this annotation.
If not set, and this VariationAnnotation has an associated adaptor
an attempt will be made to lazy-load the variation from the
database.
Returntype : Bio::EnsEMBL::Variation::Variation
Exceptions : throw on incorrect argument
Caller : general
Status : Stable
variation_namescodeprevnextTop
  Arg [1]    : string $newval (optional)
The new value to set the variation_names attribute to
Example : $variation_names = $obj->variation_names()
Description: Getter/Setter for the variation_names attribute. This is the
names of the variation associated with this study.
Returntype : string
Exceptions : none
Caller : general
Status : At Risk
Methods code
associated_genedescriptionprevnextTop
sub associated_gene {
  my $self = shift;
  return $self->{'associated_gene'} = shift if(@_);
  return $self->{'associated_gene'};
}
associated_variant_risk_alleledescriptionprevnextTop
sub associated_variant_risk_allele {
  my $self = shift;
  return $self->{'associated_variant_risk_allele'} = shift if(@_);
  return $self->{'associated_variant_risk_allele'};
}
local_stable_iddescriptionprevnextTop
sub local_stable_id {
  my $self = shift;  
  return $self->{'local_stable_id'} = shift if(@_);  
  return $self->{'local_stable_id'};
}
newdescriptionprevnextTop
sub new {
  my $caller = shift;
  my $class = ref($caller) || $caller;
  my $self = $class->SUPER::new(@_);

  my ($dbID,$adaptor,$phenotype_name,$phenotype_description,$source_name,$study_type,$local_stable_id,$variation_id,$variation_names,$variation,$study,$associated_gene,$associated_variant_risk_allele,$risk_allele_freq_in_controls,$p_value) =
    rearrange([qw(dbID ADAPTOR PHENOTYPE_NAME PHENOTYPE_DESCRIPTION SOURCE_NAME
                  STUDY_TYPE LOCAL_STABLE_ID _VARIATION_ID VARIATION_NAMES VARIATION
		  STUDY ASSOCIATED_GENE ASSOCIATED_VARIANT_RISK_ALLELE
		 RISK_ALLELE_FREQ_IN_CONTROLS P_VALUE)],@_); 

  $self->{'dbID'} = $dbID;
  $self->{'adaptor'}    = $adaptor;
  $self->{'phenotype_name'}   = $phenotype_name;
  $self->{'phenotype_description'}  = $phenotype_description;
  $self->{'local_stable_id'} = $local_stable_id;
  $self->{'variation'}        = $variation;
  $self->{'_variation_id'}    = $variation_id;
  $self->{'source_name'}      = $source_name;
  $self->{'variation_names'}   = $variation_names;
  $self->{'study_type'}  = $study_type;
  $self->{'study'} = $study;
  $self->{'associated_gene'} = $associated_gene;
  $self->{'associated_variant_risk_allele'} = $associated_variant_risk_allele;
  $self->{'risk_allele_freq_in_controls'} = $risk_allele_freq_in_controls;
  $self->{'p_value'} = $p_value;
 
  return $self;
}
new_fastdescriptionprevnextTop
sub new_fast {
  my $class = shift;
  my $hashref = shift;
  return bless $hashref, $class;
}
p_valuedescriptionprevnextTop
sub p_value {
  my $self = shift;
  return $self->{'p_value'} = shift if(@_);
  return $self->{'p_value'};
}


1;
}
phenotype_descriptiondescriptionprevnextTop
sub phenotype_description {
  my $self = shift;
  return $self->{'phenotype_description'} = shift if(@_);
  return $self->{'phenotype_description'};
}
phenotype_namedescriptionprevnextTop
sub phenotype_name {
  my $self = shift;
  return $self->{'phenotype_name'} = shift if(@_);
  return $self->{'phenotype_name'};
}
risk_allele_freq_in_controlsdescriptionprevnextTop
sub risk_allele_freq_in_controls {
  my $self = shift;
  return $self->{'risk_allele_freq_in_controls'} = shift if(@_);
  return $self->{'risk_allele_freq_in_controls'};
}
source_namedescriptionprevnextTop
sub source_name {
  my $self = shift;
  return $self->{'source_name'} = shift if(@_);
  return $self->{'source_name'};
}
studydescriptionprevnextTop
sub study {
  my $self = shift;
  return $self->{'study'} = shift if(@_);
  return $self->{'study'};
}
study_typedescriptionprevnextTop
sub study_type {
  my $self = shift;  
  return $self->{'study_type'} = shift if(@_);  
  return $self->{'study_type'};
}
variationdescriptionprevnextTop
sub variation {
  my $self = shift;

  if(@_) {
    if(!ref($_[0]) || !$_[0]->isa('Bio::EnsEMBL::Variation::Variation')) {
      throw("Bio::EnsEMBL::Variation::Variation argument expected");
    }
    $self->{'variation'} = shift;
  }
  elsif(!defined($self->{'variation'}) && $self->{'adaptor'} &&
        defined($self->{'_variation_id'})) {
    # lazy-load from database on demand
my $va = $self->{'adaptor'}->db()->get_VariationAdaptor(); $self->{'variation'} = $va->fetch_by_dbID($self->{'_variation_id'}); } return $self->{'variation'};
}
variation_namesdescriptionprevnextTop
sub variation_names {
  my $self = shift;
  return $self->{'variation_names'} = shift if(@_);
  return $self->{'variation_names'};
}
General documentation
CONTACTTop
Post questions to the Ensembl development list: ensembl-dev@ebi.ac.uk