[−][src]Struct ncbitaxonomy::NcbiTaxonomy
Methods
impl NcbiTaxonomy
[src]
pub fn from_ncbi_files(
nodes_filename: &str,
names_filename: &str
) -> Result<NcbiTaxonomy, Error>
[src]
nodes_filename: &str,
names_filename: &str
) -> Result<NcbiTaxonomy, Error>
from_ncbi_files
Reads the nodes.dmp
file and names.dmp
file from the NCBI Taxonomy database to
generate a NcbiTaxonomy structure
Examples
use ncbitaxonomy::*; let taxonomy = NcbiTaxonomy::from_ncbi_files("data/nodes.dmp", "data/names.dmp");
pub fn contains_id(&self, id: u32) -> bool
[src]
contains_id
check whether the taxonomy contains a (number) ID
pub 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
pub 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
pub fn is_descendant_taxid(&self, taxid: u32, ancestor_taxid: u32) -> bool
[src]
is_descendant
check if a certain node with taxid is a descendant of another taxid
pub fn get_node_by_id(&self, id: u32) -> Option<&NodeId>
[src]
get_node_by_id
get a NodeId from a numeric NCBI Taxonomy ID
pub fn traversal(&self, from: u32) -> Option<Traverse<u32>>
[src]
traversal
traverse the tree nodes (in depth first order) from the node with a given NCBI Taxonomy ID
pub fn get_id_by_node(&self, node_id: NodeId) -> Option<u32>
[src]
get_id_by_node
get the NCBI Taxonomy ID held by the node with a given NodeId
pub fn get_name_by_id(&self, id: u32) -> Option<&String>
[src]
get_name_by_id
get the scientific name associated with a given NCBI Taxonomy ID
Trait Implementations
Auto Trait Implementations
impl Send for NcbiTaxonomy
impl Sync for NcbiTaxonomy
impl Unpin for NcbiTaxonomy
impl UnwindSafe for NcbiTaxonomy
impl RefUnwindSafe for NcbiTaxonomy
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,