NAME
Bio::Tree::AlleleNode - A Node with Alleles attached
SYNOPSIS
use Bio::Tree::AlleleNode;
DESCRIPTION
AlleleNodes are basic Bio::Tree::Nodes with the added ability to add Genotypes alleles as defined by the Bio::PopGen::IndividualI interface. Genotypes are defined by the Bio::PopGen::GenotypeI interface, you will probably want to use the Bio::PopGen::Genotype implementation.
This is implemented via containment to avoid multiple inheritance problems. Their is a Bio::PopGen::Individual object which handles the Bio::PopGen::IndividualI interface, and is accessible via the Bio::Tree::AlleleNode::individual method.
FEEDBACK
Mailing Lists
User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to the Bioperl mailing list. Your participation is much appreciated.
[email protected] - General discussionhttp://bioperl.org/wiki/Mailing_lists - About the mailing lists
Support
Please direct usage questions or support issues to the mailing list:
rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible.
Reporting Bugs
Report bugs to the Bioperl bug tracking system to help us keep track of the bugs and their resolution. Bug reports can be submitted via the web:
https://github.com/bioperl/bioperl-live/issues
AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org
APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _
HISTORY
This module was re-written to be a combination of Bio::PopGen::Individual and Bio::Tree::Node primarily for use in Bio::PopGen::Simulation::Coalescent simulations.
new
Title : newUsage : my $obj = Bio::Tree::AlleleNode->new();Function: Builds a new Bio::Tree::AlleleNode() objectReturns : an instance of Bio::Tree::AlleleNodeArgs : -unique_id => $id,-genotypes => \@genotypes-left => pointer to Left descendent (optional)-right => pointer to Right descenent (optional)-branch_length => branch length [integer] (optional)-bootstrap => value bootstrap value (string)-description => description of node-id => human readable (unique) id for nodeShould NOT contain the characters'();:'
individual
Title : individualUsage : $obj->individual($newval)Function: Get/Set Access to the underlying individual objectReturns : L<Bio::PopGen::Individual> objectArgs : on set, new value (L<Bio::PopGen::Individual>)
Bio::PopGen::Individual methods
Methods required by Bio::PopGen::IndividualI.
unique_id
Title : unique_idUsage : my $id = $individual->unique_idFunction: Unique IdentifierReturns : string representing unique identifierArgs : string
num_of_results
Title : num_of_resultsUsage : my $count = $person->num_results;Function: returns the count of the number of Results for a personReturns : integerArgs : none
add_Genotype
Title : add_GenotypeUsage : $individual->add_GenotypeFunction: add a genotype value, only a single genotypemay be associatedReturns : count of the number of genotypes associated with this individualArgs : @genotypes - Bio::PopGen::GenotypeI object(s) containingalleles plus a marker name
reset_Genotypes
Title : reset_GenotypesUsage : $individual->reset_Genotypes;Function: Reset the genotypes stored for this individualReturns : noneArgs : none
remove_Genotype
Title : remove_GenotypeUsage : $individual->remove_Genotype(@names)Function: Removes the genotypes for the requested markersReturns : noneArgs : Names of markers
get_Genotypes
Title : get_GenotypesUsage : my @genotypes = $ind->get_Genotypes(-marker => $markername);Function: Get the genotypes for an individual, based on a criteriaReturns : Array of genotypesArgs : either none (return all genotypes) or-marker => name of marker to return (exact match, case matters)
has_Marker
Title : has_MarkerUsage : if( $ind->has_Marker($name) ) {}Function: Boolean test to see if an Individual has a genotypefor a specific markerReturns : Boolean (true or false)Args : String representing a marker name
get_marker_names
Title : get_marker_namesUsage : my @names = $individual->get_marker_names;Function: Returns the list of known marker namesReturns : List of stringsArgs : none
Bio::Tree::Node methods
Methods inherited from Bio::Tree::Node.
add_Descendent
Title : add_DescendentUsage : $node->add_Descendent($node);Function: Adds a descendent to a nodeReturns : number of current descendents for this nodeArgs : Bio::Node::NodeIboolean flag, true if you want to ignore the fact that you areadding a second node with the same unique id (typically memorylocation reference in this implementation). default is false andwill throw an error if you try and overwrite an existing node.
each_Descendent
Title : each_Descendent($sortby)Usage : my @nodes = $node->each_Descendent;Function: all the descendents for this Node (but not their descendentsi.e. not a recursive fetchall)Returns : Array of Bio::Tree::NodeI objectsArgs : $sortby [optional] "height", "creation" or coderef to be usedto sort the order of children nodes.
remove_Descendent
Title : remove_DescendentUsage : $node->remove_Descedent($node_foo);Function: Removes a specific node from being a Descendent of this nodeReturns : nothingArgs : An array of Bio::Node::NodeI objects which have be previouslypassed to the add_Descendent call of this object.
remove_all_Descendents
Title : remove_all_DescendentsUsage : $node->remove_All_Descendents()Function: Cleanup the node's reference to descendents and resettheir ancestor pointers to undef, if you don't have a referenceto these objects after this call they will be cleaned up - soa get_nodes from the Tree object would be a safe thing to do firstReturns : nothingArgs : none
get_all_Descendents
Title : get_all_DescendentsUsage : my @nodes = $node->get_all_Descendents;Function: Recursively fetch all the nodes and their descendents*NOTE* This is different from each_DescendentReturns : Array or Bio::Tree::NodeI objectsArgs : none
ancestor
Title : ancestorUsage : $obj->ancestor($newval)Function: Set the AncestorReturns : value of ancestorArgs : newvalue (optional)
branch_length
Title : branch_lengthUsage : $obj->branch_length()Function: Get/Set the branch lengthReturns : value of branch_lengthArgs : newvalue (optional)
bootstrap
Title : bootstrapUsage : $obj->bootstrap($newval)Function: Get/Set the bootstrap valueReturns : value of bootstrapArgs : newvalue (optional)
description
Title : descriptionUsage : $obj->description($newval)Function: Get/Set the description stringReturns : value of descriptionArgs : newvalue (optional)
id
Title : idUsage : $obj->id($newval)Function: The human readable identifier for the nodeReturns : value of human readable idArgs : newvalue (optional)Note : id cannot contain the characters '();:'
"A name can be any string of printable characters except blanks, colons, semicolons, parentheses, and square brackets. Because you may want to include a blank in a name, it is assumed that an underscore character ("_") stands for a blank; any of these in a name will be converted to a blank when it is read in."
from <http://evolution.genetics.washington.edu/phylip/newicktree.html>
internal_id
Title : internal_idUsage : my $internalid = $node->internal_idFunction: Returns the internal unique id for this Node(a monotonically increasing number for this in-memory implementationbut could be a database determined unique id in otherimplementations)Returns : unique idArgs : none
Bio::Node::NodeI decorated interface implemented
The following methods are implemented by Bio::Node::NodeI decorated interface.
is_Leaf
Title : is_LeafUsage : if( $node->is_Leaf )Function: Get Leaf statusReturns : booleanArgs : none
to_string
Title : to_stringUsage : my $str = $node->to_string()Function: For debugging, provide a node as a stringReturns : stringArgs : none
height
Title : heightUsage : my $len = $node->heightFunction: Returns the height of the tree starting at thisnode. Height is the maximum branchlength.Returns : The longest length (weighting branches with branch_length) to a leafArgs : none
invalidate_height
Title : invalidate_heightUsage : private helper methodFunction: Invalidate our cached value of the node's height in the treeReturns : nothingArgs : none
add_tag_value
Title : add_tag_valueUsage : $node->add_tag_value($tag,$value)Function: Adds a tag value to a nodeReturns : number of values stored for this tagArgs : $tag - tag name$value - value to store for the tag
remove_tag
Title : remove_tagUsage : $node->remove_tag($tag)Function: Remove the tag and all values for this tagReturns : boolean representing success (0 if tag does not exist)Args : $tag - tagname to remove
remove_all_tags
Title : remove_all_tagsUsage : $node->remove_all_tags()Function: Removes all tagsReturns : NoneArgs : None
get_all_tags
Title : get_all_tagsUsage : my @tags = $node->get_all_tags()Function: Gets all the tag names for this NodeReturns : Array of tagnamesArgs : None
get_tag_values
Title : get_tag_valuesUsage : my @values = $node->get_tag_value($tag)Function: Gets the values for given tag ($tag)Returns : Array of values or empty list if tag does not existArgs : $tag - tag name
has_tag
Title : has_tagUsage : $node->has_tag($tag)Function: Boolean test if tag exists in the NodeReturns : BooleanArgs : $tag - tagname