Bio::Taxonomy::Node(3)

NAME
Bio::Taxonomy::Node - A node in a represented taxonomy

SYNOPSIS
  use Bio::Taxonomy::Node;
  # typically you will get a Node from a Bio::DB::Taxonomy object
  # but here is how you initialize one
  my $node = new Bio::Taxonomy::Node(-name      => $name,
                                     -object_id => $oid,
                                     -parent_id => $pid,
                                     -rank   => $rank,
                                     -division  => $div,
                                     -dbh       => $dbh);

  my $dbh = new Bio::DB::Taxonomy(-source   => 'flatfile',
                                  -directory=> '/tmp',
                                  -nodesfile=> '/path/to/nodes.dmp',
                                  -namesfile=> '/path/to/names.dmp');
  my $hum_node = $dbh->get_Taxonomy_Node(-name => 'Homo sapiens');
  my $hum_node2= $dbh->get_Taxonomy_Node(-taxonid => '9606');

  print "rank is ", $hum_node->rank, "\n";
  print "classification is ", join(" ", $hum_node->classification),"\n";
  print "division is ", $node->division, "\n";

DESCRIPTION
This is the next generation (for Bioperl) of representing Taxonomy information. Previously all information was managed by a single object called Bio::Species. This new implementation allows representation of the intermediete nodes not just the species nodes and can relate their connections.

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.

  bioperl-l@bioperl.org              - General discussion
  http://bioperl.org/MailList.shtml  - About the mailing lists

  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:

  http://bugzilla.bioperl.org/

AUTHOR - Jason Stajich
Email jason-at-bioperl-dot-org

CONTRIBUTORS
Juguang Xiao, juguang@tll.org.sg

APPENDIX
The rest of the documentation details each of the object methods. Internal methods are usually preceded with a _

  new
 Title   : new
 Usage   : my $obj = new Bio::Taxonomy::Node();
 Function: Builds a new Bio::Taxonomy::Node object
 Returns : an instance of Bio::Taxonomy::Node
 Args    : -dbh       => a reference to a Bio::DB::Taxonomy object
           -name      => a string representing the node name
           -object_id => unique identifier - typically NCBI Taxid
           -parent_id => parent id (unique identifier for parent)
           -rank      => node rank (one of 'species', 'genus', etc)
           -division  => 'primates', 'rodents', or 'inv', etc
           -factory   => Bio::Taxonomy::FactoryI object for creating new nodes
           -classification => Arrayref of full lineage classification
           -ncbi_taxid  => alias for -object_id, only use one of these
           -common_name => genbank common name for an organism
           -organelle   => organelle type where appropriate
           -sub_species => if this is a subspecies, provide that as well,
                           most relavent for virii and others
           -variant     => provide variant info
           -genetic_code=> genetic code table number
           -mito_genetic_code => mitochondrial genetic code table number
           -create_date       => date created (where available)
           -update_date       => date last updated
           -pub_date          => date published

Bio::IdentifiableI interface
Also see Bio::IdentifiableI

  version
 Title   : version
 Usage   : $obj->version($newval)
 Function:
 Example :
 Returns : value of version (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  authority
 Title   : authority
 Usage   : $obj->authority($newval)
 Function:
 Example :
 Returns : value of authority (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  namespace
 Title   : namespace
 Usage   : $obj->namespace($newval)
 Function:
 Example :
 Returns : value of namespace (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

Bio::Taxonomy::Node implementation

  db_handle
 Title   : db_handle
 Usage   : $obj->db_handle($newval)
 Function: Get/Set Bio::DB::Taxonomy Handle
 Returns : value of db_handle (a scalar) (Bio::DB::Taxonomy object)
 Args    : on set, new value (a scalar or undef, optional) Bio::DB::Taxonomy object

Also see Bio::DB::Taxonomy

  factory
  Title:    factory
  Usage:    $factory->factory($newval);
  Function: Get/Set Bio::Taxonomy::FactoryI implementation
  Returns:  Bio:;Taxonomy::FactoryI
  Args:     Bio::Taxonomy::FactoryI

Also see Bio::Taxonomy::FactoryI

  rank
 Title   : rank
 Usage   : $obj->rank($newval)
 Function: Get/set rank of this Node, 'species', 'genus', 'order', etc...
 Returns : value of rank (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  object_id
 Title   : object_id
 Usage   : $obj->object_id($newval)
 Function: Get/Set object id (NCBI Taxonomy ID in most cases)
 Returns : value of object_id (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  parent_id
 Title   : parent_id
 Usage   : $obj->parent_id($newval)
 Function: Get/Set parent ID
 Returns : value of parent_id (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  genetic_code
 Title   : genetic_code
 Usage   : $obj->genetic_code($newval)
 Function: Get/set genetic code table
 Returns : value of genetic_code (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  mitochondrial_genetic_code
 Title   : mitochondrial_genetic_code
 Usage   : $obj->mitochondrial_genetic_code($newval)
 Function: Get/set mitochondrial genetic code table
 Returns : value of mitochondrial_genetic_code (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  create_date
 Title   : create_date
 Usage   : $obj->create_date($newval)
 Function: Get/Set Date this node was created (in the database)
 Returns : value of create_date (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  update_date
 Title   : update_date
 Usage   : $obj->update_date($newval)
 Function: Get/Set Date this node was updated (in the database)
 Returns : value of update_date (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  pub_date
 Title   : pub_date
 Usage   : $obj->pub_date($newval)
 Function: Get/Set Date this node was pubd (in the database)
 Returns : value of pub_date (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  get_Parent_Node
 Title   : get_Parent_Node
 Usage   : my $parentnode = $node->get_Parent_Node()
 Function: Retrieve the full Parent node from the database
 Returns : Bio::Taxonomy::Node
 Args    : none

  get_Children_Nodes
 Title   : get_Children_Nodes
 Usage   : my @nodes = $node->get_Children_Nodes();
 Function: Get the children of a node as L<Bio::Taxonomy::Node> objects
 Returns : Array of L<Bio::Taxonomy::Node> objects
 Args    : none

  node_name
 Title   : node_name
 Usage   : $obj->node_name($newval)
 Function:
 Example :
 Returns : value of node_name (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  classification
 Title   : classification
 Usage   : $self->classification(@class_array);
           @classification = $self->classification();
 Function: Fills Returns the classification list in
           the object.  The array provided must be in
           the order SPECIES, GENUS ---> KINGDOM.
           Checks are made that species is in lower case,
           and all other elements are in title case.
 Returns : Classification array
 Args    : [optional] array of vals to set classification to

  division
 Title   : division
 Usage   : $obj->division($newval)
 Function:
 Example :
 Returns : value of division (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  show_all
 Title   : show_all
 Usage   : $obj->show_all($newval)
 Function: Boolean flag whether or not we should show all intermediete
           nodes that do not have actual ranks.
 Returns : value of show_all (a scalar)
 Args    : on set, new value (a scalar or undef, optional)

  name
  Title:    name
  Usage:    $obj->name('scientific', 'sapiens');
            $obj->name('common', 'human', 'man');
            my @names = @{$obj->name('common')};
  Function: Get and set the names
  Returns:  names (a array reference)
  Args:     Arg1 => the name_class. You can assign any text, but the words
                'scientific' and 'common' have the special meaning, as
                scientific name and common name, respectively.
            Arg2 .. => the names

  scientific_name
  Title:    scientific_name
  Usage:    my $new_val = $obj->scientific_name($newval);
  Function: Get/Set the scientific name
  Returns:  a scalar text value
  Args:     a scalar text value

  parent_taxon_id
  Title   : parent_taxon_id
  Usage   : $self->parent_taxon_id($newval);
            $val = $self->parent_taxon_id;
  Function: Get/Set for parent_taxon_id
  Return  :
  Args    :

  species
 Title   : species
 Usage   : $self->species( $species );
           $species = $self->species();
 Function: Get or set the scientific species name.  The species
           name must be in lower case.
 Example : $self->species( 'sapiens' );
 Returns : Scientific species name as string
 Args    : Scientific species name as string

  genus
 Title   : genus
 Usage   : $self->genus( $genus );
           $genus = $self->genus();
 Function: Get or set the scientific genus name.  The genus
           must be in title case.
 Example : $self->genus( 'Homo' );
 Returns : Scientific genus name as string
 Args    : Scientific genus name as string

  sub_species
 Title   : sub_species
 Usage   : $obj->sub_species($newval)
 Function:
 Returns : value of sub_species
 Args    : newvalue (optional)

  binomial
 Title   : binomial
 Usage   : $binomial = $self->binomial();
           $binomial = $self->binomial('FULL');
 Function: Returns a string "Genus species", or "Genus species subspecies",
           if the first argument is 'FULL' (and the species has a subspecies).
 Args    : Optionally the string 'FULL' to get the full name including
           the subspecies.

  organelle
 Title   : organelle
 Usage   : $self->organelle( $organelle );
           $organelle = $self->organelle();
 Function: Get or set the organelle name
 Example : $self->organelle('Chloroplast')
 Returns : The organelle name in a string
 Args    : String, which is the organelle name

  variant
 Title   : variant
 Usage   : $obj->variant($newval)
 Function: Get/set variant information for this species object (strain,
           isolate, etc).
 Example :
 Returns : value of variant (a scalar)
 Args    : new value (a scalar or undef, optional)