The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

LICENSE

Copyright [1999-2015] Wellcome Trust Sanger Institute and the EMBL-European Bioinformatics Institute Copyright [2016-2024] EMBL-European Bioinformatics Institute

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

CONTACT

  Please email comments or questions to the public Ensembl
  developers list at <http://lists.ensembl.org/mailman/listinfo/dev>.

  Questions may also be sent to the Ensembl help desk at
  <http://www.ensembl.org/Help/Contact>.

NAME

Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor - Adaptor for the manipulation of Alternative allele groupings

SYNOPSIS

  use Bio::EnsEMBL::AltAlleleGroup;
  use Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor;
  
  my $aag_adaptor = Bio::EnsEMBL::Registry->get_DBAdaptor("Human","core","AltAlleleGroup");
  
  # For a known Gene, find the reference alternative allele
  my $aag = $aag_adaptor->fetch_by_gene_id($gene->dbID);
  my $reference_gene = $aag->get_ref_Gene;
  
  # Get a list of AltAlleleGroups
  my $list = $aag_adaptor->fetch_all_('IS_REPRESENTATIVE');
  $list = $aag_adaptor->fetch_all();
  
  my $dbID = $aag_adaptor->store($aag);
  
  $aag = $aag_adaptor->fetch_by_dbID($dbID);
  $aag_adaptor->remove($aag);

DESCRIPTION

  The AltAlleleGroupAdaptor provides CRUD for AltAlleleGroup objects. It allows
  groups of alleles to be retrieved by group and gene ids.

fetch_all

  Arg[1]      : (optional) String - type of group
                Restrict group fetches to just one type. Technically it selects 
                out mixed-annotation groups where a single member contains that type.
  Description : Fetches all the alt-allele groups, creates objects to represent
                them and returns them in a list. Specifying a group type 
                identifies all groups containing a member of this type. It 
                does not filter out the other members
                
                Multispecies support is triggered by the is_multispecies flag
                and species_id of the DBAdaptor.
  Returntype  : ArrayRef of Bio::EnsEMBL::AltAlleleGroup

fetch_by_dbID

  Arg[1]      : AltAlleleGroup dbID.
  Description : Creates and returns an AltAlleleGroup for the given group id
                
  Returntype  : Bio::EnsEMBL::AltAlleleGroup

fetch_by_gene_id

  Arg[1]      : Integer Gene ID of the member to query by
  Description : Returns an AltAlleleGroup which contains
                the specified gene member                
  Returntype  : Bio::EnsEMBL::AltAlleleGroup

fetch_all_by_gene_id

  Arg[1]      : Integer Gene ID of the member to query by
  Description : Returns an array of one or more AltAlleleGroups,
                which each contain the specified gene member                
  Returntype  : Array of Bio::EnsEMBL::AltAlleleGroup objects

store

  Arg[1]     : Bio::EnsEMBL::AltAlleleGroup
  Description: Used for persisting new groups to the database.
               It updates the dbID of the object handed to it to match the
               database.
  Returntype : Integer Alt Allele Group id

update

  Arg [1]    : AltAlleleGroup 
  Description: Removes the existing DB record of an AltAlleleGroup and stores 
               the altered version.
  Returntype : Integer - the return value of the store method, viz. whether the
               insert was successful.

remove

  Arg [1]    : The AltAlleleGroup to remove.
  Arg [2]    : Boolean indicates if the entry in alt_allele_group should be retained or remove. Defaults to removing the entry
  Example    : $aaga->remove($alt_allele_group);
  Description: This removes an AltAlleleGroup from all tables of the database. 
  Exceptions : None