[−][src]Struct ncbitaxonomy::NcbiFileTaxonomy
Implementations
impl NcbiFileTaxonomy
[src]
pub fn from_ncbi_files(
nodes_filename: &str,
names_filename: &str
) -> Result<NcbiFileTaxonomy, NcbiTaxonomyError>
[src]
nodes_filename: &str,
names_filename: &str
) -> Result<NcbiFileTaxonomy, NcbiTaxonomyError>
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 = NcbiFileTaxonomy::from_ncbi_files("data/nodes.dmp", "data/names.dmp");
pub fn save_to_sqlite(
&self,
db_url: Option<&str>
) -> Result<SqliteConnection, ToSqliteError>
[src]
&self,
db_url: Option<&str>
) -> Result<SqliteConnection, ToSqliteError>
pub fn get_node_by_id(&self, id: i32) -> Option<&NodeId>
[src]
get_node_by_id
get a NodeId from a numeric NCBI Taxonomy ID
pub fn traversal(&self, from: i32) -> Option<Traverse<i32>>
[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<i32>
[src]
get_id_by_node
get the NCBI Taxonomy ID held by the node with a given NodeId
Trait Implementations
impl Debug for NcbiFileTaxonomy
[src]
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
Auto Trait Implementations
impl RefUnwindSafe for NcbiFileTaxonomy
impl Send for NcbiFileTaxonomy
impl Sync for NcbiFileTaxonomy
impl Unpin for NcbiFileTaxonomy
impl UnwindSafe for NcbiFileTaxonomy
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoSql for T
[src]
fn into_sql<T>(self) -> Self::Expression where
Self: AsExpression<T>,
[src]
Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
[src]
&'a Self: AsExpression<T>,
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>,