[Bioperl-l] Bio::*Taxonomy* changes
Sendu Bala
bix at sendu.me.uk
Thu Jul 20 17:53:03 UTC 2006
Chris Fields wrote:
>
> I still plan on switching Bio::DB::Taxonomy::entrez to use
> Bio::DB::EUtilities at some point but probably won't get around to it until
> August;
If I may make two feature requests (you've probably already done them,
if so apologies)? a) Automatically enforce the 3second wait rule when
querying via the ncbi website. b) Automatically cache results locally in
a reasonable way, such that repeated queries aiming to get the same
result don't have to go via the website.
> Anyway, I could add this in then base class Bio::DB::Taxonomy directly so
> one could used the retrieved TaxIDs for flat-file or entrez searches; this
> requires, of course, access to the remote Entrez database (it would use
> ELink). Would that be of interest?
Sorry, I don't really understand this paragraph. I'm unable to parse
'...then base class Bio::DB::Taxonomy directly so...', for starters.
>> Bio::Taxonomy::Node
>> -------------------
>
> ...
>
>> species() and genus() issue a warning when you try to use them on a node
>> that isn't of rank 'species' (since they interact with the
>> classification array and not names('method') like the other similar
>> methods).
>
> I would just have genus() and species() issue warnings if they aren't set to
> a particular value. So, if the current node is at the genus rank, genus()
> will be set but species() won't be. And no need to do additional checking!
The problem is, genus() and species() are special cases that aren't
normally directly set. They get their values from the classification
array: genus() returns (classification())[1] and species() returns
(classification())[0]. They set the same values. Doing this is only sane
(though is still likely to be wrong, given that there can be ranks
between species and genus) when the node is of rank 'species', hence the
warnings.
I imagine this is to work with pesky file formats like genbank, so I
can't really change anything here without major overhaul. And my plans
for overhaul involve getting rid of genus() and species(), so I'll just
leave them be for now.
Anyway, thanks for your comments and input into this thread! It's much
appreciated.
More information about the Bioperl-l
mailing list