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

List of all members.


Class Summary

Description

 

Synopsis

Description

Abstract superclass to encapsulate the process of storing and manipulating a
nested-set representation tree.  Also implements a 'reference count' system 
based on the ObjectiveC retain/release design. 
Designed to be used as the Root class for all Compara 'proxy' classes 
(Member, GenomeDB, DnaFrag, NCBITaxon) to allow them to be made into sets and trees.
 

Definition at line 26 of file NestedSet.pm.

Available Methods

protected _add_neighbor_link_to_hash ()
protected _add_nodeI_to_node ()
protected _distance ()
protected _internal_newick_format ()
protected _internal_newick_format_ryo ()
protected _internal_nhx_format ()
protected _internal_print_tree ()
protected _internal_string_tree ()
protected _invert_tree_above ()
protected void _load_tags ()
protected _parent_id ()
protected _recursive_get_all_leaves ()
protected Listref _recursive_get_all_sorted_leaves ()
protected _root_id ()
protected _set_parent_link ()
protected _unlink_node_in_hash ()
protected _walk_graph_until ()
public Subclass adaptor ()
public Undef add_child ()
public Boolean add_tag ()
public all_links_in_graph ()
public all_nodes_in_graph ()
public alloc ()
public void AUTOLOAD ()
public build_leftright_indexing ()
public cascade_unlink ()
public Array children ()
public
Bio::EnsEMBL::Compara::NestedSet 
copy ()
public copy_graph ()
public copy_shallow_links ()
public create_directed_link_to_node ()
public Compara::Graph::Link create_link_to_node ()
public dealloc ()
public delete_lineage ()
public delete_tag ()
public DESTROY ()
public Undef disavow_parent ()
public Float distance_to_ancestor ()
public Float distance_to_node ()
public Int distance_to_parent ()
public distance_to_root ()
public each_child ()
public equals ()
public extract_subtree_from_leaves ()
public
Bio::EnsEMBL::Compara::NestedSet 
find_first_shared_ancestor ()
public find_first_shared_ancestor_from_leaves ()
public find_leaf_by_name ()
public find_leaf_by_node_id ()
public find_node_by_name ()
public find_node_by_node_id ()
public Undef flatten_tree ()
public Listref get_all_adjacent_subtrees ()
public Listref get_all_ancestors ()
public Reference get_all_leaves ()
public get_all_leaves_indexed ()
public Listref get_all_nodes ()
public Listref get_all_nodes_by_tag_value ()
public Listref get_all_sorted_leaves ()
public Listref get_all_subnodes ()
public Array get_all_tags ()
public ArrayRef get_all_values_for_tag ()
public get_child_count ()
public Scalar get_tagvalue ()
public Hashref get_tagvalue_hash ()
public get_TreeI ()
public Scalar get_value_for_tag ()
public has_ancestor ()
public has_child ()
public has_neighbor ()
public has_parent ()
public Boolean has_tag ()
public init ()
public is_leaf ()
public is_member_of ()
public is_subset_of ()
public left_index ()
public like ()
public link_count ()
public link_for_neighbor ()
public Array links ()
public load_children_if_needed ()
public Int max_depth ()
public Int max_distance ()
public merge_children ()
public merge_node_via_shared_ancestor ()
public minimize_node ()
public
Bio::EnsEMBL::Compara::NestedSet 
minimize_tree ()
public name ()
public neighbors ()
public new ()
public new_from_newick ()
public new_from_TreeI ()
public String newick_format ()
public Undef newick_simple_format ()
public nhx_format ()
public no_autoload_children ()
public Int node_id ()
public Int num_leaves ()
public obj_id ()
public Undef parent ()
public parent_link ()
public print_links ()
public print_node ()
public Undef print_tree ()
public Undef re_root ()
public refcount ()
public release ()
public release_children ()
public Undef release_tree ()
public
Bio::EnsEMBL::Compara::NestedSet 
remove_nodes ()
public retain ()
public right_index ()
public Undef root ()
public scale ()
public scale_max_to ()
public Array sorted_children ()
public store ()
public store_tag ()
public string_node ()
public string_tree ()
public subroot ()
public unlink_all ()
public Undef unlink_neighbor ()

Method Documentation

protected Bio::EnsEMBL::Compara::Graph::Node::_add_neighbor_link_to_hash ( ) [inherited]

Undocumented method

protected Bio::EnsEMBL::Compara::NestedSet::_add_nodeI_to_node ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_distance ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_internal_newick_format ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_internal_newick_format_ryo ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_internal_nhx_format ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_internal_print_tree ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_internal_string_tree ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_invert_tree_above ( )

Undocumented method

Code:
click to view
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
protected Bio::EnsEMBL::Compara::NestedSet::_parent_id ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_recursive_get_all_leaves ( )

Undocumented method

Code:
click to view
protected Listref Bio::EnsEMBL::Compara::NestedSet::_recursive_get_all_sorted_leaves ( )
  Arg [1]     : hashref $score_by_node
  Example     : my $sorted_leaves = $object->_recursive_get_all_sorted_leaves($score_by_node);
  Description : Recursive code for the get_all_sorted_leaves() method
  Returntype  : listref of Bio::EnsEMBL::Compara::NestedSet (sorted leaves)
  Exceptions  : none
  Caller      : private
  Status      : Stable
 
Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_root_id ( )

Undocumented method

Code:
click to view
protected Bio::EnsEMBL::Compara::NestedSet::_set_parent_link ( )

Undocumented method

protected Bio::EnsEMBL::Compara::Graph::Node::_unlink_node_in_hash ( ) [inherited]

Undocumented method

protected Bio::EnsEMBL::Compara::Graph::Node::_walk_graph_until ( ) [inherited]

Undocumented method

Code:
click to view
public Subclass Bio::EnsEMBL::Compara::Graph::CGObject::adaptor ( ) [inherited]
  Arg [1]    : (opt.) subcalss of Bio::EnsEMBL::DBSQL::BaseAdaptor
  Example    : my $object_adaptor = $object->adaptor();
  Example    : $object->adaptor($object_adaptor);
  Description: Getter/Setter for the adaptor this object uses for database
               interaction.
  Returntype : subclass of Bio::EnsEMBL::DBSQL::BaseAdaptor
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::SpeciesSet.

public Undef Bio::EnsEMBL::Compara::NestedSet::add_child ( )
  Overview   : attaches child nestedset node to this nested set
  Arg [1]    : Bio::EnsEMBL::Compara::NestedSet $child
  Arg [2]    : (opt.) distance between this node and child
  Example    : $self->add_child($child);
  Returntype : undef
  Exceptions : if child is undef or not a NestedSet subclass
  Caller     : general
 
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 Bio::EnsEMBL::Compara::Graph::Node::all_links_in_graph ( ) [inherited]

Undocumented method

public Bio::EnsEMBL::Compara::Graph::Node::all_nodes_in_graph ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::alloc ( ) [inherited]

Undocumented method

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::NestedSet::build_leftright_indexing ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::cascade_unlink ( ) [inherited]
  Overview   : release all neighbors and clear arrays and hashes
               will cause potential deletion of neighbors if refcount reaches Zero.
  Example    : $self->cascade_unlink
  Returntype : $self
  Exceptions : none
  Caller     : general
 
public Array Bio::EnsEMBL::Compara::NestedSet::children ( )
  Overview   : returns a list of NestedSet nodes directly under this parent node
  Example    : my @children = @{$object->children()};
  Returntype : array reference of Bio::EnsEMBL::Compara::NestedSet objects (could be empty)
  Exceptions : none
  Caller     : general
  Algorithm  : new algorithm for fetching children:
                for each link connected to this NestedsSet node, a child is defined if
                  old: the link is not my parent_link
                  new: the link's neighbors' parent_link is the link
               This allows one (with a carefully coded algorithm) to overlay a tree on top
               of a fully connected graph and use the parent/children methods of NestedSet
               to walk the 'tree' substructure of the graph.  
               Trees that are really just trees are still trees.
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet Bio::EnsEMBL::Compara::NestedSet::copy ( )
  Overview   : creates copy of tree starting at this node going down
  Example    : my $clone = $self->copy;
  Returntype : Bio::EnsEMBL::Compara::NestedSet
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeMember, Bio::EnsEMBL::Compara::GenomicAlignTree, and Bio::EnsEMBL::Compara::NCBITaxon.

public Bio::EnsEMBL::Compara::Graph::Node::copy_graph ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::copy_shallow_links ( ) [inherited]

Undocumented method

public Bio::EnsEMBL::Compara::Graph::Node::create_directed_link_to_node ( ) [inherited]

Undocumented method

public Compara::Graph::Link Bio::EnsEMBL::Compara::Graph::Node::create_link_to_node ( ) [inherited]
  Overview   : attaches neighbor Graph::Node to this nested set
  Arg [1]    : Bio::EnsEMBL::Compara::Graph::Node $node
  Arg [2]    : (opt.) <float> distance to node
  Example    : $self->add_child($node);
  Returntype : Compara::Graph::Link object
  Exceptions : if neighbor is undef or not a NestedSet subclass
  Caller     : general
 
public Bio::EnsEMBL::Compara::NestedSet::dealloc ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Bio::EnsEMBL::Compara::NestedSet::delete_lineage ( )
  Arg [1]     : Bio::EnsEMBL::Compara::NestedSet $node
  Example     : $tree->delete_lineage($node);
  Description : Removes $node from tree. Nodes should be in the tree.
  Returntype  : 
  Exceptions  :
  Caller      : general
  Status      : At risk (behaviour on exceptions could change)
 
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 Bio::EnsEMBL::Compara::Graph::CGObject::DESTROY ( ) [inherited]

Undocumented method

Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::disavow_parent ( )
  Overview   : unlink and release self from its parent
               might cause self to delete if refcount reaches Zero.
  Example    : $self->disavow_parent
  Returntype : undef
  Caller     : general
 
Code:
click to view
public Float Bio::EnsEMBL::Compara::NestedSet::distance_to_ancestor ( )
  Arg [1]     : Bio::EnsEMBL::Compara::NestedSet $ancestor
  Example     : my $distance = $this_node->distance_to_ancestor($ancestor);
  Description : Calculates the distance in the tree between this node and
                its ancestor $ancestor
  Returntype  : float
  Exceptions  : throws if $ancestor is not an ancestor of this node.
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Float Bio::EnsEMBL::Compara::NestedSet::distance_to_node ( )
  Arg [1]     : Bio::EnsEMBL::Compara::NestedSet $node
  Example     : my $distance = $this_node->distance_to_node($other_node);
  Description : Calculates the distance in the tree between these
                two nodes.
  Returntype  : float
  Exceptions  : returns undef if no ancestor can be found, no distances are
                defined in the tree, etc.
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::NestedSet::distance_to_parent ( )
  Arg [1]    : (opt.) <int or double> distance
  Example    : my $dist = $object->distance_to_parent();
  Example    : $object->distance_to_parent(1.618);
  Description: Getter/Setter for the distance between this child and its parent
  Returntype : integer node_id
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::distance_to_root ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::each_child ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::equals ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::extract_subtree_from_leaves ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet Bio::EnsEMBL::Compara::NestedSet::find_first_shared_ancestor ( )
  Arg [1]     : Bio::EnsEMBL::Compara::NestedSet $node
  Example     : my $ancestor = $this_node->find_first_shared_ancestor($other_node);
  Description : Gets the first common ancestor between this node and the other one.
  Returntype  : Bio::EnsEMBL::Compara::NestedSet object
  Exceptions  :
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::find_first_shared_ancestor_from_leaves ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::find_leaf_by_name ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::find_leaf_by_node_id ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::find_node_by_name ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Bio::EnsEMBL::Compara::NestedSet::find_node_by_node_id ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Undef Bio::EnsEMBL::Compara::NestedSet::flatten_tree ( )
  Overview   : Removes all internal nodes and attaches leaves to the tree root, creating
               a "flattened" star tree structure.
  Example    : $node->flatten_tree();
  Returntype : undef or Bio::EnsEMBL::Compara::NestedSet
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_adjacent_subtrees ( )
  Arg 1       : 
  Example     : my @subtrees = @{$node->get_all_adjacent_subtrees};
  Description : Returns subtree 'root' nodes where the subtree is adjacent
                to this node. Used e.g. by the web code for the 'collapse 
                other nodes' action 
  ReturnType  : listref of Bio::EnsEMBL::Compara::NestedSet objects
  Exceptions  : none
  Caller      : EnsEMBL::Web::Component::Gene::ComparaTree
  Status      :
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_ancestors ( )
  Arg 1       : 
  Example     : my @ancestors = @{$node->get_all_ancestors};
  Description : Returns all ancestor nodes for a given node
  ReturnType  : listref of Bio::EnsEMBL::Compara::NestedSet objects
  Exceptions  : none
  Caller      : general
  Status      :
 
Code:
click to view
public Reference Bio::EnsEMBL::Compara::NestedSet::get_all_leaves ( )
 Title   : get_all_leaves
 Usage   : my @leaves = @{$tree->get_all_leaves};
 Function: searching from the given starting node, searches and creates list
           of all leaves in this subtree and returns by reference
 Example :
 Returns : reference to list of NestedSet objects (all leaves)
 Args    : none
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GenomicAlignTree.

public Bio::EnsEMBL::Compara::NestedSet::get_all_leaves_indexed ( )

Undocumented method

Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_nodes ( )
  Arg 1       : hashref $node_hash [used for recursivity, do not use it!]
  Example     : my $all_nodes = $root->get_all_nodes();
  Description : Returns this and all underlying sub nodes
  ReturnType  : listref of Bio::EnsEMBL::Compara::NestedSet objects
  Exceptions  : none
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_nodes_by_tag_value ( )
  Arg 1       : tag_name
  Arg 2       : tag_value (optional)
  Example     : my $all_nodes = $root->get_all_nodes_by_tagvalue('taxon_name'=>'Mamalia');
  Description : Returns all underlying nodes that have a tag of the given name, and optionally a value of the given value.
  ReturnType  : listref of Bio::EnsEMBL::Compara::NestedSet objects
  Exceptions  : none
  Caller      : general
  Status      :
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_sorted_leaves ( )
  Arg [1]     : Bio::EnsEMBL::Compara::NestedSet $top_leaf
  Arg [...]   : (optional) Bio::EnsEMBL::Compara::NestedSet $secondary_priority_leaf
  Example     : my $sorted_leaves = $object->get_all_sorted_leaves($human_leaf);
  Example     : my $sorted_leaves = $object->get_all_sorted_leaves($human_leaf, $mouse_leaf);
  Description : Sorts the tree such as $top_leaf is the first leave and returns
                all the other leaves in the order defined by the tree.
                It is possible to define as many secondary top leaves as you require
                to sort other branches of the tree. The priority to sort the trees
                is defined by the order in which you specify the leaves.
  Returntype  : listref of Bio::EnsEMBL::Compara::NestedSet (all sorted leaves)
  Exceptions  : none
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Listref Bio::EnsEMBL::Compara::NestedSet::get_all_subnodes ( )
  Arg 1       : hashref $node_hash [used for recursivity, do not use it!]
  Example     : my $all_nodes = $root->get_all_nodes();
  Description : Returns all underlying sub nodes
  ReturnType  : listref of Bio::EnsEMBL::Compara::NestedSet objects
  Exceptions  : none
  Caller      : general
  Status      : Stable
 
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 Bio::EnsEMBL::Compara::NestedSet::get_child_count ( )

Undocumented method

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 Bio::EnsEMBL::Compara::NestedSet::get_TreeI ( )

Undocumented method

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 Bio::EnsEMBL::Compara::NestedSet::has_ancestor ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::has_child ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::has_neighbor ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::has_parent ( )

Undocumented method

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 Bio::EnsEMBL::Compara::NestedSet::init ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Bio::EnsEMBL::Compara::NestedSet::is_leaf ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Bio::EnsEMBL::Compara::NestedSet::is_member_of ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::is_subset_of ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::left_index ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::like ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::link_count ( ) [inherited]

Undocumented method

public Bio::EnsEMBL::Compara::Graph::Node::link_for_neighbor ( ) [inherited]

Undocumented method

public Array Bio::EnsEMBL::Compara::Graph::Node::links ( ) [inherited]
  Overview   : returns a list of Compara::Graph::Link connected to this node
  Example    : my @links = @{self->links()};
  Returntype : array reference of Bio::EnsEMBL::Compara::Graph::Link objects (could be empty)
  Exceptions : none
  Caller     : general
 
public Bio::EnsEMBL::Compara::NestedSet::load_children_if_needed ( )

Undocumented method

Code:
click to view
public Int Bio::EnsEMBL::Compara::NestedSet::max_depth ( )
 Title   : max_depth
 Args    : none
 Usage   : $tree_node->max_depth;
 Function: searching from the given starting node, calculates the maximum depth to a leaf
 Returns : int
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::NestedSet::max_distance ( )
 Title   : max_distance
 Args    : none
 Usage   : $tree_node->max_distance;
 Function: searching from the given starting node, calculates the maximum distance to a leaf
 Returns : int
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::merge_children ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::merge_node_via_shared_ancestor ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::minimize_node ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

public Bio::EnsEMBL::Compara::NestedSet Bio::EnsEMBL::Compara::NestedSet::minimize_tree ( )
  Arg [1]     : -none-
  Example     : $leaf->disavow_parent();
                $tree = $tree->minimize_tree();
  Description : Returns the tree after removing internal nodes that do not
                represent an multi- or bi-furcation anymore. This is typically
                required after disavowing a node. Please ensure you use the
                object returned by the method and not the original object
                anymore!
  Returntype  : Bio::EnsEMBL::Compara::NestedSet object
  Exceptions  :
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::name ( ) [inherited]

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeMember, and Bio::EnsEMBL::Compara::GenomicAlignTree.

public Bio::EnsEMBL::Compara::Graph::Node::neighbors ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::new ( ) [inherited]

Undocumented method

Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::Graph::Link, and Bio::EnsEMBL::Compara::SpeciesSet.

public Bio::EnsEMBL::Compara::NestedSet::new_from_newick ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::new_from_TreeI ( )

Undocumented method

Code:
click to view
public String Bio::EnsEMBL::Compara::NestedSet::newick_format ( )
  Arg [1]     : string $format_mode
  Example     : $this_node->newick_format("full");
  Description : Prints this tree in Newick format. Several modes are
                available: full, display_label_composite, simple, species,
                species_short_name, ncbi_taxon, ncbi_name, njtree and phylip
  Returntype  : string
  Exceptions  :
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::newick_simple_format ( )
  Arg [1]     : -none-
  Example     : $this_node->newick_simple_format();
  Description : Prints this tree in simple Newick format. This is an
                alias for $this_node->newick_format("simple");
  Returntype  : undef
  Exceptions  :
  Caller      : general
  Status      : Stable
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::nhx_format ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::no_autoload_children ( )

Undocumented method

Code:
click to view
public Int Bio::EnsEMBL::Compara::Graph::Node::node_id ( ) [inherited]
  Arg [1]    : (opt.) integer node_id
  Example    : my $nsetID = $object->node_id();
  Example    : $object->node_id(12);
  Description: Getter/Setter for the node_id of this object in the database
  Returntype : integer node_id
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Int Bio::EnsEMBL::Compara::NestedSet::num_leaves ( )
  Example     : my $num_leaves = $node->num_leaves
  Description : Returns the number of leaves underlying the node
  ReturnType  : integer
  Exceptions  : none
  Caller      : general
  Status      : At risk (relies on left and right indexes)
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::obj_id ( ) [inherited]
  Example    : my $nsetID = $object->obj_id();
  Description: returns the unique identifier of this object.  
  Returntype : <string> uuid
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::parent ( )
  Overview   : returns the parent NestedSet object for this node
  Example    : my $my_parent = $object->parent();
  Returntype : undef or Bio::EnsEMBL::Compara::NestedSet
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::parent_link ( )

Undocumented method

public Bio::EnsEMBL::Compara::Graph::Node::print_links ( ) [inherited]

Undocumented method

public Bio::EnsEMBL::Compara::NestedSet::print_node ( )

Undocumented method

Code:
click to view

Reimplemented from Bio::EnsEMBL::Compara::Graph::Node.

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeMember, and Bio::EnsEMBL::Compara::NCBITaxon.

public Undef Bio::EnsEMBL::Compara::NestedSet::print_tree ( )
  Arg [1]     : int $scale
  Example     : $this_node->print_tree(100);
  Description : Prints this tree in ASCII format. The scale is used to define
                the width of the tree in the output
  Returntype  : undef
  Exceptions  :
  Caller      : general
  Status      : At risk (as the output might change)
 
Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::re_root ( )
  Overview   : rearranges the tree structure so that the root is moved to 
               beetween this node and its parent.  If the old root was more than
	       bifurcated (2 children) a new node is created where it was to hold
	       the multiple children that arises from the re-rooting.  
	       The old root is returned.
  Example    : $node->re_root();
  Returntype : undef or Bio::EnsEMBL::Compara::NestedSet
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::refcount ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::release ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::release_children ( )
  Overview   : recursive releases all children
               will cause potential deletion of children if refcount reaches Zero.
  Example    : $self->release_children
  Returntype : $self
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::release_tree ( )
  Overview   : deletes and frees the memory used by this tree
               and all the underlying nodes.
  Example    : $self->release_tree;
  Returntype : undef
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeNode.

public Bio::EnsEMBL::Compara::NestedSet Bio::EnsEMBL::Compara::NestedSet::remove_nodes ( )
  Arg [1]     : arrayref Bio::EnsEMBL::Compara::NestedSet $nodes
  Example     : my $ret_tree = $tree->remove_nodes($nodes);
  Description : Returns the tree with removed nodes in list. Nodes should be in the tree.
  Returntype  : Bio::EnsEMBL::Compara::NestedSet object
  Exceptions  :
  Caller      : general
  Status      : At risk (behaviour on exceptions could change)
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::retain ( ) [inherited]

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::right_index ( )

Undocumented method

Code:
click to view
public Undef Bio::EnsEMBL::Compara::NestedSet::root ( )
  Overview   : returns the root NestedSet object for this node
               returns $self if node has no parent (this is the root)
  Example    : my $root = $object->root();
  Description: Returns the root of the tree for this node
               with links to all the intermediate nodes. Sister nodes
               are not included in the result.
  Returntype : undef or Bio::EnsEMBL::Compara::NestedSet
  Exceptions : none
  Caller     : general
 
Code:
click to view

Reimplemented in Bio::EnsEMBL::Compara::GeneTreeNode.

public Bio::EnsEMBL::Compara::NestedSet::scale ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::scale_max_to ( )

Undocumented method

Code:
click to view
public Array Bio::EnsEMBL::Compara::NestedSet::sorted_children ( )
  Overview   : returns a sorted list of NestedSet nodes directly under this parent node
               sort so that internal nodes<leaves and then on distance
  Example    : my @kids = @{$object->ordered_children()};
  Returntype : array reference of Bio::EnsEMBL::Compara::NestedSet objects (could be empty)
  Exceptions : none
  Caller     : general
 
Code:
click to view
public Bio::EnsEMBL::Compara::Graph::CGObject::store ( ) [inherited]

Undocumented method

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 Bio::EnsEMBL::Compara::NestedSet::string_node ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::string_tree ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::NestedSet::subroot ( )

Undocumented method

Code:
click to view
public Bio::EnsEMBL::Compara::Graph::Node::unlink_all ( ) [inherited]

Undocumented method

public Undef Bio::EnsEMBL::Compara::Graph::Node::unlink_neighbor ( ) [inherited]
  Overview   : unlink and release neighbor from self if its mine
               might cause neighbor to delete if refcount reaches Zero.
  Arg [1]    : $node Bio::EnsEMBL::Compara::Graph::Node instance
  Example    : $self->unlink_neighbor($node);
  Returntype : undef
  Caller     : general
 

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