Bio::EnsEMBL::Variation::DBSQL IndividualGenotypeAdaptor
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Toolbar
WebCvsRaw content
Summary
Bio::EnsEMBL::Variation::DBSQL::IndividualGenotypeAdaptor
Package variables
No package variables defined.
Included modules
Bio::EnsEMBL::DBSQL::BaseAdaptor
Bio::EnsEMBL::Utils::Exception qw ( throw warning )
Bio::EnsEMBL::Variation::DBSQL::BaseGenotypeAdaptor
Inherit
Bio::EnsEMBL::Variation::DBSQL::BaseGenotypeAdaptor
Synopsis
  $db = Bio::EnsEMBL::Variation::DBSQL::DBAdaptor->new(...);
$iga = $db->get_IndividualGenotypeAdaptor(); $ia = $db->get_IndividualAdaptor(); # Get an IndividualGenotype by its internal identifier $igtype = $ia->fetch_by_dbID(145); # Get all individual genotypes for an individual $ind = $ia->fetch_all_by_Individual(1219); foreach $igtype (@{$iga->fetch_all_by_Individual($ind)}) { print $igtype->variation()->name(), ' ', $igtype->allele1(), '/', $igtype->allele2(), "\n"; }
Description
This adaptor provides database connectivity for IndividualGenotype objects.
IndividualGenotypes may be retrieved from the Ensembl variation database by
several means using this module.
Methods
fetch_all_by_IndividualDescriptionCode
fetch_all_by_Slice
No description
Code
fetch_all_by_VariationDescriptionCode
Methods description
fetch_all_by_Individualcode    nextTop
  Arg [1]    : Bio::EnsEMBL::Variation::Individual
Example : $ind = $ind_adaptor->fetch_by_dbID(1345);
@gtys = $igty_adaptor->fetch_all_by_Individual($ind);
Description: Retrieves all genotypes which are stored for a specified
individual.
Returntype : Bio::EnsEMBL::Variation::IndividualGenotype
Exceptions : throw on incorrect argument
Caller : general
Status : At Risk
fetch_all_by_VariationcodeprevnextTop
  Arg [1]    : Bio::EnsEMBL::Variation $variation
Example : my $var = $variation_adaptor->fetch_by_name( "rs1121" )
$igtypes = $igtype_adaptor->fetch_all_by_Variation( $var )
Description: Retrieves a list of individual genotypes for the given Variation.
If none are available an empty listref is returned.
Returntype : listref Bio::EnsEMBL::Variation::IndividualGenotype
Exceptions : none
Caller : general
Status : At Risk
Methods code
fetch_all_by_IndividualdescriptionprevnextTop
sub fetch_all_by_Individual {
  my $self = shift;
  my $ind = shift;
  

  $self->_multiple(0); #to return data from single and multiple genotype table
return $self->SUPER::fetch_all_by_Individual($ind);
}
fetch_all_by_SlicedescriptionprevnextTop
sub fetch_all_by_Slice {
    my $self = shift;
    my $slice = shift;
    
    $self->_multiple(0);
    my @final_genotypes;
    push @final_genotypes, @{$self->SUPER::fetch_all_by_Slice($slice)};
    $self->_multiple(1);
    $self->SUPER::fetch_all_by_Slice($slice);
    push @final_genotypes, @{$self->SUPER::fetch_all_by_Slice($slice)};
    return\@ final_genotypes;
}

1;
}
fetch_all_by_VariationdescriptionprevnextTop
sub fetch_all_by_Variation {
    my $self = shift;
    my $variation = shift;
    $self->_multiple(0); #to return data from single and multiple table
return $self->SUPER::fetch_all_by_Variation($variation);
}
General documentation
AUTHOR - Graham McVickerTop
CONTACTTop
Post questions to the Ensembl development list ensembl-dev@ebi.ac.uk