[Bioperl-l] taxonomic information handler

Dan Kortschak Dan Kortschak <kortschak@rsbs.anu.edu.au>
Wed, 2 Oct 2002 10:16:32 +1000 (EST)


Forgot to cc to list...

Jason, I can suggest the kinds of things that I would find useful in this
hierarchy (and some things that would be fun) - not sure if this is what
you want, but anyway:


Bio::Taxonomy
	->new ($method)
		argument: $method - NCBI/Entrez or local SQL species tree
		returns: Bio::Taxonomy object

	->get_organism_by_taxid ($taxid)
		argument: taxon id number
		returns: Bio::Species object

	->get_organism_by_name ($name,$mode)
		argument: taxon name, search mode common/Linean/any/et c.
		returns: Bio::Species object

	->get_organism_by_acc ($acc)
		argument: gene accession number
		returns: Bio::Species object

	->get_organism_by_id ($id)
		argument: gene/protein id
		returns: Bio::Species object

	->decendants ($taxid)
		argument: taxon id number
                returns: array of Bio::Tree::SpeciesTree object
		# I'm not sure that the NCBI taxonomy nodes table actually
		# allows this is a reasonable way since links only point
		# towards the root node, but once done the ::Tree objects
		# point downwards.

	::Tree
	# Inherits from Bio::TreeI pretty much the same as
	# Bio::Tree::Tree, but doesn't need branch lengths (maybe, useful
	# for diverence times?)

	::Node
	# Inherits from Bio::NodeI pretty much the same as
	# Bio::Tree::Node, but doesn't need bootstrap et c. (length for
	# divergence time?)
		->description ($species)
                	argument: Bio::Species object
                	returns: Bio::Species object


Since a taxid can be at levels above species, the Bio::Species objects may
be semantically broken (though still functional, since
Bio::Species->classification can hold the appropriate information and
->genus...sub_species can be left undef to reflect this - ->common_name
still useful at the > genus level).

I'd be keen to write some of this, but at the moment my SQL can be
quantified as non-existant (hence my use of arrays in my previous post).
I'd be happy to learn when I have time and do it then though. I guess I'll
have to learn about writing perl objects too :)

cheers
Dan

BTW It has just occured to me that something along the same lines would be
appropriate for the GeneOntology data heirarchy as well. Would this fit
into Bio::Taxonomy?

On Tue, 1 Oct 2002, Jason Stajich wrote:

> I think we would like someone to do the Taxonomy namespace for sure.
>
> I have written a connector to NCBI to retrieve ncbi_taxaid for an organism
> name, its in scripts/taxa.  Would love to be able to populate a whole data
> object as well if we can design one.
>
> Would be great if someone (other than me) would flesh out the
> Bio::Taxonomy objects.  There was a proposed relational structure from
> Matthew that may have made its way a module of the biosql schema.
>
> Dan would you be brave enough to propose a set of objects which relate a
> taxanomic hierarchy?  This might utilize objects such as Bio::Graph but I
> wouldn't worry about that right now.  I would drive this based on use
> cases that you have for taxonomic data.
>
> -jason

-- 
_____________________________________________________________   .`.`o
                                                         o| ,\__ `./`r
  Dan Kortschak    kortschak@rsbs.anu.spanner.edu.au     <\/    \_O> O
                                                          "|`...'.\
  Before you criticise a man, try to walk a mile in his    `      :\
  shoes. Then, if he doesn't like what you have to say,           : \
  you'll be a mile away, and you'll have his shoes.               :  \

  The address above will not work, remove the spanner from the works.

By replying to this email you implicitly accept that your response may
be forwarded to other recipients.
Permission is granted for fair use reproduction.