[][src]Struct ncbitaxonomy::NcbiTaxonomy

pub struct NcbiTaxonomy { /* fields omitted */ }

Methods

impl NcbiTaxonomy[src]

pub fn from_ncbi_files(
    nodes_filename: &str,
    names_filename: &str
) -> Result<NcbiTaxonomy, Error>
[src]

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

impl Debug for NcbiTaxonomy[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]