Usage : $ncbi_parser->parse ( $ncbi_nodes_path ) Returns : ref to a hash { child_id => parent_id } Args : nodes.dmp path ( string ) Usage : $ncbi_parser->parse ( $ncbi_names_path, $name_type ) Returns : ref to a hash { ncbi_id => ncbi_name } Args : 1. names.dmp path or nodes.dmp path, string 2. ncbi name type ( string, e.g. 'scientific name' ) if the first arg is names.dmp otherwise none Function : parses the complete NCBI taxonomy
Usage : $NCBIParser->work ( $onto, $nodes, $names, $ncbi_ids ) Returns : map of added terms { NCBI ID => OBO::Core::Term object } Args : 1. input ontology, OBO::Core::Ontology object 2. ref to a hash { child_id => parent_id } 3. ref to a hash { ncbi_id => scientific_name } 4. parental ontology term for the root of the taxonomy, OBO::Core::Term object 5. ref to a list of NCBI taxon ids ( \d+ ) Function : adds NCBI taxonomy to the input ontology for the specified taxa
OBO::Parser::NCBIParser - A NCBI taxonomy to OBO translator.
This parser converts chosen parts of the NCBI taxonomy-tree into an OBO file. A taxon ID is given to the parser and the whole tree up to the root is reconstructed in the given OBO ontology, using scientific names.
The dump files ( nodes.dmp and names.dmp ) should be obtained from:
ftp://ftp.ncbi.nih.gov/pub/taxonomy/taxdump.tar.gz
TODO: include ranks and disjoints only in correlating ranks.
Mikel Egana Aranguren and Vladimir Mironov
http://www.mikeleganaranguren.com, vladimir.n.mironov@gmail.com
Copyright (c) 2006 by Mikel Egana Aranguren
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.
To install OBO::Util::Set, copy and paste the appropriate command in to your terminal.
cpanm
cpanm OBO::Util::Set
CPAN shell
perl -MCPAN -e shell install OBO::Util::Set
For more information on module installation, please visit the detailed CPAN module installation guide.