Crate nwr

Source

Structs§

NamedMatrix
A named matrix for storing pairwise distances/scores with sequence names
ScoringMatrix
Taxon

Functions§

add_comment
Adds key-value comments to a node
add_comment_kv
Adds key-value comments to a node
batch_exec
Helper function to handle batch execution of SQL statements
check_monophyly
connect_txdb
Connect taxonomy.sqlite in this dir
cosine_similarity
dot_product
Computes the dot product of two vectors a and b.
euclidean_distance
Computes the Euclidean distance between two vectors a and b.
find_rank
format_subtree
format_tree
Writes the tree with indentations
get_all_descendent
All direct or indirect descendents of the Node. The ID given as argument is included in the results.
get_ancestor
Retrieve the ancestor
get_comment_k
Retrieves value from comments of a node
get_descendent
All direct descendents of the Node, not a recursive fetchall
get_id_comment
Get hash of id-comment
get_lineage
All Nodes to the root (with ID 1)
get_name_id
Get hash of name-id
get_names
Get node names
get_tax_id
Names to Taxonomy IDs
get_taxon
IDs to Nodes
insert_parent
Insert a node in the middle of the desired node and its parent
jaccard_intersection
Computes the Jaccard intersection of two vectors a and b. The Jaccard intersection is the sum of the minimum values of corresponding elements.
jaccard_union
Computes the Jaccard union of two vectors a and b. The Jaccard union is the sum of the maximum values of corresponding elements.
match_names
match_positions
match_restrict
mean
Computes the mean (average) of a vector a.
norm_l2
Computes the L2 norm (Euclidean norm) of a vector a.
norm_l2_sq
Computes the squared L2 norm of a vector a.
nwr_path
nwr working path
order_tree_an
Sort the children of each node by alphanumeric order of labels
order_tree_list
Sort the children of each node by a list of names
order_tree_nd
Sort the children of each node by number of descendants
pearson_correlation
Computes the Pearson correlation coefficient between two vectors a and b.
read_newick
sum
Computes the sum of all elements in a vector a.
swap_parent
Swap parent-child link of a node
term_to_tax_id
Convert terms to Taxonomy IDs Accepted forms: ID; “scientific name”; scientific_name
weighted_jaccard_similarity