ensembl-hive  2.6
Bio::EnsEMBL::AltAlleleGroup Class Reference
+ Inheritance diagram for Bio::EnsEMBL::AltAlleleGroup:

Public Member Functions

public Bio::EnsEMBL::AltAlleleGroup new ()
 
public add_member ()
 
public get_all_members_with_type ()
 
public HashRef attribs ()
 
public set_attribs ()
 
public remove_attribs ()
 
public remove_member ()
 
public Boolean contains_member ()
 
public remove_all_members ()
 
public Int rep_Gene_id ()
 
public unset_rep_Gene_id ()
 
public ArrayRef get_all_Gene_ids ()
 
public Bio::EnsEMBL::Gene get_representative_Gene ()
 
public ArrayRef get_all_Genes ()
 
public ArrayRef get_all_Genes_types ()
 
public Int size ()
 
public ArrayRef get_all_members ()
 
- Public Member Functions inherited from Bio::EnsEMBL::Storable
public Bio::EnsEMBL::Storable new ()
 
public Instance new_fast ()
 
public Int dbID ()
 
public Bio::EnsEMBL::DBSQL::BaseAdaptor adaptor ()
 
public Boolean is_stored ()
 
public get_all_DAS_Features ()
 

Detailed Description

Synopsis

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_Group_by_dbID($gene->dbID);
my $reference_gene = $aag->get_representative_Gene;
# Get a list of AltAlleleGroups
my $list = $aag_adaptor->fetch_all_Groups_by_type('HAS_CODING_POTENTIAL');
$list = $aag_adaptor->fetch_all_Groups();
while ($aag = shift @$list) {
$aag->get_all_Genes;
# Do your important things ...
}
# Creating and editing an AltAlleleGroup
my %type_flags = ('IS_MOST_COMMON_ALLELE' => '1','AUTOMATICALLY_ASSIGNED' => '1');
-MEMBERS => [ [$gene_id,\%type_flags ] ],
);
$aag->add_member($gene_id,\%type_flags);
my $dbID = $aag_adaptor->store($aag);

Description

    Alt allele groups keep track of which alleles are tied to a particular Gene
    They allow related genes to be located. This class allows fetching of both
    IDs and fully fledged Gene objects.
    
    AltAlleleGroup members are assigned types to differentiate them by their
    origin. These types are set as flags, allowing you to select the union of
    types as well as by individual ones.
        
    No flags set denotes a situation of no information.
    Valid flags are as follows:
    'IS_REPRESENTATIVE',
    'IS_MOST_COMMON_ALLELE',
    'IN_CORRECTED_ASSEMBLY',
    'HAS_CODING_POTENTIAL',
    'IN_ARTIFICIALLY_DUPLICATED_ASSEMBLY',
    'IN_SYNTENIC_REGION',
    'HAS_SAME_UNDERLYING_DNA_SEQUENCE',
    'IN_BROKEN_ASSEMBLY_REGION',
    'IS_VALID_ALTERNATE',
    'SAME_AS_REPRESENTATIVE',
    'SAME_AS_ANOTHER_ALLELE',
    'MANUALLY_ASSIGNED',
    'AUTOMATICALLY_ASSIGNED'

Definition at line 67 of file AltAlleleGroup.pm.

Member Function Documentation

◆ add_member()

public Bio::EnsEMBL::AltAlleleGroup::add_member ( )
  Arg [1]     : Gene dbID
  Arg [2]     : Type List, used for assigning type flags of this member, see Description above
  Description : Adds a record of one new member to the AltAlleleGroup. Once a
                change is made, this must be persisted to the database with
                AltAlleleGroupAdaptor->store or ->update
  Example     :
$aag->add_member(1040032,$types_hash);
$aaga->update($aag); # updating the whole group is necessary.
\
Code:
click to view

◆ attribs()

public HashRef Bio::EnsEMBL::AltAlleleGroup::attribs ( )
  Arg [1]     : Int gene id to record attributes against
  Description : Returns all known attributes of the given gene id. Attributes
                are returned as a HashRef but is a copy of the interally
                held attribute list
  Returntype  : HashRef copy of all the given id's attributes
  Example     :
$aag->attribs(10, 'IS_VALID_ALTERNATE');
$aag->attribs(10, [ 'IS_VALID_ALTERNATE' ]);
$aag->attribs(10, {IS_VALID_ALTERNATE => 1});
\
Code:
click to view

◆ contains_member()

public Boolean Bio::EnsEMBL::AltAlleleGroup::contains_member ( )
  Arg [1]     : Int gene id to retrieve attributes against
  Description : Searches through the members list looking for the
                specified gene id. Returns true if it was found
                or false if not.
  Returntype  : Boolean indicating if the given gene id is held in this group
  Example     :
$aag->contains_member(10);
\
Code:
click to view

◆ get_all_Gene_ids()

public ArrayRef Bio::EnsEMBL::AltAlleleGroup::get_all_Gene_ids ( )
  Arg[1]      : Boolean - Do not include representative gene in list of ids.
  Arg[2]      : ArrayRef - Can contain dbIDs or Gene objects to exclude from the returned list
  Description : fetches all the Gene dbIDs within the allele group. It can also
                be used to list those ids that are not the representative Gene.
  Returntype  : ArrayRef of gene dbIDs
 
Code:
click to view

◆ get_all_Genes()

public ArrayRef Bio::EnsEMBL::AltAlleleGroup::get_all_Genes ( )
  Arg[1]      : Boolean - Do not include representative gene in list of ids.
  Arg[2]      : ArrayRef - Can contain dbIDs or Gene objects to exclude from the returned list
  Description : Fetches all the Gene objects within the allele group. It can also
                be used to list those Genes that are not the representative Gene.
  Returntype  : ArrayRef of Bio::EnsEMBL::Gene objects
 
Code:
click to view

◆ get_all_Genes_types()

public ArrayRef Bio::EnsEMBL::AltAlleleGroup::get_all_Genes_types ( )
  Arg[1]      : Boolean - Do not include representative gene in list of ids.
  Arg[2]      : ArrayRef - Can contain dbIDs or Gene objects to exclude from the returned list
  Description : Fetches all the Gene objects within the allele group and their
                associcated attributes. It can also be used to list those 
                Genes that are not the representative Gene.
  Returntype  : ArrayRef. 2 dimensional holding [Bio::EnsEMBL::Gene, {attribute_hash}]
 
Code:
click to view

◆ get_all_members()

public ArrayRef Bio::EnsEMBL::AltAlleleGroup::get_all_members ( )
  Description : Retrieves all of the information about all members. Be aware
                that this emits the interal data structure so direct modification
                should be done with caution.
  Returntype  : ArrayRef of id and type list: [gene_id,type]
  Caller      : AltAlleleGroupAdaptor->store
 
Code:
click to view

◆ get_all_members_with_type()

public Bio::EnsEMBL::AltAlleleGroup::get_all_members_with_type ( )
  Arg [1]     : String The type to search members by
  Description : Loops through the internal members array returning all
                attributes of the same type as what has been specified
  Example     :
my $members = $aag->get_all_members_with_type('IS_VALID_ALTERNATE');
\
Code:
click to view

◆ get_representative_Gene()

public Bio::EnsEMBL::Gene Bio::EnsEMBL::AltAlleleGroup::get_representative_Gene ( )
  Description : Used to fetch a Gene object which has been marked as the
                representative Gene for this alt allele group.
  Returntype  : Bio::EnsEMBL::Gene object which is the representative gene
 
Code:
click to view

◆ new()

public Bio::EnsEMBL::AltAlleleGroup Bio::EnsEMBL::AltAlleleGroup::new ( )
  Arg [-MEMBERS]: A list reference of [gene_id,type_flags]
                : gene_id is a dbID for Gene (consistent only within one release)
                : type_flags is a hash ref of attributes for this member
  Example    :
-MEMBERS => [ [1,{$type} ], [2,{$other_type}],[3,{$type}],
);
  Description: Creates a new alt-allele group object
  Returntype : Bio::EnsEMBL::AltAlleleGroup
  Exceptions : none
  Caller     : general
 
Code:
click to view

◆ remove_all_members()

public Bio::EnsEMBL::AltAlleleGroup::remove_all_members ( )
  Description : Remove members from this object, but NOT the database. See
                AltAlleleGroupAdaptor->remove() to remove the group from the
                database
 
Code:
click to view

◆ remove_attribs()

public Bio::EnsEMBL::AltAlleleGroup::remove_attribs ( )
  Arg [1]     : Int gene id to retrieve attributes against
  Arg [2]     : ArrayRef/HashRef/Scalar The attribute you wish to remove
  Description : Removes the given type from this group against the specified
                gene identifier
  Example     :
$aag->remove_attribs(10, 'IS_VALID_ALTERNATE');
$aag->remove_attribs(10, [ 'IS_VALID_ALTERNATE' ]);
$aag->remove_attribs(10, {IS_VALID_ALTERNATE => 1});
\
Code:
click to view

◆ remove_member()

public Bio::EnsEMBL::AltAlleleGroup::remove_member ( )
  Arg [1]     : Int gene id to retrieve attributes against
  Arg [2]     : ArrayRef/HashRef/Scalar The attribute you wish to remove
  Description : Removes the given member from this group. Any changes
                must be persisted back to the database via update() or
                store() methods in Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor.
  Example     :
$aag->remove_member(10);
\
Code:
click to view

◆ rep_Gene_id()

public Int Bio::EnsEMBL::AltAlleleGroup::rep_Gene_id ( )
  Arg[1]      : Optional - set a new representative Gene id for the group
  Description : Reports or sets the representative Gene for this AltAlleleGroup
                If you wish to remove the representative status of all genes without
                setting a new one, see unset_rep_Gene_id
  Returntype  : Integer or undef if none set
 
Code:
click to view

◆ set_attribs()

public Bio::EnsEMBL::AltAlleleGroup::set_attribs ( )
  Arg [1]     : Int gene id to set attributes against
  Arg [2]     : ArrayRef/HashRef/Scalar The attribute you wish to record
  Description : Adds the given type to the specified gene id in this group. You
                can specify the type using an ArrayRef, HashRef or a single scalar
  Example     :
$aag->attribs(10, 'IS_VALID_ALTERNATE');
$aag->attribs(10, [ 'IS_VALID_ALTERNATE' ]);
$aag->attribs(10, {IS_VALID_ALTERNATE => 1});
\
Code:
click to view

◆ size()

public Int Bio::EnsEMBL::AltAlleleGroup::size ( )
  Description : Returns the current size of this group in members
  Returntype  : Int the size of the current alt allele group
 
Code:
click to view

◆ unset_rep_Gene_id()

public Bio::EnsEMBL::AltAlleleGroup::unset_rep_Gene_id ( )
  Description : Removes the representative Gene flag from this AltAlleleGroup.
                This action is not possible through rep_Gene_id due to
                validation of inputs.
 
Code:
click to view

The documentation for this class was generated from the following file:
Bio::EnsEMBL::AltAlleleGroup::attribs
public HashRef attribs()
map
public map()
Bio::EnsEMBL::AltAlleleGroup::set_attribs
public set_attribs()
Bio::EnsEMBL::AltAlleleGroup::get_all_Genes
public ArrayRef get_all_Genes()
Bio::EnsEMBL::AltAlleleGroup
Definition: AltAlleleGroup.pm:67
Bio::EnsEMBL::AltAlleleGroup::get_all_Genes_types
public ArrayRef get_all_Genes_types()
Bio::EnsEMBL::Registry
Definition: Registry.pm:113
Bio::EnsEMBL::AltAlleleGroup::get_all_members_with_type
public get_all_members_with_type()
Bio::EnsEMBL::Registry::get_DBAdaptor
public DBAdaptor get_DBAdaptor()
Bio::EnsEMBL::DBSQL::BaseAdaptor::db
public Bio::EnsEMBL::DBSQL::DBAdaptor db()
Bio::EnsEMBL::AltAlleleGroup::remove_member
public remove_member()
Bio::EnsEMBL::AltAlleleGroup::rep_Gene_id
public Int rep_Gene_id()
Bio::EnsEMBL::AltAlleleGroup::get_all_Gene_ids
public ArrayRef get_all_Gene_ids()
Bio::EnsEMBL::AltAlleleGroup::size
public Int size()
Bio::EnsEMBL::AltAlleleGroup::unset_rep_Gene_id
public unset_rep_Gene_id()
Bio::EnsEMBL::AltAlleleGroup::get_representative_Gene
public Bio::EnsEMBL::Gene get_representative_Gene()
Bio::EnsEMBL::AltAlleleGroup::remove_attribs
public remove_attribs()
Bio::EnsEMBL::AltAlleleGroup::remove_all_members
public remove_all_members()
Bio::EnsEMBL::AltAlleleGroup::new
public Bio::EnsEMBL::AltAlleleGroup new()
Bio::EnsEMBL::AltAlleleGroup::get_all_members
public ArrayRef get_all_members()
Bio::EnsEMBL::AltAlleleGroup::add_member
public add_member()
Bio::EnsEMBL::AltAlleleGroup::contains_member
public Boolean contains_member()
Bio::EnsEMBL::Storable::adaptor
public Bio::EnsEMBL::DBSQL::BaseAdaptor adaptor()
Bio::EnsEMBL::DBSQL::AltAlleleGroupAdaptor
Definition: AltAlleleGroupAdaptor.pm:36