#include <RaaSpeciesTree.h>
Public Member Functions | |
| int | findNode (const std::string &taxon, bool allowsynonym=false) |
| Returns the database rank of a taxon identified by its name. | |
| int | findNode (int tid) |
| Returns the database rank of a taxon identified by a TID. | |
| std::string | getName (int rank) |
| Returns the name of a taxon identified by its database rank. | |
| int | parent (int rank) |
| Returns the database rank of the parent of a taxon in the tree. | |
| int | getTid (int rank) |
| Returns the TID of a taxon. | |
| int | count (int rank) |
| Returns the number of sequences attached to a taxon or to taxa below it in the species tree. | |
| std::string | label (int rank) |
| Returns the label of a taxon of given rank. | |
| int | firstChild (int rank) |
| Returns the rank of the first child taxon of a given taxon. | |
| int | nextChild (int parent, int child) |
| Allows to loop around all child taxa of a given taxon. | |
| bool | isChild (int parent, int child) |
| Tells whether there is a downward path from taxon parent to taxon child in the species tree. | |
| int | nextSynonym (int rank) |
| Allows to loop around all synonymous taxa of a given taxon. | |
| int | getMajor (int rank) |
| Gives the major taxon among all synonyms of a given taxon. | |
Friends | |
| class | RAA |
The tree can be walked up or down starting from a string, a database species rank, or an NCBI taxonID (TID) value. The species tree also contains synonymous names. The root of the tree is named "ROOT" and has database rank 2.
| int RaaSpeciesTree::count | ( | int | rank | ) |
Returns the number of sequences attached to a taxon or to taxa below it in the species tree.
| rank | The database rank of a taxon. |
| int RaaSpeciesTree::findNode | ( | int | tid | ) |
Returns the database rank of a taxon identified by a TID.
| tid | A TID value. |
| int bpp::RaaSpeciesTree::findNode | ( | const std::string & | taxon, | |
| bool | allowsynonym = false | |||
| ) |
Returns the database rank of a taxon identified by its name.
| taxon | A taxon name. Case is not significant. | |
| allowsynonym | If true, the return value will give the synonym's rank rather than the rank of its major taxon. |
| int RaaSpeciesTree::firstChild | ( | int | rank | ) |
Returns the rank of the first child taxon of a given taxon.
| rank | The database rank of a taxon. |
| int RaaSpeciesTree::getMajor | ( | int | rank | ) |
Gives the major taxon among all synonyms of a given taxon.
| rank | The database rank of a taxon. |
| string RaaSpeciesTree::getName | ( | int | rank | ) |
Returns the name of a taxon identified by its database rank.
| rank | The database rank of a taxon. |
| int RaaSpeciesTree::getTid | ( | int | rank | ) |
Returns the TID of a taxon.
| rank | The database rank of a taxon. |
| bool RaaSpeciesTree::isChild | ( | int | parent, | |
| int | child | |||
| ) |
Tells whether there is a downward path from taxon parent to taxon child in the species tree.
| parent | The database rank of a taxon. | |
| child | The database rank of another taxon. |
| string RaaSpeciesTree::label | ( | int | rank | ) |
Returns the label of a taxon of given rank.
Labels may contain taxon common names, genetic code information, TID values, and taxonomic level information (e.g., genus, order).
| rank | The database rank of a taxon. |
| int RaaSpeciesTree::nextChild | ( | int | parent, | |
| int | child | |||
| ) |
Allows to loop around all child taxa of a given taxon.
| parent | The database rank of a taxon. | |
| child | The database rank of a child of taxon of rank parent. |
| int RaaSpeciesTree::nextSynonym | ( | int | rank | ) |
Allows to loop around all synonymous taxa of a given taxon.
Synonymous taxa of a taxon are chained in a closed loop, among which only one, the major taxon, has a parent taxon.
| rank | The database rank of a taxon. |
| int RaaSpeciesTree::parent | ( | int | rank | ) |
Returns the database rank of the parent of a taxon in the tree.
| rank | The database rank of a taxon. |
1.5.9