NAME

Bio::LITE::Taxonomy - Lightweight and efficient taxonomic tree manager

SYNOPSIS

use Bio::LITE::Taxonomy

my $taxNCBI = Bio::LITE::Taxonomy::NCBI->new (
                                              names=> "/path/to/names.dmp",
                                              nodes=>"/path/to/nodes.dmp"
                                             );

my @taxNCBI = $taxNCBI->get_taxonomy(1442);

my $taxRDP = Bio::LITE::Taxonomy::RDP->new (
                                            bergeyXML=>"/media/disk-1/bergeyTrainingTree.xml"
                                           )

my @taxRDP = $taxRDP->get_taxonomy(22075);

DESCRIPTION

This module provides easy and efficient access to different taxonomies (NCBI and RDP) with minimal dependencies and without intermediate databases. This module should be used through the specific taxonomic interface (e.g. Bio::LITE::Taxonomy::NCBI or Bio::LITE::Taxonomy::RDP).

This module is not part of the Bioperl bundle. For Bioperl alternatives, see the "SEE ALSO" section of this document.

METHODS

The following methods are available:

get_taxonomy

Accepts a taxid as input and returns an array with its ascendants ordered from top to bottom.

my @tax = $tax->get_taxonomy($taxid);
print "$_\n" for (@tax);

If called in scalar context, returns an array reference instead of the array.

get_taxonomy_with_levels

The same as get_taxonomy but instead of getting the ascendants returns an array of array references. Each array reference has the ascendant and its taxonomic level (at positions 0 and 1 respectively). This is simpler than it sounds. Check this:

my @taxL = $tax->get_taxonomy_with_levels($taxid);
for my $l (@taxL) {
  print "Taxon $l->[0] has rank $l->[1]\n";
}

If called in scalar context, returns an array reference instead of the array.

get_taxid_from_name

Accepts the scientific name of a taxon and returns its associated taxid.

get_taxonomy_from_name

Same as before but returns the full taxonomy of the scientific name. This is the same as:

my $taxid = $tax->get_taxid_from_name($name);
my @taxonomy = $tax->get_taxonomy($taxid);

If called in scalar context returns an array reference instead of the array.

get_term_at_level

Given a taxid and a taxonomic level as input, returns the taxon. For example,

my $taxon = $tax->get_term_at_level(1442,"family"); # $taxon = Bacillaceae
get_level_from_name

Given a taxon's scientific name, returns its associated taxonomic level.

SEE ALSO

Bio::LITE::Taxonomy::RDP

Bio::LITE::Taxonomy::NCBI

Bio::LITE::Taxonomy::NCBI::Gi2taxid: Module to obtain NCBIs Taxids from GIs.

Bio::DB::Taxonomy::*: Bioperl alternative to handle taxonomies.

Bio::Taxon: Bioperl module to handle nodes in taxonomies

AUTHOR

Miguel Pignatelli

Any comments or suggestions should be addressed to emepyc@gmail.com

LICENSE

Copyright 2009 Miguel Pignatelli, all rights reserved.

This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 28:

Unterminated L<...> sequence