[−][src]Trait ncbitaxonomy::NcbiTaxonomy
Required methods
fn contains_id(&self, taxid: i32) -> bool
fn contains_name(&self, name: &str) -> bool
fn is_descendant(&self, name: &str, ancestor_name: &str) -> bool
fn is_descendant_taxid(&self, taxid: i32, ancestor_taxid: i32) -> bool
fn get_name_by_id(&self, taxid: i32) -> Option<String>
fn get_id_by_name(&self, name: &str) -> Option<i32>
fn get_lineage(&self, name: &str) -> Option<Vec<i32>>
fn get_distance_to_common_ancestor_taxid(
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
fn get_distance_to_common_ancestor(
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>
Implementors
impl NcbiTaxonomy for NcbiFileTaxonomy
[src]
fn contains_id(&self, id: i32) -> bool
[src]
contains_id
check whether the taxonomy contains a (number) ID
fn contains_name(&self, name: &str) -> bool
[src]
contains_name
check whether the taxonomy contains a node with the specified name
note: the name used is what is reported as a the 'scientific name' in the NCBI Taxonomy database. synonyms are currently not supported
fn is_descendant(&self, name: &str, ancestor_name: &str) -> bool
[src]
is_descendant
check if a certain named node is a descendant of another named named
fn is_descendant_taxid(&self, taxid: i32, ancestor_taxid: i32) -> bool
[src]
is_descendant_taxid
check if a certain node with taxid is a descendant of another taxid
fn get_name_by_id(&self, id: i32) -> Option<String>
[src]
get_name_by_id
get the scientific name associated with a given NCBI Taxonomy ID
fn get_id_by_name(&self, name: &str) -> Option<i32>
[src]
fn get_lineage(&self, name: &str) -> Option<Vec<i32>>
[src]
get_lineage
get the list of IDs of a taxon and its parents (up to the root)
fn get_distance_to_common_ancestor_taxid(
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
[src]
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
get_distance_to_common_ancestor_id
get the distance (in steps in the tree) between taxid1 and the common ancestor with taxid2
fn get_distance_to_common_ancestor(
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>
[src]
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>
get_distance_to_common_ancestor
find the distance in the tree between name1 and name2
impl NcbiTaxonomy for NcbiSqliteTaxonomy
[src]
fn contains_id(&self, taxid: i32) -> bool
[src]
fn contains_name(&self, name_str: &str) -> bool
[src]
fn is_descendant(&self, name_str: &str, ancestor: &str) -> bool
[src]
fn is_descendant_taxid(&self, taxid: i32, ancestor_taxid: i32) -> bool
[src]
fn get_name_by_id(&self, taxid: i32) -> Option<String>
[src]
fn get_id_by_name(&self, name_str: &str) -> Option<i32>
[src]
fn get_lineage(&self, name: &str) -> Option<Vec<i32>>
[src]
fn get_distance_to_common_ancestor_taxid(
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
[src]
&self,
taxid1: i32,
taxid2: i32,
only_canonical: bool
) -> Option<(i32, i32)>
fn get_distance_to_common_ancestor(
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>
[src]
&self,
name1: &str,
name2: &str,
only_canonical: bool
) -> Option<(i32, String)>