Archive Ensembl HomeArchive Ensembl Home
Bio::EnsEMBL::Compara::GeneTree Class Reference
Inheritance diagram for Bio::EnsEMBL::Compara::GeneTree:

List of all members.


Class Summary

Description

Class to represent a gene tree object. Contains a link to
the root of the tree, as long as general tree properties.
 

Definition at line 10 of file GeneTree.pm.

Available Methods

protected void _load_tags ()
public
Bio::EnsEMBL::Compara::DBSQL::GeneTreeAdaptor 
adaptor ()
public Boolean add_tag ()
public void AUTOLOAD ()
public clusterset_id ()
public delete_tag ()
public void DESTROY ()
public Array get_all_tags ()
public ArrayRef get_all_values_for_tag ()
public Scalar get_tagvalue ()
public Hashref get_tagvalue_hash ()
public Scalar get_value_for_tag ()
public Boolean has_tag ()
public Int method_link_species_set_id ()
public
Bio::EnsEMBL::Compara::GeneTree 
new ()
public
Bio::EnsEMBL::Compara::GeneTreeNode 
root ()
public Int root_id ()
public String stable_id ()
public store_tag ()
public String tree_type ()
public Numeric version ()

Method Documentation

protected void Bio::EnsEMBL::Compara::Taggable::_load_tags ( ) [inherited]
  Description: loads all the tags (from the database) if possible.
               Otherwise, an empty hash is created
  Example    : $ns_node->_load_tags();
  Returntype : none
  Exceptions : none
  Caller     : internal
 
Code:
click to view
public Bio::EnsEMBL::Compara::DBSQL::GeneTreeAdaptor Bio::EnsEMBL::Compara::GeneTree::adaptor ( )
  Description : Getter/Setter for the DB adaptor that is used for database
                queries. This field is automatically populated when the
                tree is queried.
  Returntype  : Bio::EnsEMBL::Compara::DBSQL::GeneTreeAdaptor
  Exceptions  : None
  Example     : $tree->adaptor($genetree_adaptor);
  Status      : Internal
 
Code:
click to view
public Boolean Bio::EnsEMBL::Compara::Taggable::add_tag ( ) [inherited]
  Description: adds metadata tags to a node.  Both tag and value are added
               as metdata with the added ability to retreive the value given
               the tag (like a perl hash). In case of one to many relation i.e.
               one tag and different values associated with it, the values are
               returned in a array reference.
  Arg [1]    : <string> tag
  Arg [2]    : <string> value
  Arg [3]    : (optional) <int> allows overloading the tag with different values
               default is 0 (no overloading allowed, one tag points to one value)
  Example    : $ns_node->add_tag('scientific name', 'Mammalia');
               $ns_node->add_tag('lost_taxon_id', 9593, 1);
  Returntype : Boolean indicating if the tag could be added
  Exceptions : none
  Caller     : general
 
Code:
click to view
public void Bio::EnsEMBL::Compara::Taggable::AUTOLOAD ( ) [inherited]
  Description: matches the get_value_for_XXX calls to get_value_for_tag('XXX') and other calls
  Returntype : none
  Exceptions : none
  Caller     : system
 
Code:
click to view
public Bio::EnsEMBL::Compara::GeneTree::clusterset_id ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Taggable::delete_tag ( ) [inherited]
  Description: removes a tag from the metadata. If the value is provided, it tries
               to delete only it (if present). Otherwise, it just clears the tag,
               whatever value it was containing
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <string> value
  Example    : $ns_node->remove_tag('scientific name', 'Mammalia');
               $ns_node->remove_tag('lost_taxon_id', 9593);
  Returntype : 0 if the tag couldn't be removed,
               1 if it is only in the PERL object,
               2 if it is also stored in the database
  Exceptions : none
  Caller     : general
 
Code:
click to view
public void Bio::EnsEMBL::Compara::GeneTree::DESTROY ( )
  Description : Deletes the reference to the root node and breaks
                the circular reference.
  Returntype  : None
  Exceptions  : None
  Status      : System
 
Code:
click to view
public Array Bio::EnsEMBL::Compara::Taggable::get_all_tags ( ) [inherited]
  Description: returns an array of all the available tags
  Example    : $ns_node->get_all_tags();
  Returntype : Array
  Exceptions : none
  Caller     : general
 
Code:
click to view
public ArrayRef Bio::EnsEMBL::Compara::Taggable::get_all_values_for_tag ( ) [inherited]
  Description: returns all the values of the tag, or $default (undef
               if not provided) if the tag doesn't exist. In case of
               a single value, it is wrapped with an array
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : ArrayRef
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Scalar Bio::EnsEMBL::Compara::Taggable::get_tagvalue ( ) [inherited]
  Description: returns the value(s) of the tag, or $default (undef
               if not provided) if the tag doesn't exist.
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : Scalar or ArrayRef
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Hashref Bio::EnsEMBL::Compara::Taggable::get_tagvalue_hash ( ) [inherited]
  Description: returns the underlying hash that contains all
               the tags
  Example    : $ns_node->get_tagvalue_hash();
  Returntype : Hashref
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Scalar Bio::EnsEMBL::Compara::Taggable::get_value_for_tag ( ) [inherited]
  Description: returns the value of the tag, or $default (undef
               if not provided) if the tag doesn't exist. In case
               of multiple values, the first one is returned.
  Arg [1]    : <string> tag
  Arg [2]    : (optional) <scalar> default
  Example    : $ns_node->get_tagvalue('scientific name');
  Returntype : Scalar
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Boolean Bio::EnsEMBL::Compara::Taggable::has_tag ( ) [inherited]
  Description: indicates whether the tag exists in the metadata
  Arg [1]    : <string> tag
  Example    : $ns_node->has_tag('scientific name');
  Returntype : Boolean
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::GeneTree::method_link_species_set_id ( )
  Description : Getter/Setter for the method_link_species_set_id field.
                This field should be a valid dbID of a MethodLinkSpeciesSet
                object.
  Returntype  : Integer
  Exceptions  : None
  Example     : $tree->method_link_species_set_id($mlss_id);
  Status      : Stable
 
public Bio::EnsEMBL::Compara::GeneTree Bio::EnsEMBL::Compara::GeneTree::new ( )
  Description : Creates a new GeneTree object. 
  Returntype  : Bio::EnsEMBL::Compara::GeneTree
  Exceptions  : None
  Example     : my $w = Bio::EnsEMBL::Compara::GeneTree->new();
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::GeneTreeNode Bio::EnsEMBL::Compara::GeneTree::root ( )
  Description : Getter/Setter for the root node of the tree. This is
                internally synchronised with the root_id() method and
                vice-versa to ensure consistency.
  Returntype  : Bio::EnsEMBL::Compara::GeneTreeNode
  Exceptions  : None
  Example     : my $root_node = $tree->root();
  Status      : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::GeneTree::root_id ( )
  Description : Getter/Setter for the root_id of the root node of the tree.
                This is internally synchronised with the root() method and
                vice-versa to ensure consistency.
  Returntype  : Integer
  Exceptions  : None
  Example     : my $root_node_id = $tree->root_id();
  Status      : Stable
 
Code:
click to view
public String Bio::EnsEMBL::Compara::GeneTree::stable_id ( )
  Description : Getter/Setter for the stable_id field. Currently, only the
                'proteintree' have a stable id. This field should be empty
                for other tree types.
  Returntype  : String
  Exceptions  : None
  Example     : my $stable_id = $tree->stable_id();
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::Taggable::store_tag ( ) [inherited]
  Description: calls add_tag and then stores the tag in the database. Has the
               exact same arguments as add_tag
  Arg [1]    : <string> tag
  Arg [2]    : <string> value
  Arg [3]    : (optional) <int> allows overloading the tag with different values
               default is 0 (no overloading allowed, one tag points to one value)
  Example    : $ns_node->store_tag('scientific name', 'Mammalia');
               $ns_node->store_tag('lost_taxon_id', 9593, 1);
  Returntype : 0 if the tag couldn't be stored,
               1 if it is only in the PERL object,
               2 if it is also stored in the database
  Exceptions : none
  Caller     : general
 
Code:
click to view
public String Bio::EnsEMBL::Compara::GeneTree::tree_type ( )
  Description : Getter/Setter for the tree_type field. This field can
                currently be 'nctree', 'proteintree', 'superproteintree'
                or 'clusterset'
  Returntype  : String
  Exceptions  : None
  Example     : my $type = $tree->tree_type();
  Status      : Stable
 
Code:
click to view
public Numeric Bio::EnsEMBL::Compara::GeneTree::version ( )
  Description : Getter/Setter for the version field. It contains the numeric
                version of a tree which keeps an identical stable id (when
                members are removed / added)
  Returntype  : Numeric
  Exceptions  : None
  Example     : my $version = $tree->version();
  Status      : Stable
 
Code:
click to view

The documentation for this class was generated from the following file: